News for hackers. Stuff that matters.
Re:Monitoring Cloudflare's edge network with Prometheus by boto3 on Monday September 25, 2017 @01:03AM (#15328190)
How do you handle aggregated metrics, e.g. request count? What does the instance (either server/container) expose at localhost:9001/metrics?
Re:Monitoring Cloudflare's edge network with Prometheus by foxylion on Monday September 25, 2017 @02:17AM (#15328411)
You would expose a counter with the total request count. Summing those up across all nodes known by Prometheus will give you the total amount of requests currently visible to monitoring. With "rate()" you could calculate the requests/second.

But yes it is possible to miss some requests if a node goes down without Prometheus collecting the latest stats.

But as the parent said, if you need such totals it might be better to store them persistently. Also I do not know a scenario where the total number of requests will trigger an alert.

Re:Monitoring Cloudflare's edge network with Prometheus by bbrazil on Tuesday September 26, 2017 @03:07AM (#15336773)
> But yes it is possible to miss some requests if a node goes down without Prometheus collecting the latest stats.

The rate() function allows for this, you'll get the right answer on average.

Re:Monitoring Cloudflare's edge network with Prometheus by jalk on Monday September 25, 2017 @02:15AM (#15328405)
The same way push based systems do it. Prom. scrapes the individual metrics off each instance and provides aggr. functions in the query lang.