- Agrega provider 'ollama' al panel de AiConfig con badge azul y hint de URL
- ia_controller: reemplaza webhook n8n hardcodeado por llamada directa a Ollama vía AiConfig (módulo 'ia')
- query_runner: agrega soporte explícito de ollama (model fallback gemma3:1b, Basic Auth para URL pública)
- HTML: agrega módulo 'IA / vCard' en el selector de módulos
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
html/template rejects escaped quotes in attribute values. Code examples
are now built in getCodeExample() and rendered via x-text on the <pre>.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Shows endpoint, auth, request/response formats and code tabs
for cURL, JavaScript, PHP and Python. API Key is auto-injected
from the page state so examples are ready to copy-paste.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Agent tracks consecutive reports above cpu_threshold (default 90%)
- After renice_consecutive reports (default 2 = 60s sustained), runs
renice -n 19 on the top CPU process
- Reports the action back in the heartbeat payload
- Backend sends Telegram alert when renice is applied
- All params configurable in agent.yml and install.sh flags
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Uses Chart.js to render line charts from servidor_metricas_history.
Chart loads when opening the server detail modal and downsamples
to max 300 points for performance.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- New table servidor_metricas_history (cpu%, ram%, swap%, disco%, tcp, load1)
- Each heartbeat inserts a compact row (~60 bytes)
- GET /app/servidor/:id/metricas-history?horas=24 returns the data
- Daily cron at 3AM purges rows older than 7 days
- ~1.2 MB per server per 7 days at 30s interval
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When CPU or RAM exceeds the threshold, the alert now lists the top 3
processes sorted by the relevant metric (CPU% or RAM MB).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The metrics JSON uses 'discos' (array) not 'disco' (single object),
so disk alerts were never firing. Also reports per-mountpoint label.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Filter by RAM first (cheap), then call CPUPercent on just the 10 winners.
Reduces /proc reads from hundreds to 10 per interval.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
CPUPercent() on every process reads /proc/<pid>/stat for all processes,
causing ~19% CPU spike on servers with many containers. Sorting by RAM
is a single /proc read per process and much cheaper.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Agrega sección visible en /app/websms con el secret_key
y botón de copiar, para facilitar el uso del endpoint externo.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Agrega POST /api/sms/send autenticado con Bearer token (secret_key
auto-generado en WebSmsConfig). Recibe numero y mensaje, llama a
LabsMobile y registra el resultado en websms_log.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
La API devuelve HTTP 200 con code:"401" para credenciales inválidas.
Ahora el service retorna error cuando code != "0".
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
El error "unmarshal: invalid character '<'" ocultaba qué devolvía
LabsMobile. Ahora el error incluye Content-Type y los primeros 200
bytes del cuerpo para diagnóstico.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Agrega bloque <style> con btn-primary, input-field, label, badge-* que
faltaban. Badge de status ahora muestra "Enviado"/"Error" en vez del
código numérico. Botones de copiar en la sección de webhooks.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Los modales y controles no tenían estilos (btn-primary, btn-secondary,
btn-danger, btn-icon, input-field, label, badge-*) porque el bloque
<style> nunca fue incluido al crear estas vistas. También corregido
text-slate-800 en h2 de modales para alinearse con el patrón del proyecto.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>