PCA (Prometheus Certified Associate) sample exam question with answer 254
Question:
The metric http_errors_total{code=”404”} tracks the number of 404 errors a web server has seen.
Which query returns what is the average rate of 404s a server has seen for the past 2 hours? Use a 2m sample range and a query interval of 1m
- avg_over_time(rate(http_errors_total{code=”404”}[2m]) [1m:2h])
- avg_over_time(rate(http_errors_total{code=”404”}[2m]) [2h:1m])
- avg_over_time(rate(http_errors_total{code=”404”}[2m])) [2h:1m]
- avg_over_time(rate(http_errors_total{code=”404”}[2h]))
Answer:
B - correct answer