PCA (Prometheus Certified Associate) sample exam question with answer 611
Question:
Which of the following PromQL expressions can be used to calculate the maximum value of a metric over a specified time range?
- max_over_time(metric_name[5m])
- max(metric_name[5m])
- topk(1, metric_name[5m])
- quantile(1, metric_name[5m])
Answer:
B - is the correct answer. The max function returns the maximum value of a metric over a specified time range
A - is incorrect answer. The max_over_time function returns the maximum value of a metric over a range of time intervals rather than a fixed interval
C - is incorrect answer. The topk function returns the top k values of a metric over a specified time range
D - is incorrect answer. The quantile function returns the specified quantile of a metric over a specified time range