moncheck - add alarm mapping to notification
This should enable the notifier to make a decent decision on what to do.
This commit is contained in:
parent
24456400eb
commit
02925bc335
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user