Docsity

Prometheus Certified Associate Beta Exam Questions and Answers, Exams of Technology

Toggle sidebar
bg1
Prometheus Certified Associate Beta Exam
Question 1. Which of the following is a primary use case for Prometheus?
A) Log aggregation
B) Collecting and querying time-series metrics
C) Distributed tracing
D) Storing binary files
Answer: B
Explanation: Prometheus specializes in collecting and querying time-series metrics, making it a core tool
for monitoring and observability.
Question 2. In the context of observability, what are metrics primarily used for?
A) Storing raw event data
B) Capturing structured numerical measurements over time
C) Tracking request payloads
D) Recording detailed transaction logs
Answer: B
Explanation: Metrics are structured, numerical values collected over time to monitor system health and
performance.
Question 3. Which of these best characterizes logs in observability?
A) High-level numerical summaries
B) Low-cardinality time-series
C) Unstructured or semi-structured event records
D) Tracing distributed requests
Answer: C
Explanation: Logs are unstructured or semi-structured event records that provide detailed context about
system activity.
Question 4. Which observability pillar is most suited for understanding the flow of a request through
multiple services?
A) Metrics
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

Partial preview of the text

Download Prometheus Certified Associate Beta Exam Questions and Answers and more Exams Technology in PDF only on Docsity!

Question 1. Which of the following is a primary use case for Prometheus? A) Log aggregation B) Collecting and querying time-series metrics C) Distributed tracing D) Storing binary files Answer: B Explanation: Prometheus specializes in collecting and querying time-series metrics, making it a core tool for monitoring and observability. Question 2. In the context of observability, what are metrics primarily used for? A) Storing raw event data B) Capturing structured numerical measurements over time C) Tracking request payloads D) Recording detailed transaction logs Answer: B Explanation: Metrics are structured, numerical values collected over time to monitor system health and performance. Question 3. Which of these best characterizes logs in observability? A) High-level numerical summaries B) Low-cardinality time-series C) Unstructured or semi-structured event records D) Tracing distributed requests Answer: C Explanation: Logs are unstructured or semi-structured event records that provide detailed context about system activity. Question 4. Which observability pillar is most suited for understanding the flow of a request through multiple services? A) Metrics

B) Logs C) Traces D) Alerts Answer: C Explanation: Traces follow requests as they travel through different services, ideal for analyzing distributed systems. Question 5. Which model does Prometheus use for collecting metrics from targets? A) Push B) Pull C) Hybrid D) Manual Answer: B Explanation: Prometheus uses a pull model, scraping targets at regular intervals. Question 6. Why does Prometheus prefer the pull model over push for metric collection? A) Simplicity and service discovery integration B) Reduced network overhead C) Easier log analysis D) Better tracing support Answer: A Explanation: The pull model makes it simple to discover new targets and control scraping schedules. Question 7. What is the primary purpose of the Pushgateway in Prometheus? A) Collect logs from ephemeral jobs B) Push trace data to Prometheus C) Allow ephemeral or batch jobs to push metrics D) Replace Alertmanager Answer: C

B) prometheus.conf C) scrape_rules.yml D) targets.yml Answer: A Explanation: prometheus.yml is the main configuration file for Prometheus, including scrape jobs. Question 12. What is the default port for Prometheus metrics exposition? A) 8080 B) 9090 C) 9100 D) 8000 Answer: B Explanation: The default port for the Prometheus server is 9090. Question 13. Which Prometheus component is responsible for sending notifications when alerts fire? A) PromQL B) Alertmanager C) Pushgateway D) Node exporter Answer: B Explanation: Alertmanager manages alert notifications for Prometheus. Question 14. What is the primary function of Prometheus exporters? A) Store time-series data B) Translate metrics from third-party systems into Prometheus format C) Send logs to Alertmanager D) Manage scrape configurations Answer: B Explanation: Exporters translate metrics from other systems into a format Prometheus can ingest.

Question 15. What is a label in Prometheus? A) A notification endpoint B) A key-value pair attached to a metric C) A binary operator D) A service discovery method Answer: B Explanation: Labels are key-value pairs that provide context and help uniquely identify metrics. Question 16. Why are labels important in the Prometheus data model? A) They define scrape intervals B) They enable flexible filtering and aggregation of metrics C) They store binary files D) They control alert delivery Answer: B Explanation: Labels enable powerful querying and aggregation capabilities in Prometheus. Question 17. Which of the following is NOT a valid Prometheus metric type? A) Counter B) Gauge C) Histogram D) Log Answer: D Explanation: Prometheus supports counters, gauges, histograms, and summaries, but not logs as a metric type. Question 18. What is a counter in Prometheus? A) A metric that can increase or decrease B) A metric that only increases

