PCA (Prometheus Certified Associate) sample exam question with answer 585
Question:
Which of the following queries results in a range vector?
- timestamp(up)
- sum_over_time(up[5m])
- rate(up[5m])
- up[5m]
Answer:
D - is the correct answer. More at
expression-language-data-types
A - is incorrect as this query contains no range selector and thus cannot possibly result in a range vector
B - is incorrect. Though the query expression contains a range selector, the sum_over_time aggregates the range data to produce an instant vector
C - is incorrect. Though the query expression contains a range selector, the rate function ultimately returns an instant vector