Answer the question
In order to leave comments, you need to log in
How to edit Prometheus config to send an alert when a node is more than 2 minutes down?
Good day!
Please tell me how to solve the following. problem: Prometheus sends alerts even if there are short-line signal losses on the switch, for example, and spam to slack.
How to make it so that 1 alert is sent if the node lies for more than 2 minutes in a row? What rule should be added and in what config? Thank you very much
Answer the question
In order to leave comments, you need to log in
Correct the rule, in for write 2m like this:
- alert: Node down
expr: up{job="node_exporter"} == 0
for: 2m
labels:
severity: warning
annotations:
title: Node {{ $labels.instance }} is down
description: Failed to scrape {{ $labels.job }} on {{ $labels.instance }} for more than 3 minutes. Node seems down.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question