fix(monitoring): SSH ao EasyPanel em vez de API inexistente

- server-metrics: substituir CWP (só aceita ed25519) por Easy server
  (aceita password auth na porta 22)
- monitoring-collector: remover chamadas a monitor.getSystemStats e
  monitor.getDockerTaskStats (endpoint não existe nesta versão EasyPanel);
  métricas CPU/RAM via SSH e containers via docker service ls sobre SSH

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-28 16:08:20 +01:00
parent a594df1c7c
commit 94db202de9
2 changed files with 69 additions and 87 deletions
+9 -9
View File
@@ -15,17 +15,17 @@ interface SSHServer {
pass: string
}
// EasyPanel metrics: collected via API in monitoring-collector.ts
// Gateway metrics: not needed (just Nginx proxy, covered by HTTP health check)
// Only CWP Server remains on SSH (password auth)
// CWP Server: só aceita autenticação por chave ed25519 (não por password) — não acessível a partir do container
// EasyPanel Server: aceita password auth na porta 22 — usado para métricas CPU/RAM/disk
// Gateway: apenas proxy Nginx, coberto pelo health check HTTP
const SSH_SERVERS: SSHServer[] = [
{
name: 'server',
monitorName: 'CWP Server',
host: process.env.SERVER_HOST || '5.9.90.105',
port: parseInt(process.env.SERVER_PORT || '9443'),
user: process.env.SERVER_USER || 'root',
pass: process.env.SERVER_PASS || ''
name: 'easy',
monitorName: 'EasyPanel',
host: process.env.EASY_HOST || '5.9.90.70',
port: 22,
user: process.env.EASY_USER || 'root',
pass: process.env.EASY_PASS || ''
}
]