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.
sum without (worker) (irate(xxx_total[$__rate_interval]))
CodePudding user response: