Correction...
I meant:
* instance: "{{ $labels.instance}}"*
On Wednesday, October 21, 2020 at 10:31:54 AM UTC-3 Jhanssen Fávaro wrote:
>
> 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
>
>
--
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/f518bbaf-2e99-4962-89da-e5c39244ab00n%40googlegroups.com.