PCA (Prometheus Certified Associate) sample exam question with answer 551
Question:
Which of the following PromQL expressions can be used to calculate the rate of change of a metric over a specified time range?
- rate(metric_name[5m])
- delta(metric_name[5m])
- changes(metric_name[5m])
- increase(metric_name[5m])
Answer:
A - is the correct answer. The rate function calculates the per-second rate of increase of a counter or gauge over a specified time range. The delta function calculates the difference between the current and previous value of a counter or gauge. The changes function counts the number of value changes of a gauge or counter over a specified time range. The increase function calculates the absolute increase of a counter over a specified time range