Add temporary debug logging to Uptime Kuma listResources
Diagnosing why a connected Uptime Kuma instance with real monitors is producing zero Resources — logs monitor count, active flags, and last heartbeat per monitor so we can see exactly what the Socket.IO session returns.
This commit is contained in:
parent
58f007e6db
commit
89dd3471db
1 changed files with 5 additions and 0 deletions
|
|
@ -94,6 +94,11 @@ export const uptimeKuma: IntegrationAdapter = {
|
||||||
// single "done" signal, so give it a short window to arrive.
|
// single "done" signal, so give it a short window to arrive.
|
||||||
await new Promise((resolve) => setTimeout(resolve, 2500))
|
await new Promise((resolve) => setTimeout(resolve, 2500))
|
||||||
|
|
||||||
|
console.log(`[uptimeKuma] received ${monitors.size} monitor(s), ${lastHeartbeat.size} heartbeat(s)`)
|
||||||
|
for (const m of monitors.values()) {
|
||||||
|
console.log(`[uptimeKuma] monitor ${m.id} "${m.name}" active=${m.active} heartbeat=${JSON.stringify(lastHeartbeat.get(m.id))}`)
|
||||||
|
}
|
||||||
|
|
||||||
const resources: Resource[] = []
|
const resources: Resource[] = []
|
||||||
for (const monitor of monitors.values()) {
|
for (const monitor of monitors.values()) {
|
||||||
if (!monitor.active) continue
|
if (!monitor.active) continue
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue