Docsity

Prometheus Certified Associate Certification Review Guide [PCA], Exams of Technology

Toggle sidebar
bg1
Prometheus Certified Associate Certification Review
Guide [PCA]
**Question 1.** Which pillar of observability primarily deals with numeric measurements over time?
A) Logging
B) Tracing
C) Metrics
D) Debugging
**Answer:** C
**Explanation:** Metrics are the quantitative data points collected over time, forming the core of
the observability pillar focused on numeric measurements.
**Question 2.** In the context of monitoring, what distinguishes white‑box monitoring from
black‑box monitoring?
A) White‑box uses external probes, black‑box uses internal instrumentation.
B) White‑box accesses internal metrics/logs, black‑box tests external behavior.
C) White‑box only works with cloud services, black‑box only works on‑prem.
D) There is no difference; they are synonyms.
**Answer:** B
**Explanation:** White‑box monitoring leverages internal telemetry (logs, metrics) while black‑box
monitoring observes the system from the outside, checking availability, latency, etc.
**Question 3.** Which of the following is NOT one of the “Golden Signals” used for service health?
A) Latency
B) Traffic
C) Errors
D) Throughput
**Answer:** D
**Explanation:** The Golden Signals are Latency, Traffic, Errors, and Saturation. Throughput is
related to traffic but is not a distinct signal.
**Question 4.** What is the main advantage of Prometheus’ pull‑based model over a push‑based
model?
A) It eliminates the need for exporters.
B) It automatically discovers targets without configuration.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49

Partial preview of the text

Download Prometheus Certified Associate Certification Review Guide [PCA] and more Exams Technology in PDF only on Docsity!

Guide [PCA]

Question 1. Which pillar of observability primarily deals with numeric measurements over time? A) Logging B) Tracing C) Metrics D) Debugging Answer: C Explanation: Metrics are the quantitative data points collected over time, forming the core of the observability pillar focused on numeric measurements. Question 2. In the context of monitoring, what distinguishes white‑box monitoring from black‑box monitoring? A) White‑box uses external probes, black‑box uses internal instrumentation. B) White‑box accesses internal metrics/logs, black‑box tests external behavior. C) White‑box only works with cloud services, black‑box only works on‑prem. D) There is no difference; they are synonyms. Answer: B Explanation: White‑box monitoring leverages internal telemetry (logs, metrics) while black‑box monitoring observes the system from the outside, checking availability, latency, etc. Question 3. Which of the following is NOT one of the “Golden Signals” used for service health? A) Latency B) Traffic C) Errors D) Throughput Answer: D Explanation: The Golden Signals are Latency, Traffic, Errors, and Saturation. Throughput is related to traffic but is not a distinct signal. Question 4. What is the main advantage of Prometheus’ pull‑based model over a push‑based model? A) It eliminates the need for exporters. B) It automatically discovers targets without configuration.

Guide [PCA]

C) It enables Prometheus to control scrape timing and handle back‑pressure. D) It provides built‑in alert suppression. Answer: C Explanation: In pull mode, Prometheus decides when to scrape, avoiding overwhelming targets and allowing better handling of transient failures. Question 5. An SLI is best described as: A) A contractual penalty for missed SLAs. B) A measurable indicator of a service’s performance. C) The total number of users of a service. D) A configuration file for Prometheus. Answer: B Explanation: Service Level Indicator (SLI) is a quantitative metric that reflects a specific aspect of service performance, used to evaluate SLOs/SLAs. Question 6. Which component in the Prometheus ecosystem is responsible for sending notifications based on alert rules? A) Exporter B) Pushgateway C) Alertmanager D) Thanos Answer: C Explanation: Alertmanager receives alerts from Prometheus, groups, silences, and routes them to configured receivers. Question 7. In Prometheus terminology, what does a “job” represent? A) A single data point. B) A set of targets sharing a common label. C) The background process that stores data. D) The configuration file for Alertmanager. Answer: B

Guide [PCA]

A) range vector B) instant vector C) subquery D) matrix selector Answer: B Explanation: An instant vector selects the latest sample at a single evaluation timestamp for each series. Question 12. What does the PromQL function rate(http_requests_total[5m]) compute? A) Total number of requests over the last 5 minutes. B) Per‑second average increase of the counter over the last 5 minutes. C) Percentage of successful requests. D) Maximum request latency. Answer: B Explanation: rate calculates the per‑second average increase of a counter over the specified range vector. Question 13. Which PromQL operator would you use to combine two vectors and keep only series present in both? A) + B) * C) and D) or Answer: C Explanation: The and binary operator returns the intersection of two vectors, keeping series that exist in both. Question 14. Which of the following is a correct way to calculate the 95th percentile latency using a histogram? A) histogram_quantile(0.95, latency_seconds_bucket) B) quantile_over_time(0.95, latency_seconds[5m]) C) rate(latency_seconds_sum[5m]) / rate(latency_seconds_count[5m])

