Skip to content

Commit

Permalink
fix: labels on alertss
Browse files Browse the repository at this point in the history
  • Loading branch information
cterence committed Sep 2, 2024
1 parent 1c088df commit f28b23b
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions k8s-apps/blackbox-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,71 +27,71 @@ prometheus-blackbox-exporter:
severity: critical
annotations:
summary: Blackbox probe failed (instance {{ $labels.instance }})
description: "Probe failed\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
description: "Probe failed\n VALUE = {{ $value }}\n LABELS = {{ range $k,$v := $labels }}{{ $k }}: <code>{{ $v }}</code> {{ end }}"
- alert: BlackboxConfigurationReloadFailure
expr: "blackbox_exporter_config_last_reload_successful != 1"
for: 0m
labels:
severity: warning
annotations:
summary: Blackbox configuration reload failure (instance {{ $labels.instance }})
description: "Blackbox configuration reload failure\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
description: "Blackbox configuration reload failure\n VALUE = {{ $value }}\n LABELS = {{ range $k,$v := $labels }}{{ $k }}: <code>{{ $v }}</code> {{ end }}"
- alert: BlackboxSlowProbe
expr: "avg_over_time(probe_duration_seconds[1m]) > 1"
for: 1m
labels:
severity: warning
annotations:
summary: Blackbox slow probe (instance {{ $labels.instance }})
description: "Blackbox probe took more than 1s to complete\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
description: "Blackbox probe took more than 1s to complete\n VALUE = {{ $value }}\n LABELS = {{ range $k,$v := $labels }}{{ $k }}: <code>{{ $v }}</code> {{ end }}"
- alert: BlackboxProbeHttpFailure
expr: "probe_http_status_code <= 199 OR probe_http_status_code >= 400"
for: 1m
labels:
severity: critical
annotations:
summary: Blackbox probe HTTP failure (instance {{ $labels.instance }})
description: "HTTP status code is not 200-399\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
description: "HTTP status code is not 200-399\n VALUE = {{ $value }}\n LABELS = {{ range $k,$v := $labels }}{{ $k }}: <code>{{ $v }}</code> {{ end }}"
- alert: BlackboxSslCertificateWillExpireSoon
expr: "3 <= round((last_over_time(probe_ssl_earliest_cert_expiry[10m]) - time()) / 86400, 0.1) < 20"
for: 0m
labels:
severity: warning
annotations:
summary: Blackbox SSL certificate will expire soon (instance {{ $labels.instance }})
description: "SSL certificate expires in less than 20 days\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
description: "SSL certificate expires in less than 20 days\n VALUE = {{ $value }}\n LABELS = {{ range $k,$v := $labels }}{{ $k }}: <code>{{ $v }}</code> {{ end }}"
- alert: BlackboxSslCertificateWillExpireSoon
expr: "0 <= round((last_over_time(probe_ssl_earliest_cert_expiry[10m]) - time()) / 86400, 0.1) < 3"
for: 0m
labels:
severity: critical
annotations:
summary: Blackbox SSL certificate will expire soon (instance {{ $labels.instance }})
description: "SSL certificate expires in less than 3 days\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
description: "SSL certificate expires in less than 3 days\n VALUE = {{ $value }}\n LABELS = {{ range $k,$v := $labels }}{{ $k }}: <code>{{ $v }}</code> {{ end }}"
- alert: BlackboxSslCertificateExpired
expr: "round((last_over_time(probe_ssl_earliest_cert_expiry[10m]) - time()) / 86400, 0.1) < 0"
for: 0m
labels:
severity: critical
annotations:
summary: Blackbox SSL certificate expired (instance {{ $labels.instance }})
description: "SSL certificate has expired already\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
description: "SSL certificate has expired already\n VALUE = {{ $value }}\n LABELS = {{ range $k,$v := $labels }}{{ $k }}: <code>{{ $v }}</code> {{ end }}"
- alert: BlackboxProbeSlowHttp
expr: "avg_over_time(probe_http_duration_seconds[1m]) > 1"
for: 1m
labels:
severity: warning
annotations:
summary: Blackbox probe slow HTTP (instance {{ $labels.instance }})
description: "HTTP request took more than 1s\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
description: "HTTP request took more than 1s\n VALUE = {{ $value }}\n LABELS = {{ range $k,$v := $labels }}{{ $k }}: <code>{{ $v }}</code> {{ end }}"
- alert: BlackboxProbeSlowPing
expr: "avg_over_time(probe_icmp_duration_seconds[1m]) > 1"
for: 1m
labels:
severity: warning
annotations:
summary: Blackbox probe slow ping (instance {{ $labels.instance }})
description: "Blackbox ping took more than 1s\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
description: "Blackbox ping took more than 1s\n VALUE = {{ $value }}\n LABELS = {{ range $k,$v := $labels }}{{ $k }}: <code>{{ $v }}</code> {{ end }}"
serviceMonitor:
enabled: true
selfMonitor:
Expand Down

0 comments on commit f28b23b

Please sign in to comment.