PCA Promql Practice Question
Which regular expression matcher selects all time series where the status label begins with the digit 5?
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
✓
http_requests_total{status=~"^5.*"}
The =~ operator combined with a regular expression starting with ^5 matches labels beginning with 5.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
http_requests_total{status=@"5*"}
Why it's wrong here
The @ modifier is used for native histogram timestamp adjustments, not matching.
- ✓
http_requests_total{status=~"^5.*"}
Why this is correct
Correct. The regex ^5.* matches any string starting with 5.
- ✗
http_requests_total{status=^"5"}
Why it's wrong here
The syntax =^ is invalid in PromQL.
- ✗
http_requests_total{status=~"5$"}
Why it's wrong here
The $ anchor matches the end of the string, so 5$ would match strings ending with 5.
About these practice questions
This PCA question is part of Courseiva's 304-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. 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.