feat(agent): persist 7-day metrics history per server heartbeat
- 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>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
4b98161070
commit
ae74d0ef90
@@ -81,6 +81,7 @@ func UserRoutes(app fiber.Router) {
|
||||
protected.Get("/servidor-dashboard/:id", controllers.GetServidorDashboard)
|
||||
protected.Get("/conx-ping/:id", controllers.PingConexion)
|
||||
protected.Post("/servidor/:id/agent-token", controllers.GenerateAgentToken)
|
||||
protected.Get("/servidor/:id/metricas-history", controllers.GetMetricasHistory)
|
||||
protected.Post("/servidor/:id/sync-hostinger", controllers.SyncServidorFromHostinger)
|
||||
|
||||
// Rutas de proveedores de servidor
|
||||
|
||||
Reference in New Issue
Block a user