Relative Content

Tag Archive for prometheus

How to deal with prometheus old/stale metrics?

I have been following this example: https://medium.com/@letathenasleep/exposing-python-metrics-with-prometheus-c5c837c21e4d. So when i first send request to localhost:5000, the counter works perfect. But when i do send any request, it shows same value. Ideally it should be zero right ? even if we dont have any requests being sent?

Gauge function and counter function

I know that some functions are belong to gauge and some of them are for counter and we would get the wrong result if we don’t use them correctly.
I search in the net but i didn’t find any good result or resource for this.
I would appreciate if anyone can help me to find the good resource for finding out which functions we can use for gauges and which one for counter.

http_request_metric is not being exposed by our services

i have to list the most popular services based on the api calls made to them respectively . we use Prometheus as data source . but our services are not exposing http_requests_total metric. nor any metric which is related to it related to it . so how do we make our services ensure that it exposes this metric. unfortunately i dont have access to source code of our services our services are being discovered by promethus with the use of service monitors . we have our services running as microservices in AKS.