Hello!
Let's take alert example from from official doc:
# Alert for any instance that is unreachable for >5 minutes.
- alert: InstanceDown
expr: up == 0
for: 5m
labels:
severity: page
annotations:
summary: "Instance {{ $labels.instance }} down"
description: "{{ $labels.instance }} of job {{ $labels.job }} has been
down for more than 5 minutes."
Is it possible to get value from "for" clause (in this case ti will be
"5m") so we can use it further in annotation section?
For exaple let's call it {{ $for_duraton }} :
description: "{{ $labels.instance }} of job {{ $labels.job }} has been down for
more than *{{ $for_duration }}.*"
--
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/d2c1b26b-d242-4b49-9e9d-d9015352cccao%40googlegroups.com.