Sample questions
Question 1Easy
Which language is used to query Prometheus data?
- GraphQL
- SQL
- PromQL
- XPath
Answer: C. PromQL
Explanation
PromQL selects and aggregates time series, e.g. sum by (status) (rate(http_requests_total[5m])).
Step-by-step solution
- Prometheus has its own query language.
- It is called PromQL.
- Grafana uses it for Prometheus dashboards.
Why the other options are wrong
- A. GraphQL queries APIs.
- B. Prometheus does not use SQL.
- D. XPath queries XML.
Tip: Prometheus = PromQL.
Question 2Easy
What is Grafana mainly used for?
- Dashboards and visualisation of metrics and logs
- Scheduling Kubernetes Pods based on the CPU and memory metrics it collects from nodes
- Running CI pipelines
- Storing container images
Answer: A. Dashboards and visualisation of metrics and logs
Explanation
Grafana queries data sources like Prometheus and renders dashboards and alerts.
Step-by-step solution
- Grafana connects to data sources like Prometheus.
- It displays metrics and logs in easy-to-read formats.
- This helps users monitor system performance.
- It creates interactive dashboards for visualisation.
- The main purpose is to show data clearly.
Why the other options are wrong
- B. Pods are scheduled by the Kubernetes scheduler, not by Grafana, which only shows data.
- C. Grafana does not run CI pipelines; CI tools such as Jenkins or GitHub Actions do that.
- D. Grafana does not store images; a container registry such as Harbor or Docker Hub does.
Question 3Easy
Which data does Prometheus store?
- Full request bodies
- Container images
- Video files
- Numeric time series
Answer: D. Numeric time series
Explanation
Prometheus is a time-series database for numeric samples with labels.
Step-by-step solution
- Prometheus collects metrics over time.
- These metrics are numeric values with timestamps.
- It stores numeric time series data with labels.
- Full request bodies are not stored by Prometheus.
- Container images and video files are not relevant to Prometheus.
- Numeric time series is the correct answer.
Why the other options are wrong
- A. Prometheus stores numeric samples, not request bodies; it records metric values over time.
- B. Container images are stored in registries, not in Prometheus, which holds only time series data.
- C. Video files are outside what Prometheus is built for; it holds numeric samples with labels.
Tip: Remember: Prometheus stores numeric time series, not raw data or images.
Question 4Easy
What does Alertmanager do in a Prometheus setup?
- Groups, deduplicates and routes alerts to channels like email or chat
- Scrapes metrics from targets
- Draws dashboards
- Stores long-term metrics from many Prometheus servers for querying over several years
Answer: A. Groups, deduplicates and routes alerts to channels like email or chat
Explanation
Prometheus evaluates alert rules; Alertmanager handles notifications, silences and grouping.
Step-by-step solution
- Alertmanager handles notifications after alerts are triggered.
- It groups similar alerts to avoid duplicates.
- It routes alerts to channels like email or chat.
- It also manages silences to suppress repeated alerts.
- Final answer: Groups, deduplicates and routes alerts to channels like email or chat.
Why the other options are wrong
- B. Scraping metrics is Prometheus's own job; Alertmanager only receives alerts after they fire.
- C. Dashboards are drawn by Grafana, not Alertmanager.
- D. Long-term storage is the job of Thanos or Mimir, not Alertmanager.
Tip: Remember Alertmanager handles notifications, not data collection or storage.
Question 5Medium
What is an exporter in the Prometheus ecosystem?
- A backup tool for Prometheus data
- A process that exposes another system's stats as Prometheus metrics
- A script to delete old metrics
- A tool that exports Grafana dashboards to PDF files so they can be shared by email
Answer: B. A process that exposes another system's stats as Prometheus metrics
Explanation
For example, node_exporter exposes host CPU, memory and disk metrics.
Step-by-step solution
- An exporter sits beside a system that cannot expose Prometheus metrics itself.
- It converts that system's stats into the Prometheus format.
- Option B matches this. node_exporter for host metrics is one example.
Why the other options are wrong
- A. An exporter exposes metrics; it is not a backup tool.
- C. An exporter does not delete metrics.
- D. Exporting Grafana dashboards to PDF is a different tool.
Tip: Exporter = adapter that turns another system's stats into Prometheus metrics.
Question 6Medium
What does sum by (service) (rate(http_requests_total[5m])) return?
- Total requests across all time per service
- The number of services running
- A single number for the whole cluster
- Per-second request rate for each service
Answer: D. Per-second request rate for each service
Explanation
rate gives per-series rates; sum by (service) adds them up within each service label value.
Step-by-step solution
rate() gives per-second rates per series.sum by (service) aggregates over other labels.- The result is one rate per service.
Why the other options are wrong
- A. rate is not all-time total.
- B. It does not count services.
- C. by keeps service separate.
Tip: sum by = group.
Question 7Medium
In an alert rule, what does 'for: 5m' do?
- Sends the alert again every 5 minutes forever, until someone manually acknowledges it
- Deletes the alert after 5 minutes
- Fires only if the condition holds continuously for 5 minutes
- Scrapes every 5 minutes
Answer: C. Fires only if the condition holds continuously for 5 minutes
Explanation
The pending period filters out brief spikes and reduces noisy alerts.
Step-by-step solution
- 'for: 5m' means the condition must be true for at least 5 minutes.
- This ensures the alert is only triggered after a sustained issue.
- It avoids false alarms from short-term fluctuations.
- The alert fires only if the condition holds continuously for 5 minutes.
- Final answer: Fires only if the condition holds continuously for 5 minutes.
Why the other options are wrong
- A.
for: 5m does not repeat notifications; it only delays firing until the condition has held. - B. An alert rule does not delete its own alert; a cleared condition makes the alert resolve.
- D. Scrape frequency is set by scrape_interval in the scrape config, not by the for clause.
Tip: Use 'for' to avoid false alerts from short-term spikes.
Question 8Medium
Prometheus labels like {method="GET", status="500"} allow you to:
- Encrypt metrics
- Filter and aggregate one metric by dimensions
- Rename metrics automatically so that each team can use its own naming convention
- Store logs alongside metrics
Answer: B. Filter and aggregate one metric by dimensions
Explanation
Each label combination is a series, so keep label values bounded.
Step-by-step solution
- Labels add dimensions to metrics.
- They allow filtering and grouping by these dimensions.
- This lets you aggregate one metric across different dimensions.
- So labels help in filtering and aggregating one metric by dimensions.
- Final answer: Filter and aggregate one metric by dimensions.
Why the other options are wrong
- A. Labels are dimensions for querying, not encryption; labels do not encrypt metrics.
- C. Labels do not rename metrics automatically; each team's naming is set in the exporter, not by labels.
- D. Labels are tags on metric series, not a place for logs; logs need a separate system such as Loki.
Tip: Labels let you slice and dice metrics for analysis.
Question 9Hard
Why do teams add a long-term store (e.g. Thanos, Mimir) behind Prometheus?
- To make counters reset less often
- Prometheus cannot scrape Kubernetes workloads on its own, so a separate store must do it
- For long retention and a global view across many Prometheus servers
- To replace Grafana
Answer: C. For long retention and a global view across many Prometheus servers
Explanation
A single Prometheus keeps local data for a limited period; long-term stores add durability and federation.
Step-by-step solution
- Prometheus stores data locally but only keeps it for a short time.
- Long-term stores like Thanos or Mimir keep data permanently.
- They also allow viewing data across multiple Prometheus servers.
- This provides long retention and a global view of all data.
- Final answer: For long retention and a global view across many Prometheus servers.
Why the other options are wrong
- A. Counters reset on process restart; a long-term store does not change that.
- B. Prometheus does scrape Kubernetes workloads itself through service discovery; the long-term store is not needed for that.
- D. Grafana is a dashboard tool; Thanos and Mimir store data and do not replace it.
Tip: Use long-term stores for keeping data safe and accessible everywhere.
Question 10Hard
Why is the Pushgateway used for short-lived batch jobs?
- It replaces Alertmanager
- Pushgateway is faster than scraping, so it is recommended for every long-running service too
- Batch jobs cannot expose HTTP
- The job may end before Prometheus can scrape it, so it pushes results
Answer: D. The job may end before Prometheus can scrape it, so it pushes results
Explanation
The job pushes final metrics to the gateway, which Prometheus then scrapes; it is not meant for long-running services.
Step-by-step solution
- Pushgateway collects metrics from jobs.
- Jobs may stop before Prometheus scrapes them.
- So jobs push results to Pushgateway instead.
- This ensures metrics are not missed.
- The job may end before Prometheus can scrape it, so it pushes results.
Why the other options are wrong
- A. Alertmanager handles alert routing; Pushgateway does not replace it.
- B. Pushgateway is not faster than scraping, and it is not meant for long-running services.
- C. Batch jobs can expose HTTP, but they may exit first, so a scrape can miss them.
Tip: Use Pushgateway for jobs that finish fast to avoid missing metrics.
Practise all 19 questions free
The full question bank with timed practice, progress tracking and Vidya, your AI tutor. Free, no ads.
Open this topic in the app →