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>
El objeto Alpine.js tenía un } sin coma al final de openAppDeployments,
causando un error de sintaxis JS que impedía la inicialización del componente
y hacía que la página /app/coolify apareciera completamente en blanco.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- CoolifyApplicationStart/Stop/Restart cambian GET → POST (Coolify API requiere POST)
- Nuevo endpoint público POST /webhooks/coolify para recibir notificaciones
de deployment/restart desde Coolify Settings → Notifications → Webhook
- UI: muestra URL del webhook en modal de config para fácil copia
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Cambia StatusBadGateway (502) → StatusBadRequest (400) en todos los
errores del proxy Coolify. Cloudflare intercepta respuestas 502 del
origen y muestra su propia pantalla, ocultando el error al frontend.
Con 400, el JSON de error llega al cliente y Alpine.js puede mostrarlo.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- rest/controllers/coolify_controller.go: proxy completo hacia API Coolify
- resources/views/coolify.html: interfaz Alpine.js con tabs apps/servers/services/dbs/projects/deployments/team
- rest/routes/user.go: registra todas las rutas /app/coolify/*
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add coolify_config.go model (missing from worktree branch)
- Add CoolifyConfig to normal-startup AutoMigrate → creates table on next start
- Fix miniwebs tab: m.activo is not in API response; fallback to
vcard.estado (true/false) to show real status instead of always Inactiva
- Improve miniwebs row: show url, user name, vcard status badge
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Botón '🚫 + VCards' abre modal de confirmación
- Modal carga y lista las VCards activas del usuario
- Al confirmar: inactiva cada VCard (PUT estado:false) y desactiva el usuario
- Muestra resumen del resultado antes de cerrar
- Botón 'Ordenar por vencimiento' con colores en filas (rojo/amarillo/verde)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>