Hello Community,
I have rules file created for alerts, and i want to defined global labels
for my rules. Is it possible?? I have not got much info about it in
Prometheus docs.
Below is my rules file:
groups:
- name: ContainerAlerts
rules:
- alert: ContainerKilled
expr: (sum by(name, instance) (time() - container_last_seen{id!="/"}))
> 30
for: 10s
labels:
datacenter: DC:Test
severity: warning
annotations:
summary: "Container killed (instance {{ $labels.instance }})"
description: "Container '{{ $labels.name }}' has disappeared from '{{
humanizeDuration $value }}' seconds on Node_ID: '{{ $labels.instance }}'"
--
You received this message because you are subscribed to the Google Groups
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-users/43574fff-216e-4b74-baaf-17ab29f2d181n%40googlegroups.com.