What is a difference between a counter and a gauge?
A.
Counters change value on each scrape and gauges remain static.
B.
Counters and gauges are different names for the same thing.
C.
Counters have no labels while gauges can have many labels.
D.
Counters are only incremented, while gauges can go up and down.
The Answer Is:
D
This question includes an explanation.
Explanation:
The key difference between acounterand agaugein Prometheus lies in how their values change over time. Acounteris a cumulative metric thatonly increases—it resets to zero only when the process restarts. Counters are typically used for metrics like total requests served, bytes processed, or errors encountered. You can derive rates of change from counters using functions like rate() or increase() in PromQL.
Agauge, on the other hand, represents a metric that cango up and down. It measures values that fluctuate, such as CPU usage, memory consumption, temperature, or active session counts. Gauges provide a snapshot of current state rather than a cumulative total.
This distinction ensures proper interpretation of time-series trends and prevents misrepresentation of one-time or fluctuating values as cumulative metrics.
[References:Extracted and verified from Prometheus official documentation –Metric Typessection explainingCountersandGaugesdefinitions and usage examples., , ]
PCA PDF/Engine
Printable Format
Value of Money
100% Pass Assurance
Verified Answers
Researched by Industry Experts
Based on Real Exams Scenarios
100% Real Questions
Get 75% Discount on All Products,
Use Coupon: "ac75sure"