Hi,
I have set external labels as below in my Prometheus configuration.
externalLabels:
deployment_env: dev
org_id: myOrganization
...
and in my rules.yaml I am trying to access external labels like below.
- alert: ClusterCapacityWarning
annotations:
summary: "Available capacity of cluster on {{
$externalLabels.deployment_env }} is Low."
description: "Capacity of cluster {{ $externalLabels.org_id }} is less than
20%."
expr: |
(cluster_resource_capacity_available < 20)
for: 5m
labels:
severity: warning
but doing above I get the error *function externalLabels.deployment_env not
found*
what am I doing wrong? Have anyone been in a similar situation before?
Even in Prometheus docs states that *The configured external labels can be
accessed via the $externalLabels variable.*
Thanks
--
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/5564e9e3-d49a-4af7-b7fa-074a81036382%40googlegroups.com.