Docsity

PROMETHEUS CERTIFIED ASSOCIATE (PCA) QUESTIONS, Exams of Information Technology

Toggle sidebar
bg1
Page 1 of 103
PROMETHEUS CERTIFIED ASSOCIATE (PCA) QUESTIONS WITH -
VERIFIED ANSWERS- GRADED A+ || RECENTLY RELEASED
Information Technology / DevOps / Systems Administration
Topic 1: Observability Concepts
Topic 2: Prometheus Fundamentals
Topic 3: PromQL
Topic 4: Instrumentation and Exporters
Topic 5: Alerting & Dashboarding
Topic 6: Scraping and Service Discovery
Topic 7: Prometheus Architecture and Data Flow
Topic 8: Metric Types and Best Practices
Topic 9: Troubleshooting and Performance
Topic 10: Enterprise and Production Considerations
Coverage:-
TOPIC 1: OBSERVABILITY CONCEPTS (18% of Exam)
Q1. A site reliability engineer is introducing observability practices to a
development team that has traditionally relied on application logs alone.
The engineer explains that observability encompasses multiple pillars
beyond logs. Which of the following correctly identifies the three pillars
of observability and their primary purposes in a cloud‑native
environment?
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
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Partial preview of the text

Download PROMETHEUS CERTIFIED ASSOCIATE (PCA) QUESTIONS and more Exams Information Technology in PDF only on Docsity!

PROMETHEUS CERTIFIED ASSOCIATE (PCA) QUESTIONS WITH -

VERIFIED ANSWERS- GRADED A+ || RECENTLY RELEASED

Information Technology / DevOps / Systems Administration Topic 1: Observability Concepts Topic 2: Prometheus Fundamentals Topic 3: PromQL Topic 4: Instrumentation and Exporters Topic 5: Alerting & Dashboarding Topic 6: Scraping and Service Discovery Topic 7: Prometheus Architecture and Data Flow Topic 8: Metric Types and Best Practices Topic 9: Troubleshooting and Performance Topic 10: Enterprise and Production Considerations Coverage:- TOPIC 1: OBSERVABILITY CONCEPTS (18% of Exam) Q1. A site reliability engineer is introducing observability practices to a development team that has traditionally relied on application logs alone. The engineer explains that observability encompasses multiple pillars beyond logs. Which of the following correctly identifies the three pillars of observability and their primary purposes in a cloud‑native environment?

A. Metrics, alerts, and dashboards – these are outputs of observability systems, not the core telemetry pillars. B. Performance, availability, and security – these are outcomes or concerns, not telemetry data types. C. CPU, memory, and network – these are infrastructure metrics, not the full observability picture. D. Metrics (numerical measurements over time), logs (timestamped discrete event records), and traces (request paths through distributed systems) – together they provide comprehensive observability. RATIONALE: The three pillars of observability are metrics, logs, and traces. Metrics provide quantitative system data, logs capture detailed events, and traces track requests across distributed systems. Alerts and dashboards are built from these telemetry types, not pillars themselves. Q2. A platform engineer is explaining the difference between monitoring and observability to a new team member. Which of the following statements most accurately captures this distinction? A. Monitoring is used only for infrastructure, while observability is used only for applications – both apply across the entire stack. B. Monitoring collects metrics, while observability collects logs and traces – each pillar can be used in both approaches. C. Monitoring is proactive and predictive, while observability is reactive and only helps after problems occur – this mischaracterises both. D. Monitoring answers "what is happening?" based on predefined metrics and thresholds, while observability answers "why is it

SLAs are formal agreements with clients defining expected service levels and consequences for breaches. Understanding these distinctions is fundamental to observability concepts. Q4. A developer is learning about the Prometheus data model and asks about the difference between a metric name and labels. Which of the following correctly describes how Prometheus structures its time‑series data? A. Metric names are optional, and labels are the primary identifier for all time series – metric names are required. B. Labels are global and apply to all metrics in a Prometheus instance – labels are per‑time‑series. C. A time series in Prometheus is uniquely identified by its metric name and a set of key‑value label pairs; metric names describe what is being measured, while labels provide dimensionality for filtering and aggregation. D. Metric names and labels are stored in separate databases and cannot be queried together – they are part of the same time‑series structure. RATIONALE: In Prometheus, every time series is uniquely identified by its metric name and its label set. Metric names describe the general feature being measured (e.g., http_requests_total), while labels add dimensionality (e.g., method="GET", status="200"). This enables powerful filtering and aggregation in PromQL.

