Relative Content

Tag Archive for prometheusgrafana

Prometheus irate function gives 0 result after breaks in monotonicity

When using the irate function against a counter like so: irate(subtract_server_credits[$__rate_interval]) * 60 I’m receiving the expected result for the second set of data (pictured below in green). The reason for the gap is a container restart leaving some time where the target was being restarted.

Prometheus irate function gives 0 result after breaks in monotonicity

When using the irate function against a counter like so: irate(subtract_server_credits[$__rate_interval]) * 60 I’m receiving the expected result for the second set of data (pictured below in green). The reason for the gap is a container restart leaving some time where the target was being restarted.

Map Prometheus Datasource variable value and use it in a metric

I’m trying to run a metric to create a panel in a Grafana Dashboard based on the value of a datasource type variable. I created an “environment” variable that has the specific set of Prometheus datasources I want and within each panel/datasource, I need an specific value to be set in some metric query. For example:

Prometheus conditional metrics with variables in grafana

Let’s say I have a prometheus and a grafana.
The previous stack was a influx database.
A metric is named rabbitmq_queue_messages
With 2 environments, prod and preprod.
the queue is available in a metric label named “queue”