More control over notifications #31

Closed
opened 2 years ago by momar · 2 comments
momar commented 2 years ago
Owner

e.g. only send notifications for critical messages, or set verify option independently for warning, critical and ok events.

notify_warning = ["email"]
verify_critical = 2
notify_ok = [] # don't notify anyone if it's back online
e.g. only send notifications for critical messages, or set `verify` option independently for warning, critical and ok events. ```hcl notify_warning = ["email"] verify_critical = 2 notify_ok = [] # don't notify anyone if it's back online ```
momar added this to the v2 milestone 2 years ago
momar added the
backend
feature
labels 2 years ago
momar self-assigned this 2 years ago
momar removed their assignment 2 years ago
Poster
Owner

I'd like to implement this the other way around by using notifiers, in a pipeline-style rule list:

notifier "critical-only" {
  type = "console"
  filter = [
    { verify = 1 }
    { if_status = "WARNING", if_previous = "OK", accept = true },
    { if_status = "ERROR", if_previous_in = ["OK", "WARNING"], accept = true },
    { if_status = "OK", accept = true },
    { accept = false }
  ]
}
I'd like to implement this the other way around by using notifiers, in a pipeline-style rule list: ```hcl notifier "critical-only" { type = "console" filter = [ { verify = 1 } { if_status = "WARNING", if_previous = "OK", accept = true }, { if_status = "ERROR", if_previous_in = ["OK", "WARNING"], accept = true }, { if_status = "OK", accept = true }, { accept = false } ] } ```
momar referenced this issue from a commit 1 year ago
Poster
Owner

Alright, notification verification turned out to be more complex than expected, so it's missing, but the filters work (albeit a bit differently, see Configuration.md), and can be extended by stuff like verification later on.

Alright, notification verification turned out to be more complex than expected, so it's missing, but the filters work (albeit a bit differently, see Configuration.md), and can be extended by stuff like verification later on.
zottelchin closed this issue 1 year ago
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.