Hi folks,
I am brand new in prometheus world, and I have an understanding/basic question:
Why from a rule file I can not retrieve the {{ $labels.instance }} variable ?
Sample Kafka Alert:
- alert: Under_Replicated_Partition_Count
expr: sum(kafka_server_replicamanager_underreplicatedpartitions) by(env) > 0
for: 1m
labels:
severity: critical
oid: "1.3.6.1.4.1.XXXX.15.1.2.3.1"
instance: "{{ $labels.service_name }}"
annotations:
summary: 'Kafka {{ $labels.service_name }}: {{ $value }} under replicated partitons'
description: 'Under-replicated partitions means that one or more replicas are not available. This is usually because a broker is down. Restart the broker, and check for errors in the logs.'
This bold line is same as anything... I've tried already in the annotation/description section, also but no look..
Any ideas or how wold I managed to get this done ?
Best regards!
Jhanssen