2 Commits
Author SHA1 Message Date
ic-builder 9fdfd9e552 Merge pull request 'fix DOWN enum: Kuma heartbeat 0=down (was 2)' (#5) from ic-builder/status-enum into main
ci / vet (push) Successful in 41s
2026-09-06 20:29:52 +00:00
ic-builder 18523eae58 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
2026-09-06 15:29:48 -05:00
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() b.mu.Lock()
defer b.mu.Unlock() defer b.mu.Unlock()
switch status { 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 { if _, exists := b.open[k.Monitor.Name]; !exists {
tid, err := b.glpi.openTicketFor(k.Monitor.Name) tid, err := b.glpi.openTicketFor(k.Monitor.Name)
if err == nil && tid == 0 { if err == nil && tid == 0 {