Q5. A systems administrator is evaluating monitoring approaches and needs to understand the difference between push‑based and pull‑based metric collection. Which of the following correctly describes Prometheus's pull‑based model and its primary advantage? A. Prometheus uses a push‑based model where applications actively send metrics to the server – this describes the push model, not Prometheus. B. Prometheus supports only push‑based collection and cannot pull metrics from targets – this is incorrect. C. Prometheus uses a pull‑based model where the Prometheus server scrapes metrics from target endpoints at configured intervals; this provides better control over scrape timing, reduces single points of failure, and allows easy target discovery. D. Prometheus uses a hybrid model where some metrics are pushed and others are pulled depending on the metric type – Prometheus primarily uses pull. RATIONALE: Prometheus employs a pull‑based model where the server initiates scraping of metrics from targets. Advantages include better control over collection frequency, easier service discovery, and avoidance of single points of failure. The Pushgateway exists for short‑lived jobs that cannot be scraped. Q6. A DevOps engineer is setting up monitoring for a Kubernetes cluster and wants to understand how Prometheus discovers targets to scrape.

A. Metrics should be used for debugging application logic, while logs should be used for capacity planning – this reverses their typical uses. B. Metrics are best for tracking numerical system behaviour over time (e.g., request rates, error percentages, latency percentiles) and alerting, while logs are best for detailed event investigation, debugging, and understanding the context around specific incidents. C. Metrics and logs serve identical purposes and can be used interchangeably – they serve different purposes. D. Logs are always more valuable than metrics because they contain more detail – both are valuable for different purposes. RATIONALE: Metrics provide aggregated numerical data ideal for dashboards, alerting, and trend analysis. Logs provide detailed, unstructured or semi‑structured event records essential for debugging and understanding specific incidents. Both are pillars of observability and serve complementary roles. Q8. A developer is instrumenting their application and wants to understand the different metric types Prometheus supports. Which of the following correctly lists the four primary metric types in Prometheus? A. Gauge, Counter, Histogram, and Summary – these are the four core metric types. B. Counter, Gauge, Timer, and Meter – Timer and Meter are not Prometheus metric types.

C. Counter, Gauge, Histogram, and Graph – Graph is not a metric type. D. Integer, Float, String, and Boolean – these are data types, not metric types. RATIONALE: Prometheus supports four primary metric types: Counter (monotonically increasing), Gauge (can go up and down), Histogram (observations in buckets), and Summary (observations with quantiles). Understanding these types is fundamental to proper instrumentation. Q9. A site reliability engineer is setting up SLOs for a critical API service. The engineer defines an SLO that 95% of requests must complete in under 300ms. Which of the following would be the appropriate SLI to measure this SLO? A. The total number of requests received by the API – this measures volume, not latency. B. The average response time of all requests – averages can hide outliers; percentiles are better for SLOs. C. The percentage of requests with a latency under 300ms, calculated as (requests with latency < 300ms) / (total requests) – this directly measures the SLO target. D. The number of 500‑error responses – this measures error rate, not latency.

Q11. A systems administrator is deploying Prometheus for the first time and wants to understand the core components of the Prometheus architecture. Which of the following correctly describes the main components of a Prometheus monitoring system? A. Prometheus consists only of a single binary that handles everything – Prometheus has multiple components. B. The main components are the Prometheus server (which scrapes and stores metrics), exporters (which expose metrics from third‑party systems), Alertmanager (which handles alerts), and various service discovery mechanisms; optional components include Pushgateway and remote storage integrations. C. Prometheus requires Grafana to function and cannot operate without it – Grafana is optional for visualisation. D. Prometheus is a logging system that replaces ELK Stack – Prometheus is for metrics, not logs. RATIONALE: The Prometheus ecosystem includes the core server, exporters, Alertmanager, Pushgateway, and integrations with service discovery and remote storage. Grafana is a common visualisation tool but is not required for Prometheus to function. Q12. A DevOps engineer is configuring Prometheus and needs to understand the purpose of the scrape_interval and evaluation_interval parameters in the configuration file. Which of the following correctly describes these two parameters?

A. scrape_interval controls how often alerts are evaluated, while evaluation_interval controls how often metrics are collected – this reverses their purposes. B. scrape_interval defines how often Prometheus scrapes metrics from targets, while evaluation_interval defines how often Prometheus evaluates alerting and recording rules. C. Both parameters control the same behaviour and are interchangeable

  • they serve different purposes. D. scrape_interval is set per target, while evaluation_interval is global – both can be set globally and overridden. RATIONALE: scrape_interval controls the frequency of metric collection from targets. evaluation_interval controls how often Prometheus evaluates alerting and recording rules. Both are typically set in the global configuration and can be overridden. Q13. A developer is reviewing a Prometheus configuration file and sees the following block. What does this configuration do? yaml scrape_configs:
    • job_name: 'node' static_configs:

connection – the targets UI would show the target with an error state. D. Prometheus requires a restart after every configuration change – Prometheus reloads configurations without restart. RATIONALE: If a target is configured but not appearing, common causes include misconfiguration, network issues, or discovery problems. Prometheus can reload configurations without restart using SIGHUP or the /-/reload endpoint. Q15. A systems administrator is setting up Prometheus for the first time and wants to understand how Prometheus stores time‑series data. Which of the following correctly describes Prometheus's storage model? A. Prometheus stores all metrics in a relational database like PostgreSQL

  • Prometheus uses a custom TSDB. B. Prometheus stores metrics only in memory and loses all data on restart – Prometheus persists data to disk. C. Prometheus uses a custom time‑series database (TSDB) that stores data on disk in a highly efficient format, with data organised in blocks; it supports retention policies and can be configured for remote storage integration. D. Prometheus stores metrics as plain text files that can be read by any text editor – the storage format is binary and efficient.

