From 02925bc33574fe9fe9669fc7afb797d1fc293583 Mon Sep 17 00:00:00 2001 From: Gibheer Date: Tue, 11 Dec 2018 13:24:13 +0100 Subject: moncheck - add alarm mapping to notification This should enable the notifier to make a decent decision on what to do. --- cmd/moncheck/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd/moncheck') diff --git a/cmd/moncheck/main.go b/cmd/moncheck/main.go index 766aa37..bea8e77 100644 --- a/cmd/moncheck/main.go +++ b/cmd/moncheck/main.go @@ -167,7 +167,7 @@ where check_id = $1`, id, &states, &msg, states.ToOK()); err != nil { continue } if notify { - if _, err := tx.Exec("insert into notifications(check_id, states, output) values ($1, $2, $3);", &id, &states, &msg); err != nil { + if _, err := tx.Exec("insert into notifications(check_id, states, output, mapping_id) values ($1, $2, $3, $4);", &id, &states, &msg, &mapId); err != nil { log.Printf("[%d] could not create notification for '%d': %s", thread, id, err) tx.Rollback() continue -- cgit v1.2.3-70-g09d2