2 Commits
Author SHA1 Message Date
ic-builder 857be83724 Merge pull request 'UP solves open tickets after restarts' (#3) from ic-builder/up-solve-search into main
ci / vet (push) Successful in 1m25s
2026-09-06 18:09:39 +00:00
ic-builder de9b9c4a35 UP events solve open tickets even after bridge restarts
ci / vet (pull_request) Successful in 47s
In-memory dedupe resets on pod restart; recovery then no-ops and leaves
stale open tickets. UP now falls back to a GLPI search for an unsolved
ticket for that monitor.
Ticket: https://projects.knownelement.com/issues/824
2026-09-06 13:09:34 -05:00
2 changed files with 5 additions and 1 deletions
BIN
View File
Binary file not shown.
+5 -1
View File
@@ -216,7 +216,11 @@ func (b *bridge) handle(w http.ResponseWriter, r *http.Request) {
case 1: // UP
tid, exists := b.open[k.Monitor.Name]
if !exists {
return
// restarts wipe the in-memory map; search GLPI for an open ticket
tid, _ = b.glpi.openTicketFor(k.Monitor.Name)
if tid == 0 {
return
}
}
delete(b.open, k.Monitor.Name)
go func() {