fix: TypeScript errors in server-metrics service

This commit is contained in:
2026-02-04 23:21:03 +00:00
parent f4160b60f9
commit bd21a8d511
5 changed files with 38 additions and 5 deletions

View File

@@ -6,9 +6,7 @@
import db from '../db.js'
import { collectAllMetrics as collectHetznerMetrics } from './hetzner.js'
// Hetzner API Configuration
const HETZNER_API_URL = 'https://api.hetzner.cloud/v1'
const HETZNER_TOKEN = process.env.HETZNER_TOKEN || ''
// Hetzner API Configuration (used by hetzner.ts service)
// SSH Configuration (from MCP ssh-unified)
interface SSHServer {
@@ -185,7 +183,7 @@ export async function syncHetznerToMonitoring(): Promise<number> {
m.status = 'up',
m.last_check = NOW()
WHERE m.category = 'server' AND m.name = ?
`, [hetznerName.includes('.') ? hetznerName : hetznerName, monitorName])
`, [namePattern, monitorName])
if ((result as any).affectedRows > 0) synced++
}