Skip to content

Commit 66431da

Browse files
Adapt vector alerts to work if grouped (#92)
When grouped, pod name is not available, so annotations with it will error and not appear. Ensure that a description and a dashboard is always available.
1 parent 53dd16e commit 66431da

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

common/logging.yaml.tmpl

+5-1
Original file line numberDiff line numberDiff line change
@@ -88,15 +88,19 @@ groups:
8888
annotations:
8989
summary: "Vector cannot talk to loki"
9090
description: "Vector's loki buffer is full, which means that it cannot talk to loki"
91+
pod: "{{ $labels.kubernetes_pod_name }}"
9192
impact: "Vector is not accepting new logs from it's input sources"
9293
action: "Check if loki is up and if vector can talk to it"
9394
dashboard: "https://grafana.$ENVIRONMENT.$PROVIDER.uw.systems/d/bdnuhz796molca/vector?var-pod={{ $labels.kubernetes_pod_name }}"
95+
dashboard-fallback: "https://grafana.$ENVIRONMENT.$PROVIDER.uw.systems/d/bdnuhz796molca/vector"
9496
- alert: VectorFailingToInput
9597
expr: rate(vector_component_received_events_total{component_kind="source",component_id!="vector_metrics"}[5m]) == 0
9698
for: 15m
9799
labels:
98100
team: infra
99101
annotations:
100102
summary: "Vector is not receiving logs"
101-
description: "{{ $labels.kubernetes_pod_name }} received no logs from {{ $labels.component_id }} for 15m"
103+
description: "Vector received no logs from {{ $labels.component_id }} for 15m"
104+
pod: "{{ $labels.kubernetes_pod_name }}"
102105
dashboard: "https://grafana.$ENVIRONMENT.$PROVIDER.uw.systems/d/bdnuhz796molca/vector?var-pod={{ $labels.kubernetes_pod_name }}"
106+
dashboard-fallback: "https://grafana.$ENVIRONMENT.$PROVIDER.uw.systems/d/bdnuhz796molca/vector"

0 commit comments

Comments
 (0)