PCA (Prometheus Certified Associate) sample exam question with answer 484
Question:
Which of the following is a correct PromQL query to get the total count of HTTP 500 error responses over the last 24 hours?
- sum(http_responses_total{code="500"})
- count(http_responses_total{code="500"})
- http_responses_total{code="500"} | count
- http_responses_total{code="500"} > sum_over_time[1d]
Answer:
A - is the correct answer. To get the total count of HTTP 500 error responses over the last 24 hours, we need to use the sum function to add up all the individual counter values for the HTTP 500 error responses over the last 24 hours