fix: TypeScript errors in server-metrics service
This commit is contained in:
@@ -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++
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user