Home > Blockchain >  Grafana merge multiple counters values into one graph
Grafana merge multiple counters values into one graph

Time:11-30

I try to find a way to create an user counter with Prometheus and Grafana for my Flak app..

The Flask app run as wsgi with multiple workers and is also scaled via ngninx (docker scale). Because of this I create a counter with different labels. Where the labels is the hostname of the docker container.

The challenge that I now have is how to combine all of those counters into a single graph in Grafana.

In this example I have two processes with one having 5 and the other having 2 invokes. Instead of having to two graphs I would like to see only one with having a final value of 7.

I tried to use sum for all values but that did not give me the desired graph.

Also tried sum_over_time with sum but values are also not correct.

Using a sum without does also not solve it for me.

enter image description here

sum

enter image description here

enter image description here

sum without (worker) (irate(xxx_total[$__rate_interval])) enter image description here

CodePudding user response:

You have to use enter image description here

  • Related