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.
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 }}'"