PCA (Prometheus Certified Associate) sample exam question with answer 57
Question:
Given a metric http_requests_total with labels method and status_code, which of the following queries gives the current count of 500 status POST requests?
- http_requests_total{method=POST, status_code=500}
- http_requests_total{method="POST" status_code="500"}
- http_requests_total{method="POST", status_code="500"}
- http_requests_total[method="POST", status_code="500"]
Answer:
C - correct
A - label selector values must be surrounded in quotes
B - multiple label selectors must be separated by a comma
D - label selectors must be surrounded by curly brackets, not square brackets