Created
April 29, 2026 01:34
-
-
Save badnetmask/22a4a0f9f419b0a9db90b9c652366fd6 to your computer and use it in GitHub Desktop.
Basic alerts to use with Prometheus Blackbox Exporter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| apiVersion: operator.victoriametrics.com/v1beta1 | |
| kind: VMRule | |
| metadata: | |
| name: blackbox-exporter-alerts | |
| namespace: monitoring | |
| labels: | |
| app.kubernetes.io/name: blackbox-exporter | |
| app.kubernetes.io/component: alert-rules | |
| spec: | |
| groups: | |
| - name: blackbox-exporter | |
| interval: 60s | |
| rules: | |
| - alert: ProbeDown | |
| expr: probe_success == 0 | |
| for: 5m | |
| labels: | |
| severity: critical | |
| component: blackbox-exporter | |
| annotations: | |
| summary: "Probe target {{ $labels.target }} is down" | |
| description: "{{ $labels.target }} ({{ $labels.instance }}) has been unreachable for more than 5 minutes." | |
| - alert: ProbeSlow | |
| expr: probe_duration_seconds > 10 | |
| for: 5m | |
| labels: | |
| severity: warning | |
| component: blackbox-exporter | |
| annotations: | |
| summary: "Probe target {{ $labels.target }} is slow" | |
| description: "{{ $labels.target }} ({{ $labels.instance }}) probe duration is {{ $value | humanizeDuration }}, exceeding the 10s threshold." | |
| # step-ca issues ~30-day certs; cert-manager renews at ~20 days remaining (2/3 of duration). | |
| # Thresholds below the 20-day renewal point indicate cert-manager or external renewal has failed. | |
| - alert: SSLCertExpiringWarning | |
| expr: (probe_ssl_earliest_cert_expiry - time()) / 86400 < 10 | |
| for: 1h | |
| labels: | |
| severity: warning | |
| component: blackbox-exporter | |
| annotations: | |
| summary: "SSL certificate for {{ $labels.target }} expires soon" | |
| description: "SSL certificate for {{ $labels.target }} ({{ $labels.instance }}) expires in {{ $value | humanize }} days. cert-manager should have renewed it already." | |
| - alert: SSLCertExpiringCritical | |
| expr: (probe_ssl_earliest_cert_expiry - time()) / 86400 < 5 | |
| for: 1h | |
| labels: | |
| severity: critical | |
| component: blackbox-exporter | |
| annotations: | |
| summary: "SSL certificate for {{ $labels.target }} is about to expire" | |
| description: "SSL certificate for {{ $labels.target }} ({{ $labels.instance }}) expires in {{ $value | humanize }} days. Immediate action required." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment