Bitzu

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

Single choice

How long does Managed Service for Prometheus keep metric data at no extra cost?

  1. 15 days
  2. 6 weeks
  3. 24 months
  4. 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.

Select all that apply

Which statements about Managed Service for Prometheus are correct?

  1. Managed collection is the recommended mode for Kubernetes
  2. Self-deployed collection replaces the upstream Prometheus binary
  3. Data can be queried with PromQL, for example from Grafana
  4. You must rewrite queries in MQL before using it
  5. 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.

True or false

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.

Download on the App StoreGet it on Google Play

More Associate Cloud Engineer topics in this module