UP solves open tickets after restarts #3

Merged
ic-builder merged 1 commits from ic-builder/up-solve-search into main 2026-09-06 18:09:39 +00:00
2 changed files with 5 additions and 1 deletions
Showing only changes of commit de9b9c4a35 - Show all commits
BIN
View File
Binary file not shown.
+4
View File
@@ -216,8 +216,12 @@ func (b *bridge) handle(w http.ResponseWriter, r *http.Request) {
case 1: // UP case 1: // UP
tid, exists := b.open[k.Monitor.Name] tid, exists := b.open[k.Monitor.Name]
if !exists { if !exists {
// restarts wipe the in-memory map; search GLPI for an open ticket
tid, _ = b.glpi.openTicketFor(k.Monitor.Name)
if tid == 0 {
return return
} }
}
delete(b.open, k.Monitor.Name) delete(b.open, k.Monitor.Name)
go func() { go func() {
fu := fmt.Sprintf("RECOVERY: monitor %s back UP at %s. Ticket auto-closing as solved with recovery evidence.", k.Monitor.Name, k.Heartbeat.Time) fu := fmt.Sprintf("RECOVERY: monitor %s back UP at %s. Ticket auto-closing as solved with recovery evidence.", k.Monitor.Name, k.Heartbeat.Time)