PCA (Prometheus Certified Associate) sample exam question with answer 231
Question:
Let http_requests_total be a counter metric representing the number of HTTP requests a server has handled.
Which of the following queries yields the current number of requests specified by the counter?
- last(http_requests_total)
- http_requests_total
- count(http_requests_total)
- current(http_requests_total)
Answer:
B - correct answer, check more at
querying basics
A, D - there is no such function or operator in PromQL called last and current
C - is incorrect as this query yields the current number of time series with that metric name, not the value held by the metric itself