fix: Kuma heartbeat status enum — 0 is DOWN, not 2
ci / vet (pull_request) Successful in 59s

Live-path debug found the bridge silently ignored real Kuma down-events:
Kuma heartbeat.status is 0=down/1=up/2=pending, not the webhook-doc
guess used earlier. DOWN now keyed on 0.
Ticket: https://projects.knownelement.com/issues/824
This commit is contained in:
2026-09-06 15:29:48 -05:00
parent 50db0ded4e
commit 18523eae58
2 changed files with 1 additions and 1 deletions
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -199,7 +199,7 @@ func (b *bridge) handle(w http.ResponseWriter, r *http.Request) {
b.mu.Lock()
defer b.mu.Unlock()
switch status {
case 2: // DOWN (0=unknown,1=up,2=down per Kuma webhook)
case 0: // Kuma heartbeat status: 0=down, 1=up, 2=pending, 3=maintenance
if _, exists := b.open[k.Monitor.Name]; !exists {
tid, err := b.glpi.openTicketFor(k.Monitor.Name)
if err == nil && tid == 0 {