Question 22. What is the purpose of the “help” line in a Prometheus exposition format? A) Provides a metric’s type B) Describes the metric’s purpose C) Gives the metric’s value D) Specifies scrape intervals Answer: B Explanation: The "HELP" line provides a human-readable description of the metric. Question 23. Which of these is a valid Prometheus metric name? A) my-metric.value B) my_metric_total C) 123metric D) metric value Answer: B Explanation: Prometheus metric names must match the regex [a-zA-Z_:][a-zA-Z0-9_:]*; underscores are commonly used. Question 24. How does Prometheus store its time-series data by default? A) SQL database B) In-memory only C) Local disk using a custom time-series database D) Distributed NoSQL system Answer: C Explanation: Prometheus uses a custom time-series database stored on local disk. Question 25. What limitation does a single Prometheus server have? A) Cannot scrape exporters B) Does not support remote write C) Cannot horizontally scale for high cardinality or long-term storage

D) Cannot use labels Answer: C Explanation: A single Prometheus server is not horizontally scalable and is limited in long-term storage. Question 26. Which feature helps Prometheus overcome long-term storage limitations? A) Alertmanager B) Remote write C) Exporters D) Node exporter Answer: B Explanation: Remote write allows Prometheus to send data to external long-term storage. Question 27. What is Prometheus federation? A) Horizontal sharding of queries B) Aggregating and querying metrics from multiple Prometheus servers C) Exporting logs to a central system D) Sending alerts to multiple endpoints Answer: B Explanation: Federation allows metrics to be aggregated from several Prometheus servers for central querying. Question 28. What is PromQL? A) A log query language B) A configuration file format C) Prometheus Query Language for selecting and aggregating time-series data D) An alerting rule syntax Answer: C Explanation: PromQL is Prometheus’s query language for metrics.

D) For instant vectors Answer: B Explanation: increase() calculates the total increase over the specified time range. Question 33. What does irate() provide compared to rate()? A) Instantaneous rate over the last two data points B) Total increase over time C) Aggregated sum D) Averages over multiple series Answer: A Explanation: irate() gives the per-second rate based only on the last two data points. Question 34. Which PromQL aggregation operator would you use to get the total number of requests across all instances? A) avg() B) sum() C) min() D) count() Answer: B Explanation: sum() aggregates by summing values across series. Question 35. How can you use by() in PromQL? A) To filter by metric type B) To group aggregation by label(s) C) To specify scrape targets D) To export metrics Answer: B Explanation: by() is used to group results by labels during aggregation.

Question 36. What does the following PromQL query do: sum(http_requests_total) by (job)? A) Sums requests for all jobs together B) Sums requests grouped by each job C) Filters only the "job" label D) Returns the minimum value for each job Answer: B Explanation: The query sums requests, grouping the results by job. Question 37. Which label matcher would select time series with label “method” equal to “GET”? A) {method=GET} B) {method="GET"} C) [method:GET] D) (method="GET") Answer: B Explanation: Label values in PromQL must be enclosed in double quotes. Question 38. What does the “on()” keyword do in binary operators? A) Ignores specific labels B) Specifies which labels to match for the operation C) Filters time ranges D) Sets scrape intervals Answer: B Explanation: on() limits which labels must match for binary vector operations. Question 39. What does the “ignoring()” keyword do in PromQL binary operations? A) Ignores certain labels when matching series B) Selects only certain metrics C) Changes metric types D) Ignores alert rules

B) A measurable characteristic of service performance C) A metric endpoint D) An alert notification Answer: B Explanation: An SLI is a quantifiable measure of some aspect of service performance. Question 44. What is a Service Level Objective (SLO)? A) A promise to the customer B) A target value for a Service Level Indicator C) The same as an SLI D) The result of a query Answer: B Explanation: An SLO is a target or goal for an SLI, such as “99.9% availability”. Question 45. What is a Service Level Agreement (SLA)? A) A metric type B) A legal or formal contract specifying agreed SLOs C) A type of exporter D) A Prometheus alert Answer: B Explanation: An SLA is a contract that includes SLOs and the consequences of not meeting them. Question 46. What does the Prometheus “scrape_interval” specify? A) The port to scrape B) The frequency at which targets are scraped C) The number of labels to use D) The number of alerts to send Answer: B Explanation: scrape_interval sets how often Prometheus scrapes a target.

