0
votes

I have a dashboard in Grafana that I will use to monitor a Kafka instance. I can get the metrics using Prometheus.

The metric is called active controller count and It is very important to monitor Kafka.

I got what I want using the metric kafka_controller_kafkacontroller_activecontrollercount_value{job="kubernetes-service-endpoints"}

enter image description here

In any moment only one of the 3 metrics must be equal 1 and the other two must be equal 0.

How can I make an alert that fires when the condition above is not satisfied?

I tried the following but with no success:

enter image description here

1

1 Answers

0
votes

Solved. I used the sum function:

enter image description here

An alert will fire if the sum is not equal 1.

enter image description here