Skip to content

Commit

Permalink
Probe success rule (#45)
Browse files Browse the repository at this point in the history
* probe failure rule

* build deps

* fmt

* follow naming patterns

* cleaner alert

* fix description

* warning rule

---------

Signed-off-by: Dylan Stephano-Shachter <dylan.stephano-shachter@canonical.com>
Co-authored-by: Luca Bello <36242061+lucabello@users.noreply.github.com>
  • Loading branch information
dstathis and lucabello authored Jan 28, 2025
1 parent 4effac6 commit e6c7c70
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/prometheus_alert_rules/probe_failure.rule
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
groups:
- name: probes
rules:
- alert: ProbeFailedOnce
expr: probe_success{} < 1
for: 0m
labels:
severity: warning
annotations:
summary: Blackbox Exporter target {{ $labels.probe_target }} has failed.
description: >
Blackbox Exporter target {{ $labels.probe_target }} has failed.
LABELS = {{ $labels }}
- alert: ProbeFailed
expr: probe_success{} < 1
for: 5m
labels:
severity: critical
annotations:
summary: Blackbox Exporter target {{ $labels.probe_target }} has failed for the last five minutes.
description: >
Blackbox Exporter target {{ $labels.probe_target }} has failed for the last five minutes.
LABELS = {{ $labels }}

0 comments on commit e6c7c70

Please sign in to comment.