Home / Prometheus Certified Associate (PCA) / Mock exam
Prometheus Certified Associate (PCA) Exam-style mock test

Prometheus Certified Associate (PCA) Practice Exams|Practice test

Full explanations Exam format Pass line 75%
33 USD One-time · lifetime access
Enroll →

Sample questions

Example1 · Prometheus Fundamentals, Architecture, and Data Model
A B2B SaaS platform team is evaluating Prometheus to monitor its checkout microservices. The architect asks what Prometheus is fundamentally designed to do. Which statement best describes its primary purpose?
・It persists application logs as structured JSON documents and provides full-text search across those logs
Incorrect. Log aggregation and full-text search are the domain of tools like Loki or Elasticsearch, not Prometheus.
✓It collects numeric time series by scraping metrics and evaluates rules and alerts over that data
Correct. Prometheus is a metrics-focused system that scrapes numeric time series and runs recording and alerting rules over them.
・It traces individual requests end to end across every service to reconstruct distributed call graphs
Incorrect. Distributed request tracing is handled by tracing systems such as Jaeger or Tempo, not by Prometheus.
・It stores relational transaction records with ACID guarantees for the billing subsystem
Incorrect. Prometheus is not a relational database and offers no ACID transactional storage for business records.
Explanation
Prometheus is purpose-built for metrics: it scrapes numeric time series and evaluates rules and alerts, unlike logging, tracing, or relational systems.
Example2 · PromQL: Selectors, Functions, and Aggregation
A platform engineer at a B2B SaaS company needs a PromQL selector that returns the http_requests_total series only for the services whose job label value begins with the prefix api- (for example api-billing, api-auth). Which selector correctly expresses this requirement?
・http_requests_total{job~="api-.*"}
Incorrect. The operator is written backwards; the regex-match operator in PromQL is =~, not ~=, so this selector is a syntax error.
✓http_requests_total{job=~"api-.*"}
Correct. The =~ operator performs a fully-anchored regular-expression match, and api-.* matches any job value starting with api- followed by any characters.
・http_requests_total where the job label is matched against the regular expression beginning with the literal string api-
Incorrect. This describes the intent in prose rather than providing valid PromQL selector syntax, so it cannot be executed by Prometheus as written.
・http_requests_total{job="api-"}
Incorrect. The = operator requires an exact string equality, so it matches only the literal value api- and not api-billing or api-auth.
Explanation
Prefix matching in PromQL requires the regex-match operator =~ combined with an anchored pattern like api-.*; the = operator only tests exact equality.
Example3 · Instrumentation, Exporters, and Client Libraries
A B2B SaaS company is adding Prometheus metrics to its billing microservice, which is written in Go. The platform team wants the officially supported, idiomatic way to expose instrumentation. Which approach should they recommend?
✓Instrument the service with the official Prometheus Go client library and register a metrics handler on an HTTP endpoint
Correct. The official Go client library lets the service define and register metrics and serve them over an HTTP endpoint for scraping.
・Deploy the Node Exporter alongside the billing service so it can read process and runtime metrics automatically
Incorrect. Node Exporter reports host-level OS metrics, not the billing service's own application metrics.
・Write metrics to a log file and configure Promtail to scrape those lines into Prometheus
Incorrect. Promtail feeds logs into Loki, not application metrics into Prometheus, so this does not instrument the service.
・Expose metrics by having the service push samples to a StatsD daemon on each request
Incorrect. Pushing to StatsD is a non-native path and is not the idiomatic client-library instrumentation for a Go service.
Explanation
Native application instrumentation is done with the official client library for the service's language, exposing metrics on an HTTP endpoint for scraping.
Example4 · Alerting, Alertmanager, and Recording Rules
A healthcare services firm runs Prometheus to monitor its patient-portal servers. An engineer asks which component actually evaluates the alerting rule expressions and decides when an alert becomes firing. Which answer correctly describes the division of work between Prometheus and Alertmanager?
・Alertmanager periodically scrapes the portal targets, evaluates the rule expressions against the samples, and then forwards any firing alerts back to Prometheus for notification
Incorrect. Alertmanager never scrapes targets or evaluates rule expressions; the Prometheus server performs scraping and rule evaluation.
✓Prometheus evaluates the rule expressions and sends firing alerts to Alertmanager, which handles grouping, inhibition, silencing, and routing to receivers
Correct. Prometheus evaluates alerting rules and pushes firing alerts to Alertmanager, which then groups, inhibits, silences, and routes them to receivers.
・Both Prometheus and Alertmanager evaluate the rules at the same time and compare results before a notification is sent
Incorrect. The two components do not redundantly evaluate the same rules; evaluation happens only in the Prometheus server.
・Prometheus only stores metrics while Alertmanager evaluates every rule
Incorrect. Prometheus does far more than store metrics; it is the component that evaluates alerting rules.
Explanation
Rule evaluation lives in the Prometheus server. Alertmanager takes the resulting alerts and manages grouping, deduplication, silencing, inhibition, and routing.
Example5 · Service Discovery, Scraping, Storage, and Operations
A healthcare services firm runs patient-portal exporters on hosts that change frequently, and the ops team cannot run a supported dynamic SD integration in their isolated clinical network. They write target lists to JSON files that a sidecar updates whenever hosts change. Which service discovery mechanism should they configure so Prometheus picks up changes without a restart?
・A static_configs block listing every patient-portal host and port directly inside the scrape job
Incorrect. static_configs are hardcoded and require editing the config and reloading whenever the frequently-changing hosts turn over, which is exactly what they want to avoid.
✓file_sd_configs pointing at the generated JSON files, which Prometheus watches and reloads automatically
Correct. file_sd_configs reads target files on disk and automatically detects changes via file watches, so a sidecar can rewrite the JSON and Prometheus updates targets without a restart.
・dns_sd_configs that resolves an SRV record delegated to the clinical network's internal DNS zone
Incorrect. dns_sd_configs depends on DNS SRV/A records being maintained, but the scenario provides JSON files from a sidecar, not DNS records.
・kubernetes_sd_configs with the endpoints role scoped to the patient-portal namespace and service
Incorrect. kubernetes_sd_configs requires the Kubernetes API, which is a supported dynamic integration they stated they cannot use in this isolated network.
Explanation
File-based service discovery is the generic mechanism for feeding Prometheus dynamic targets from files that an external process maintains; it reloads on file change without a restart.
Example6 · Prometheus Fundamentals, Architecture, and Data Model
A healthcare services firm runs a patient-portal API and wants Prometheus to collect its metrics. A new engineer asks how Prometheus obtains the metric values from the portal. Which statement best describes Prometheus's default collection model?
✓Prometheus periodically sends HTTP requests to each target's metrics endpoint and scrapes the exposed metrics
Correct. Prometheus is pull-based: it periodically issues HTTP GET requests to each target's /metrics endpoint and scrapes the current values.
・Each portal instance opens a persistent gRPC stream and continuously streams metrics to the Prometheus server
Incorrect. Prometheus does not maintain persistent gRPC streams from targets; it polls HTTP endpoints on a schedule.
・The portal pushes its metrics to Prometheus over a message queue whenever values change
Incorrect. Pushing on change via a message queue is not the Prometheus model; targets expose metrics for scraping.
・Prometheus subscribes to a Kafka topic that the portal publishes measurement events to
Incorrect. Prometheus does not consume from Kafka topics for standard metric collection.
Explanation
Prometheus uses a pull model, scraping HTTP endpoints at a configured interval rather than receiving pushed data.
Example7 · Prometheus Fundamentals, Architecture, and Data Model
The platform team at retailer NorthPeak Outfitters is onboarding a new checkout microservice into their Prometheus monitoring. A developer asks how the service's metrics will reach Prometheus. Which statement best describes Prometheus's default collection model?
✓Prometheus periodically sends HTTP GET requests to each target's metrics endpoint and pulls the exposed samples on a configured interval
Correct. Prometheus is pull-based: the server scrapes each target by issuing HTTP GET requests to its /metrics endpoint at the scrape interval.
・The checkout service must open a persistent connection to Prometheus and continuously stream samples as they are produced
Incorrect. Prometheus does not maintain persistent streaming connections to targets; it scrapes on an interval and closes the request.
・Each target pushes its metrics to the Prometheus server whenever counters change
Incorrect. Targets do not push to the server by default; the server pulls. Pushing short-lived jobs is only done via the Pushgateway.
・Prometheus subscribes to a message queue that the service publishes metrics to
Incorrect. Prometheus does not rely on a message queue subscription to gather metrics from targets.
Explanation
Prometheus uses a pull model, scraping targets over HTTP at a configured interval rather than receiving pushed or streamed data.
Example8 · Prometheus Fundamentals, Architecture, and Data Model
An engineer at NorthPeak Outfitters is diagramming their monitoring stack and needs to label the component inside the Prometheus server that actually stores the collected samples on disk. Which component is responsible for persisting time series data?
✓The local on-disk time series database (TSDB) that the Prometheus server writes scraped samples into
Correct. The Prometheus server includes a local time series database (TSDB) that persists scraped samples to disk.
・The Alertmanager, which deduplicates and routes notifications to receivers
Incorrect. Alertmanager handles notification routing and deduplication, not sample storage.
・The service discovery subsystem that resolves target addresses dynamically
Incorrect. Service discovery locates and updates the set of scrape targets but does not store samples.
・The expression browser used to run ad-hoc queries
Incorrect. The expression browser is a UI for running queries, not a storage component.
Explanation
Prometheus stores samples in its built-in local TSDB; Alertmanager, service discovery, and the UI serve other roles.
Example9 · Prometheus Fundamentals, Architecture, and Data Model
NorthPeak Outfitters instruments their order service with a metric named orders_processed_total that only ever increases while the service runs and resets to zero on restart. Which Prometheus metric type is most appropriate for this value?
✓Counter
Correct. A counter represents a cumulative value that only increases and resets to zero on restart, which matches a total of orders processed.
・Gauge, because the number of processed orders is a current value that can move up or down over time
Incorrect. A gauge is for values that go up and down; a monotonically increasing total that resets on restart is a counter, not a gauge.
・Histogram
Incorrect. A histogram samples observations into buckets for distributions like latency, not a simple running total.
・Summary
Incorrect. A summary tracks quantiles over a sliding window, which is not what a simple increasing total needs.
Explanation
A monotonically increasing total that resets on restart is the textbook definition of a counter.
Example10 · Prometheus Fundamentals, Architecture, and Data Model
A financial services platform team is onboarding Prometheus to monitor its trading gateways. An engineer who previously used a push-based agent asks how Prometheus obtains metrics from the gateway services by default. Which statement best describes the default collection behavior?
✓Prometheus periodically scrapes an HTTP endpoint exposed by each target to pull the current metric samples.
Correct. By default Prometheus pulls metrics by scraping an HTTP endpoint on each target at a configured interval.
・Each gateway service opens a persistent gRPC stream and continuously pushes samples into the Prometheus server as they occur.
Incorrect. Prometheus does not maintain persistent push streams from targets; the default model is scrape-based pull, not continuous gRPC push.
・Prometheus subscribes to a message queue where the gateways publish their metrics for later consumption.
Incorrect. Prometheus does not consume metrics from a message queue by default; it scrapes HTTP endpoints directly.
・The gateways write metric files to shared storage that Prometheus tails.
Incorrect. Prometheus does not tail metric files from shared storage; targets expose an HTTP endpoint that Prometheus scrapes.
Explanation
The core Prometheus model is pull-based scraping of HTTP endpoints, not push via streams, queues, or files.
Example11 · Prometheus Fundamentals, Architecture, and Data Model
A bank runs a nightly batch job that reconciles settlement records and exits in under a minute. The team wants the job's success metrics to reach Prometheus even though the process is gone before any scrape could occur. Which component should they use?
・Configure a second Prometheus server dedicated to scraping the batch host more aggressively during the run window.
Incorrect. A more aggressive second Prometheus still cannot scrape a process that has already exited; timing the scrape to the short job is unreliable.
✓Push the metrics to a Pushgateway, which Prometheus then scrapes on its normal interval.
Correct. The Pushgateway is designed for short-lived batch jobs: the job pushes its metrics there and Prometheus scrapes the gateway normally.
・Enable remote write on the batch job so it streams samples straight into the Prometheus TSDB during execution.
Incorrect. Remote write ships a Prometheus server's data to long-term storage; it is not how a short-lived job delivers metrics to Prometheus.
・Add the job to Alertmanager so it records the batch outcome for later.
Incorrect. Alertmanager handles alert routing and notification, not ingestion of batch job metrics.
Explanation
The Pushgateway exists specifically so short-lived or batch jobs can expose metrics that Prometheus scrapes after the job finishes.
Example12 · Prometheus Fundamentals, Architecture, and Data Model
A platform team at a manufacturing distributor is onboarding a new warehouse inventory service and must explain how Prometheus collects its metrics. Which statement correctly describes the default collection model used by Prometheus?
・The service pushes its metrics on a timer to the Prometheus remote-write receiver, which buffers and persists them
Incorrect. Pushing on a timer describes the push model used by systems like the Pushgateway for batch jobs, not the default Prometheus collection behavior.
✓Prometheus periodically scrapes an HTTP metrics endpoint that the service exposes
Correct. Prometheus uses a pull model: it periodically scrapes an HTTP endpoint (typically /metrics) exposed by each target.
・Prometheus subscribes to a message queue topic and waits for the service to publish metric events
Incorrect. Prometheus does not subscribe to message queues; it actively requests metrics over HTTP from configured targets.
・The service writes metrics to a shared log file that the Prometheus agent tails continuously
Incorrect. Prometheus does not tail log files to gather metrics; it scrapes HTTP endpoints exposed by instrumented services.
Explanation
Prometheus is fundamentally pull-based: the server initiates scrapes against HTTP metrics endpoints at a configured interval rather than waiting to receive pushed data.
Example13 · Prometheus Fundamentals, Architecture, and Data Model
While mapping out the monitoring stack for the distributor's order-fulfillment platform, an engineer needs to identify which component is responsible for evaluating alerting rules and sending notifications to receivers such as email or chat. Which component performs this role?
✓The Prometheus server evaluates alerting rules, and Alertmanager handles deduplication, grouping, and routing of the resulting alerts
Correct. The Prometheus server evaluates alerting rules and fires alerts, which Alertmanager then deduplicates, groups, and routes to receivers.
・The Pushgateway evaluates alerting rules and forwards triggered alerts to configured receivers
Incorrect. The Pushgateway is only a staging cache for metrics from short-lived batch jobs; it does not evaluate rules or send alerts.
・Alertmanager evaluates alerting rules and scrapes targets
Incorrect. Alertmanager routes and dispatches alerts but does not evaluate rules or scrape targets; that is the server's job.
・Grafana evaluates alerting rules defined in Prometheus and dispatches notifications
Incorrect. Grafana can visualize and configure alerts in its own system, but Prometheus rule evaluation is done by the Prometheus server with Alertmanager.
Explanation
Rule evaluation happens in the Prometheus server; Alertmanager receives fired alerts and handles deduplication, grouping, silencing, and routing to receivers.
Example14 · Prometheus Fundamentals, Architecture, and Data Model
A telecom operator deploys Prometheus to monitor its 5G core network functions. The platform team asks how Prometheus obtains metrics from the hundreds of network function pods. Which statement correctly describes the default collection model?
✓Prometheus scrapes an HTTP metrics endpoint exposed by each target on a configured interval
Correct. Prometheus uses a pull model: it periodically scrapes an HTTP endpoint (typically /metrics) exposed by each configured target.
・Each network function pod opens a persistent gRPC stream and continuously pushes samples to Prometheus
Incorrect. Prometheus does not open persistent gRPC streams to targets; it issues periodic HTTP GET scrapes instead.
・Prometheus subscribes to a central message bus where all targets publish their metric events for delivery
Incorrect. Prometheus does not rely on a central message bus or publish/subscribe delivery for routine metric collection.
・Targets write samples directly into the Prometheus time series database using a remote write client
Incorrect. Targets do not write directly into the TSDB; remote write is a separate feature for forwarding data between Prometheus systems, not the default scrape path.
Explanation
Prometheus is fundamentally pull-based, scraping metrics exposed over HTTP by each target on a scrape interval. Push and message-bus patterns are not the default model.
Example15 · Prometheus Fundamentals, Architecture, and Data Model
During an architecture review for the telecom operator's monitoring stack, an engineer must identify which component is responsible for evaluating alerting rules and sending firing alerts onward for routing. Which component performs this?
・The Alertmanager component, which continuously evaluates PromQL alerting rules against scraped data and then fans out
Incorrect. Alertmanager handles deduplication, grouping, and routing of alerts; it does not evaluate the alerting rules itself.
・The pushgateway, which buffers ephemeral job metrics and forwards any threshold breaches to on-call staff
Incorrect. The pushgateway is a staging buffer for short-lived batch job metrics and performs no alert evaluation.
・The exporter running next to the network function, which inspects samples locally and raises alerts
Incorrect. Exporters only expose metrics for scraping; they do not evaluate alerting rules or raise alerts.
✓The Prometheus server, which evaluates alerting rules and forwards firing alerts to Alertmanager
Correct. The Prometheus server evaluates alerting rules against its data and pushes firing alerts to Alertmanager, which then routes them.
Explanation
Rule evaluation (both recording and alerting rules) is a Prometheus server responsibility. Alertmanager only receives already-firing alerts and handles grouping, silencing, and routing.
▶ Try 10 free questions (graded)
Measure your readiness with a full mock exam
All questions · full explanations · lifetime access
Enroll(33 USD)