PCA (Prometheus Certified Associate) sample exam question with answer 581
Question:
Let cert_expiry be a gauge metric whose value is a Unix timestamp (epoch time) representing the time a given certificate will expire.
Assuming multiple certificates are being monitored, which of the following queries yields the expiration time as a Unix timestamp of the certificate that will expire FIRST?
- min(cert_expiry)
- cert_expiry
- max(cert_expiry)
- cert_expiry{format="unix"}
Answer:
A - is the correct answer. More at
time
B - is incorrect as this query will result in the expiration time of all certificate instances, not just the one that will expire first
C - is incorrect as this query will yield the expiration time of the certificate that will expire last, not first
D - is incorrect as there was no mention of a format label associated with the cert_expiry metric. Thus, this query would return no results