Associate Cloud Engineer ยท Monitoring and alerting
Managed Service for Prometheus
Managed collection on GKE (PodMonitoring), self-deployed collection, querying with PromQL, why it exists.
Key points
- A Prometheus-compatible service that stores metrics in Cloud Monitoring (24 months retention) and is queried with PromQL, for example from Grafana.
- On GKE, managed collection scrapes targets using PodMonitoring or ClusterPodMonitoring resources; self-deployed collection is a drop-in replacement for the Prometheus binary that you run yourself.
Source: https://docs.cloud.google.com/stackdriver/docs/managed-prometheus
Practice questions
How long does Managed Service for Prometheus keep metric data at no extra cost?
- 15 days
- 6 weeks
- 24 months
- Only while the cluster exists
Show answer
Answer: C. 24 months
Data is retained for 24 months, full granularity for the first week and then downsampled.
Which statements about Managed Service for Prometheus are correct?
- Managed collection is the recommended mode for Kubernetes
- Self-deployed collection replaces the upstream Prometheus binary
- Data can be queried with PromQL, for example from Grafana
- You must rewrite queries in MQL before using it
- A PodMonitoring scrapes pods in every namespace
Show answer
Answer: A. Managed collection is the recommended mode for Kubernetes, B. Self-deployed collection replaces the upstream Prometheus binary, C. Data can be queried with PromQL, for example from Grafana
Managed collection is the recommended approach on Kubernetes, self-deployed is a drop-in for upstream Prometheus, and PromQL works from tools such as Grafana. PodMonitoring is namespace-scoped, and no MQL migration is needed.
Once managed collection is enabled on a cluster, it starts scraping every pod's metrics automatically.
Show answer
Answer: False
False. The components run, but nothing is collected until a PodMonitoring or ClusterPodMonitoring resource (or a managed metrics package) exists.
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.
