On 2020-06-09 12:39, Danny de Waard wrote:
Okay got that noob hurdle now ;)

I got another question bout this.

I have a kind of maintenance rule implemented that if a value for
MaintenanceMode==1 then all alerts should be dropped. But it looks
like the info alerts are not bottered by this rule?
Can anyone explain why?

(p.s. config is still the same)

Info alert is (under host rules section):
alert: loadbalancer_down_for_host [1] expr: loadbalancer_stats < 1 [2]
for: 5m labels: severity: info annotations: description: Check the
loadbalancer status. Is there a deployment?. Reported by instance {{
$labels.instance }} of job {{ $labels.job }}. summary: The
loadbalancer for {{ $labels.instance }} has been down for the last 5
minutes

Maintenance alert is (under targets rules section):
alert: MaintenanceMode [3] expr: maintenance_mode == 1 [4] for: 1m
labels: severity: warning annotations: description: Fires during
maintenance mode and is routed to a blackhole by Alertmanager summary:
This is a maintenance alert

Is the section giving me troubles?

Op maandag 18 mei 2020 11:29:57 UTC+2 schreef Brian Candler:

You need a comma:

{job="PROD",severity="critical"}

I think it should give an error for that though.  Also, it seems to
ignore "continue: false/true" and just shows all the matches anyway.


You need to take a look at inhibit rules for this.

https://prometheus.io/docs/alerting/configuration/#inhibit_rule

--
Stuart Clark

--
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/065089dd6d7affe4fb7ec0b27382c1f1%40Jahingo.com.

Reply via email to