PCA (Prometheus Certified Associate) sample exam question with answer 366
Question:
Given the following two time series, and assuming a scrape interval of 1m , what is the result of the query given below?
Series:
up{job="node", instance="node1"} 0 1 1 0 1
up{job="node", instance="node2"} 1 0 1 1 1
Query: avg_over_time(up{job="node"}[5m])
{job="node"} 0.7
{job="node"} 0.5 0.5 1 0.5 1
{job="node", instance="node1"} 0.6
{job="node", instance="node2"} 0.8
up{job="node"} 0.5 0.5 1 0.5 1
Answer:
C - is the correct answer. More at
aggregation_over_time
A - is incorrect as temporal aggregations act over time on each individual input time series, producing the same number of results as inputs
B, D - is incorrect as temporal aggregations act over time on each individual input time series, producing the same number of results as input series. Additionally, temporal aggregations aggregate the over time data to produce a singular value for each input series. They will never produce multiple values for a single series