Guide [PCA]

D) sum(latency_seconds_bucket) Answer: A Explanation: histogram_quantile computes quantiles from histogram bucket data; 0.95 yields the 95th percentile. Question 15. What is the purpose of the Prometheus Pushgateway? A) To store long‑term metrics. B) To collect metrics from short‑lived batch jobs that cannot be scraped. C) To replace exporters for all services. D) To provide a UI for query debugging. Answer: B Explanation: Pushgateway enables batch jobs to push metrics when they finish, since Prometheus cannot scrape them directly. Question 16. Which relabeling step occurs before a target is scraped? A) Metric relabeling B) Target relabeling C) Alert relabeling D) Storage relabeling Answer: B Explanation: Target relabeling modifies labels of a scrape target prior to the scrape operation. Question 17. In Alertmanager, what does “inhibition” achieve? A) It groups similar alerts together. B) It silences alerts based on time windows. C) It prevents lower‑severity alerts from firing when a higher‑severity one is active. D) It escalates alerts to on‑call engineers. Answer: C Explanation: Inhibition suppresses alerts that are covered by a more critical alert, reducing noise.

Guide [PCA]

B) Histograms expose bucket counts; Summaries expose quantiles directly. C) Histograms cannot be used for latency; Summaries can. D) There is no functional difference. Answer: B Explanation: Histograms store bucketed counts allowing server‑side quantile calculation, whereas Summaries calculate quantiles on the client side. Question 22. Which label is automatically added by Prometheus to every scraped metric? A) instance B) job C) __name__ D) Both A and B Answer: D Explanation: Prometheus adds job (the job name) and instance (target address) to each metric. Question 23. Which of the following is a correct PromQL expression to compute the error rate as a percentage? A) 100 * (rate(http_requests_total{status="500"}[5m]) / rate(http_requests_total[5m])) B) rate(http_requests_total{status="500"}[5m]) * 100 C) sum(rate(http_requests_total{status="500"}[5m])) D) avg_over_time(http_requests_total[5m]) Answer: A Explanation: The expression divides the rate of error responses by the total request rate and multiplies by 100 to get a percentage. Question 24. In Prometheus, what does the scrape_interval setting control? A) How often alerts are evaluated. B) The frequency at which targets are scraped for metrics. C) The time window for range queries. D) The retention period of data. Answer: B

Guide [PCA]

Explanation: scrape_interval defines the interval between successive scrapes of a target. Question 25. Which of the following exporters provides metrics about Kubernetes objects such as Deployments and Pods? A) node_exporter B) kube-state-metrics C) blackbox_exporter D) mysql_exporter Answer: B Explanation: kube-state-metrics exposes the state of Kubernetes objects, not the host or network metrics. Question 26. Which PromQL aggregation operator would you use to compute the per‑instance maximum CPU usage across all cores? A) sum by (instance) (cpu_usage_seconds_total) B) max by (instance) (cpu_usage_seconds_total) C) avg by (instance) (cpu_usage_seconds_total) D) count by (instance) (cpu_usage_seconds_total) Answer: B Explanation: max by (instance) returns the highest value among all series that share the same instance label. Question 27. What is the effect of setting honor_labels: true in a scrape configuration? A) Prometheus will overwrite target labels with its own. B) Prometheus will keep the labels sent by the target, ignoring relabeling that changes them. C) Prometheus will ignore all labels from the target. D) Prometheus will add a prometheus label to each metric. Answer: B Explanation: honor_labels: true tells Prometheus to keep the target’s labels as‑is, preventing the server from overriding them. Question 28. Which of the following best describes “federation” in Prometheus?

Guide [PCA]

