Counter

This is a strictly cumulative metric whose value can only increase. The only exception for this rule is when the metric is reset, which brings it back to zero.

This is one of the most useful metric types because even if a scrape fails, you won't lose the cumulative increase in the data, which will be available on the next scrape. To be clear, in the case of a failed scrape, granularity would be lost as fewer points will be saved.

To help visualize this type of metric, here are some examples of counters and their graphical representation based on the test environment we created in the previous chapter:

  • The total number of packets received by the Prometheus instance:

  • The total number of bytes written to disk by the Grafana instance – notice the middle gap caused by an instance restart, forcing the counter to reset:
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.200.211