There are four standard types of metric in Prometheus instrumentation: Gauge, Counter, Summary and Histogram. Today we’ll have look at the principles around Counters, and how Prometheus differs from other monitoring systems.
It’s a best practice with Prometheus that target labels should be constant over a target’s entire lifetime. On the other hand it’s useful to aggregate metrics across all the machines that are currently Apache servers. How can we do that?
It’s easy to get carried away by the power of labels with Prometheus. In the extreme this can overload your Prometheus server, such as if you create a time series for each of hundreds of thousands of users. Thankfully there’s a way to deal with this without having to turn off monitoring or deploy a new version of your code.