Answer: B Explanation: node_exporter collects system‑level metrics such as CPU, memory, disk, and network statistics. Question 32. Which PromQL function would you use to calculate the per‑second increase of a counter over the last 10 minutes? A) increase(counter[10m]) B) rate(counter[10m]) C) delta(counter[10m]) D) predict_linear(counter[10m]) Answer: B Explanation: rate returns the per‑second average increase; increase returns the total increase, not per‑second. Question 33. In Alertmanager, a “silence” is best described as: A) A rule that groups alerts. B) A temporary mute of alerts matching a selector. C) A permanent suppression of a specific alert. D) A label added to alerts for routing. Answer: B Explanation: Silences mute alerts that match a given set of labels for a defined time window. Question 34. Which of the following storage back‑ends is NOT officially supported by Prometheus out‑of‑the‑box? A) Local TSDB B) Thanos sidecar C) Cassandra D) Remote write to InfluxDB Answer: C Explanation: Prometheus does not natively support Cassandra; Thanos and remote write integrations are officially supported.

Guide [PCA]

Question 35. Which PromQL construct allows you to select series that match a regular expression on a label value? A) {job="api"} B) {instance=~"^10\\.0\\..*"} C) {method!="GET"} D) {status=~"5[0-9]{2}"} Answer: B Explanation: The =~ operator applies a regex match on the label value. Question 36. What does the __name__ label represent in Prometheus? A) The name of the target instance. B) The metric’s original name. C) The job label. D) The exporter type. Answer: B Explanation: __name__ holds the metric’s identifier (e.g., http_requests_total). Question 37. Which of the following is a correct way to drop all metrics from a specific exporter using metric relabeling? A) metric_relabel_configs: - source_labels: [__name__] regex: ".*" action: drop B) metric_relabel_configs: - source_labels: [job] regex: "unwanted_exporter" action: drop C) metric_relabel_configs: - source_labels: [instance] regex: ".*" action: keep D) metric_relabel_configs: - source_labels: [__address__] regex: ".*" action: replace Answer: B Explanation: Dropping based on the job label (or any label identifying the exporter) removes those series before storage. Question 38. In a Prometheus query, what does the offset modifier do? A) Shifts the time range forward by the specified duration. B) Retrieves data from a previous point in time relative to now. C) Changes the aggregation window size.

Guide [PCA]

Question 42. Which Alertmanager routing configuration field defines the default receiver for alerts that do not match any other route? A) receiver: B) group_by: C) continue: D) match: Answer: A Explanation: The top‑level receiver field specifies where unmatched alerts are sent. Question 43. In a Prometheus rule file, what does the labels: section allow you to do? A) Define the scrape interval for the rule. B) Attach additional labels to alerts generated by the rule. C) Set the severity of the rule evaluation. D) Specify which Prometheus server should evaluate the rule. Answer: B Explanation: labels: adds custom key‑value pairs to the resulting alerts, useful for routing or severity. Question 44. Which of the following statements about the Prometheus remote_write feature is true? A) It replaces local storage entirely. B) It streams raw samples to an external endpoint in real time. C) It only works with Thanos. D) It is used for sending alerts to external systems. Answer: B Explanation: remote_write forwards each scraped sample to a remote storage system while retaining local TSDB data. Question 45. What is the primary purpose of the blackbox_exporter? A) To collect system metrics. B) To probe endpoints (HTTP, TCP, ICMP) and expose the results as metrics. C) To push metrics from batch jobs.

Guide [PCA]

D) To aggregate metrics from multiple Prometheus servers. Answer: B Explanation: The blackbox exporter performs active probing of services and reports up/down, latency, etc., as metrics. Question 46. Which PromQL function can be used to calculate the total increase of a counter over a 30‑minute window? A) rate(counter[30m]) * 1800 B) increase(counter[30m]) C) delta(counter[30m]) D) predict_linear(counter[30m], 1800) Answer: B Explanation: increase returns the total increment of a counter over the specified range. Question 47. In Prometheus, what does the __metrics_path__ label specify? A) The filesystem path where metrics are stored. B) The HTTP endpoint path that Prometheus should scrape on the target. C) The label used for metric renaming. D) The path to the Prometheus configuration file. Answer: B Explanation: __metrics_path__ overrides the default /metrics path for a particular scrape target. Question 48. Which of the following is a correct way to define a Prometheus scrape job that discovers targets via DNS SRV records? A) service_discovery: dns_srv B) dns_sd_configs: - names: ["_metrics._tcp.example.com"] C) dns_sd_configs: - names: ["example.com"] D) static_configs: - targets: ["example.com:9100"] Answer: B Explanation: dns_sd_configs with names pointing to SRV records enables DNS‑based service discovery.

Guide [PCA]