Question 47. Which field in prometheus.yml specifies the list of endpoints to be scraped? A) alert_rules B) targets C) static_configs D) endpoints Answer: C Explanation: static_configs is used to define static target endpoints. Question 48. How does Prometheus handle missing time series data? A) Fills with zero B) Leaves gaps (missing values) C) Extrapolates values D) Deletes all previous data Answer: B Explanation: Prometheus leaves gaps in the time series if no data is collected. Question 49. Which Prometheus component is responsible for evaluating alert rules? A) Alertmanager B) Prometheus server C) Pushgateway D) Exporter Answer: B Explanation: The Prometheus server evaluates alert rules and sends firing alerts to Alertmanager. Question 50. What happens if a Prometheus scrape target is temporarily unavailable? A) Prometheus stops collecting all metrics B) Prometheus retries on the next scheduled interval C) Prometheus deletes the target

A) Writes metrics to long-term storage systems B) Exposes metrics for scraping C) Manages alerting rules D) Configures exporters Answer: A Explanation: remote_write allows Prometheus to send metrics to remote storage. Question 55. Which Prometheus exporter is commonly used to collect system metrics (CPU, memory, disk)? A) Blackbox exporter B) Node exporter C) Pushgateway D) Alertmanager Answer: B Explanation: Node exporter collects system-level metrics. Question 56. What would you use the Blackbox exporter for? A) Exporting logs B) Probing endpoints via HTTP, TCP, ICMP, etc. C) Exporting Docker metrics D) Sending alerts Answer: B Explanation: Blackbox exporter probes endpoints for availability and response times. Question 57. Which Prometheus metric type would best represent the current number of active sessions? A) Counter B) Gauge C) Histogram

D) Summary Answer: B Explanation: Gauges represent values that can go up and down, like session counts. Question 58. Which Prometheus function would you use to count the number of time series in a vector? A) sum() B) count() C) avg() D) max() Answer: B Explanation: count() returns the number of elements in a vector. Question 59. Which PromQL query would return the average CPU usage per instance? A) sum(cpu_usage) by (instance) B) avg(cpu_usage) by (instance) C) count(cpu_usage) D) min(cpu_usage) Answer: B Explanation: avg() calculates the mean value per instance. Question 60. Which PromQL aggregation would you use to find the highest observed value in each group? A) sum() B) max() C) avg() D) count() Answer: B Explanation: max() finds the highest value within each group.

Answer: A Explanation: Histogram buckets can be aggregated across instances, summaries cannot. Question 65. What happens to a Prometheus counter when a process restarts? A) It continues increasing B) It resets to zero C) It decreases D) It becomes a gauge Answer: B Explanation: Counters reset to zero when the process restarts. Question 66. Which PromQL operator is used to match regular expressions on label values? A) = B) != C) =~ D) !~ Answer: C Explanation: =~ matches label values against a regular expression. Question 67. Which of the following is a correct example of a PromQL regular expression filter? A) {method=/GET|POST/} B) {method="GET|POST"} C) {method="GET|POST"} D) {method="GET"|"POST"} Answer: A Explanation: =~ is used for regex matching in PromQL label filters. Question 68. What does the “vector matching” concept in PromQL refer to? A) Matching vectors by value

B) Matching series for binary operations based on label sets C) Matching metric types D) Matching exporters Answer: B Explanation: Vector matching determines which time series are paired for binary operations. Question 69. What is an “instant vector” in PromQL? A) A vector of values over time B) A single value at a single point in time for each series C) A log entry D) A binary operator Answer: B Explanation: An instant vector is a set of time series with one value per series at a single timestamp. Question 70. What is a “range vector” in PromQL? A) A set of metrics B) A set of time series, each containing a range of data points over time C) A single value D) A label filter Answer: B Explanation: A range vector consists of series with multiple sample values over a time window. Question 71. How would you calculate the error rate percentage of HTTP requests in PromQL? A) sum(http_requests_total{status="500"}) / sum(http_requests_total) * 100 B) sum(http_requests_total{status="200"}) / sum(http_requests_total) * 100 C) avg(http_requests_total{status="500"}) D) count(http_requests_total) Answer: A Explanation: Divide the number of errors by the total requests and multiply by 100 for percentage.