Skip to content

Commit

Permalink
Switch naming to HostMetricsMissing for absent metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelThamm committed Dec 20, 2024
1 parent 1b35ab8 commit 48e9ce8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions lib/charms/prometheus_k8s/v0/prometheus_scrape.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,19 +413,19 @@ def _on_scrape_targets_changed(self, event):
annotations:
summary: Host '{{ $labels.instance }}' is down.
description: >-
Host '{{ $labels.instance }}' is down.
Host '{{ $labels.instance }}' is down, failed to scrape.
VALUE = {{ $value }}
LABELS = {{ $labels }}
- alert: HostUnavailable
- alert: HostMetricsMissing
# This alert is applicable only when the provider is linked via an aggregator (such as grafana agent)
expr: absent(up)
for: 5m
labels:
severity: critical
annotations:
summary: Metrics not received from host '{{ $labels.instance }}'.
summary: Metrics not received from host '{{ $labels.instance }}', failed to remote write.
description: >-
Metrics not received from host '{{ $labels.instance }}'.
Metrics not received from host '{{ $labels.instance }}', failed to remote write.
VALUE = {{ $value }}
LABELS = {{ $labels }}
"""
Expand Down
6 changes: 3 additions & 3 deletions lib/charms/prometheus_k8s/v1/prometheus_remote_write.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@
groups:
- name: AggregatorHostHealth
rules:
- alert: HostUnavailable
- alert: HostMetricsMissing
expr: absent(up)
for: 5m
labels:
severity: critical
annotations:
summary: Metrics not received from host '{{ $labels.instance }}'.
summary: Metrics not received from host '{{ $labels.instance }}', failed to remote write.
description: >-
Metrics not received from host '{{ $labels.instance }}'.
Metrics not received from host '{{ $labels.instance }}', failed to remote write.
VALUE = {{ $value }}
LABELS = {{ $labels }}
"""
Expand Down

0 comments on commit 48e9ce8

Please sign in to comment.