RATIONALE: Prometheus includes a built‑in time‑series database that stores data efficiently on disk. Data is organised in blocks for efficient querying and retention. Remote storage integrations are available for long‑term retention. Q16. A DevOps engineer is configuring Prometheus to monitor multiple environments (development, staging, production) and wants to differentiate metrics from each environment. Which Prometheus feature should they use to achieve this? A. Different Prometheus servers for each environment – this is possible but not the primary method. B. Labels – adding an environment="production" label to metrics from each environment allows filtering and aggregation by environment in PromQL. C. Different metric names for each environment – this would create metric name proliferation. D. Separate configuration files for each environment – labels are the standard approach. RATIONALE: Labels are the primary mechanism for adding dimensionality to metrics. Adding an environment label to all metrics from a given environment enables powerful filtering and aggregation. This follows Prometheus best practices for labelling.

C. Kubernetes service discovery – Prometheus has native integration with Kubernetes API to discover pods, services, and endpoints automatically. D. DNS service discovery – this is less comprehensive than Kubernetes integration. RATIONALE: Prometheus provides native Kubernetes service discovery that integrates with the Kubernetes API. It can discover pods, services, endpoints, and ingresses automatically. This is the standard approach for monitoring Kubernetes workloads. Q19. A developer is configuring the Node Exporter to expose host metrics. Which of the following is true about the Node Exporter? A. The Node Exporter is a Prometheus server that collects metrics from multiple hosts – it is an exporter, not a server. B. The Node Exporter is a Prometheus exporter that runs on a host and exposes system metrics (CPU, memory, disk, network) via an HTTP endpoint that Prometheus scrapes. C. The Node Exporter is used for application‑level metrics, not system metrics – it exposes system metrics. D. The Node Exporter requires a separate database to store collected metrics – it exposes metrics for scraping.

RATIONALE: The Node Exporter is a Prometheus exporter that exposes hardware and OS metrics. It runs on each host and provides an HTTP endpoint (/metrics) that Prometheus scrapes. It is one of the most commonly used exporters. Q20. An engineer is configuring Prometheus and wants to set a retention period for stored metrics. Which command‑line flag or configuration parameter controls the retention time? A. --storage.tsdb.path – this sets the storage path, not retention. B. --storage.tsdb.retention.time – this sets the retention duration (e.g., 15d for 15 days). C. --storage.tsdb.retention.size – this sets retention by size, not time. D. --storage.tsdb.max-block-duration – this sets the maximum block duration. RATIONALE: The --storage.tsdb.retention.time flag controls how long Prometheus retains metrics. The default is 15 days. Retention can also be configured by size using --storage.tsdb.retention.size. TOPIC 3: PROMQL – PROMETHEUS QUERY LANGUAGE (28% of Exam) Q21. A developer is writing a PromQL query to find the current memory usage of all instances. Which of the following queries correctly selects the node_memory_MemTotal_bytes metric for all instances?

request rates. irate() calculates the instantaneous rate and is more sensitive to spikes. Q23. A developer is writing a PromQL query to calculate the 95th percentile of request latency. Which function should they use with a histogram metric? A. avg() – this calculates the average, not a percentile. B. histogram_quantile() – this calculates quantiles from histogram metrics. C. quantile() – this is not a valid PromQL function. D. percentile() – this is not a valid PromQL function. RATIONALE: histogram_quantile() is the function for calculating quantiles from histogram metrics. It takes a quantile (e.g., 0.95) and a histogram metric. This is the standard way to compute percentiles in Prometheus. Q24. An engineer is debugging a slow query and wants to see the raw time‑series data points for a metric over the last hour. Which of the following queries would return individual sample values? A. rate(node_cpu_seconds_total[5m]) – this returns rate values, not raw samples.

B. node_cpu_seconds_total{instance="localhost"}[1h] – this returns the raw time‑series data points for the last hour. C. avg(node_cpu_seconds_total) – this returns a single average value. D. sum(node_cpu_seconds_total) – this returns a single sum value. RATIONALE: Appending a duration in square brackets to a selector returns the raw time‑series data points for that range. This is called a range vector selector and is useful for debugging. Q25. A DevOps engineer is creating a dashboard and wants to show the total number of HTTP requests per minute, grouped by HTTP status code. Which PromQL query should they use? A. rate(http_requests_total[1m]) – this gives the total rate, not grouped by status. B. sum by (status) (rate(http_requests_total[1m])) – this groups by the status label and sums the rates. C. sum(rate(http_requests_total[1m])) – this sums without grouping. D. rate(http_requests_total{status="200"}[1m]) – this filters to a single status. RATIONALE: The sum by clause aggregates results grouped by specified labels. This query calculates the per‑second rate for each status code