PCA Promql Practice Question
A Prometheus alert expression uses rate(http_requests_total[5m]) > 10. During a service restart, counter resets occur. How does the rate() function account for these counter resets?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
It assumes the counter reset to zero and adds the new value to the previous value.
The rate() function automatically detects decreases in counter values (resets) and adjusts the calculation assuming the counter restarted at zero.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
It treats the negative difference as an error and returns 0 for the entire range.
Why it's wrong here
It does not return 0 for the entire range due to a single reset.
- ✗
It adds a fixed offset value configured in Prometheus global settings.
Why it's wrong here
There is no global offset setting for counter resets in Prometheus.
- ✓
It assumes the counter reset to zero and adds the new value to the previous value.
Why this is correct
Correct. rate() detects drops and handles them by assuming a reset to 0.
- ✗
It drops the samples surrounding the reset, resulting in a null value for that evaluation.
Why it's wrong here
It does not drop samples; it actively compensates for the reset.
About these practice questions
One of 304 original PCA practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed August 2026 · checked against the official CNCF / Linux Foundation exam blueprint
This PCA practice question is part of Courseiva's free CNCF / Linux Foundation certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PCA exam.