C) The average rate over the entire range vector. D) The predicted rate for the next interval. Answer: A Explanation: irate calculates the per‑second rate using only the latest two points, useful for bursty counters. Question 53. Which of the following is NOT a valid Prometheus label value character? A) Uppercase letters B) Digits C) Spaces D) Underscore Answer: C Explanation: Label values may contain letters, digits, and underscores but not spaces. Question 54. What is the purpose of the --web.enable-admin-api flag when starting Prometheus? A) To allow remote write of metrics. B) To enable the administrative HTTP API (e.g., to delete data). C) To expose the PromQL query endpoint. D) To enable TLS for the web UI. Answer: B Explanation: This flag activates the admin API, which includes endpoints for data deletion and snapshot creation. Question 55. Which Prometheus component is responsible for aggregating alerts before sending them to a notification channel? A) Exporter B) Alertmanager C) Prometheus Server D) Pushgateway Answer: B Explanation: Alertmanager groups, silences, and routes alerts to the configured receivers.

Guide [PCA]

Question 56. In a PromQL query, what does sum without (instance)(http_requests_total) do? A) Sums the metric across all instances, dropping the instance label from the result. B) Sums only the series that lack the instance label. C) Returns the sum per individual instance. D) Removes the instance label before performing the sum across remaining dimensions. Answer: D Explanation: without (instance) tells Prometheus to ignore the instance label when grouping, effectively aggregating across all instances. Question 57. Which of the following best describes the role of a “scrape target” in Prometheus? A) A remote storage system for long‑term data. B) An HTTP endpoint that exposes metrics for Prometheus to collect. C) A rule that defines alert thresholds. D) A configuration file for Alertmanager. Answer: B Explanation: A scrape target is the URL (usually /metrics) that Prometheus polls to retrieve metric data. Question 58. What does the promtool check rules command validate? A) Syntax and semantics of Prometheus alerting and recording rules. B) Connectivity to scrape targets. C) Correctness of Grafana dashboards. D) TLS certificates for the web UI. Answer: A Explanation: promtool checks rule files for errors before they are loaded by Prometheus. Question 59. Which PromQL function would you use to compute the average per‑second rate of a counter over the last 2 minutes, ignoring any gaps in data? A) rate(counter[2m]) B) increase(counter[2m]) / 120

Guide [PCA]

Question 63. What is the effect of setting scrape_interval: 0s for a job? A) The job will be scraped continuously without pause. B) The job will never be scraped. C) The default global scrape interval is used. D) Prometheus will use the fastest possible interval based on target response time. Answer: B Explanation: An interval of zero disables scraping for that job. Question 64. Which PromQL function can be used to compute the derivative of a gauge (i.e., rate of change) over a range? A) deriv(gauge[5m]) B) rate(gauge[5m]) C) increase(gauge[5m]) D) delta(gauge[5m]) Answer: A Explanation: deriv returns the per‑second derivative of a gauge over the specified range. Question 65. In the Prometheus configuration, what does the static_configs block define? A) Targets discovered via DNS. B) Manually listed scrape targets. C) Exporter-specific settings. D) Remote write endpoints. Answer: B Explanation: static_configs lists explicit target URLs that Prometheus should scrape. Question 66. Which of the following is a valid use‑case for the Pushgateway? A) Exporting metrics from a long‑running web server. B) Collecting metrics from a nightly batch job that runs for a few seconds. C) Storing high‑resolution time series for a month. D) Serving as a remote read endpoint for Grafana.

Guide [PCA]

Answer: B Explanation: Pushgateway is intended for short‑lived jobs that cannot be scraped. Question 67. What does the alertmanager field group_wait specify? A) How long to wait before sending the first notification in a group. B) The maximum time an alert can stay pending. C) The interval between group evaluations. D) The timeout for contacting a receiver. Answer: A Explanation: group_wait defines the initial wait time before the first notification is sent for a newly formed group. Question 68. Which PromQL aggregation operator would you use to compute the 99th percentile across all instances of a histogram metric? A) quantile(0.99, sum by (le) (http_request_duration_seconds_bucket)) B) histogram_quantile(0.99, sum by (le) (http_request_duration_seconds_bucket)) C) percentile(0.99, http_request_duration_seconds_bucket) D) avg by (instance) (http_request_duration_seconds_bucket) Answer: B Explanation: histogram_quantile computes quantiles from histogram buckets; summing by le aggregates across instances. Question 69. Which of the following best describes “high availability” (HA) in a Prometheus deployment? A) Running multiple Prometheus servers in a master‑slave configuration with federation. B) Using a single Prometheus instance with large storage. C) Deploying Prometheus behind a load balancer without data replication. D) Enabling TLS for the web UI. Answer: A Explanation: HA is typically achieved by running multiple independent Prometheus servers that scrape the same targets and optionally federate for global queries.