disable all alerts for a job

84 views
Skip to first unread message

mel

unread,
Mar 12, 2024, 8:51:22 AM3/12/24
to Prometheus Users
How do I disable all alerts for a job without having to modify each alert rule and excluding the job?

Brian Candler

unread,
Mar 12, 2024, 10:13:50 AM3/12/24
to Prometheus Users
option 1: filter them out in alertmanager, with an extra routing rule that matches on the 'job' label and delivers to a null receiver.
option 1b: create a long-lived silence in alertmanager that matches on the 'job' label

option 2: drop them in alert_relabel_configs

But it may be clearer in the long term to modify the alerting expressions: if you change foo to foo{job!="bar"}, then the intention is obvious.

mel

unread,
Mar 12, 2024, 10:47:34 AM3/12/24
to Prometheus Users
ah, thank you for the suggestions
Reply all
Reply to author
Forward
0 new messages