How can you send metrics from your Prometheus setup to a remote system, e.g., for long-term storage?
Answer(s): B
Prometheus provides a feature called Remote Write to transmit scraped and processed metrics to an external system for long-term storage, aggregation, or advanced analytics. When configured, Prometheus continuously pushes time series data to the remote endpoint defined in the remote_write section of the configuration file.This mechanism is often used to integrate with long-term data storage backends such as Cortex, Thanos, Mimir, or InfluxDB, enabling durable retention and global query capabilities beyond Prometheus's local time series database limits.In contrast, "scraping" refers to data collection from targets, while "federation" allows hierarchical Prometheus setups (pulling metrics from other Prometheus instances) but does not serve as long- term storage. Using "S3 Buckets" directly is also unsupported in native Prometheus configurations.
Extracted and verified from Prometheus documentation Remote Write/Read APIs and Long-Term Storage Integrations sections.
What is api_http_requests_total in the following metric?api_http_requests_total{method="POST", handler="/messages"}
Answer(s): C
In Prometheus, the part before the curly braces {} represents the metric name. Therefore, in the metric api_http_requests_total{method="POST", handler="/messages"}, the term api_http_requests_total is the metric name. Metric names describe the specific quantity being measured -- in this example, the total number of HTTP requests received by an API.The portion within the braces defines labels, which provide additional dimensions to the metric. Here, method="POST" and handler="/messages" are labels describing request attributes. The metric name should follow Prometheus conventions: lowercase letters, numbers, and underscores only, and ending in _total for counters.This naming scheme ensures clarity and standardization across instrumented applications. The metric type (e.g., counter, gauge) is declared separately in the exposition format, not within the metric name itself.
Verified from Prometheus documentation Metric and Label Naming, Data Model, and Instrumentation Best Practices sections.
Which of the following is a valid metric name?
According to Prometheus naming rules, metric names must match the regex [a-zA-Z_:][a-zA-Z0-9_:]*. This means metric names must begin with a letter, underscore, or colon, and can only contain letters, digits, and underscores thereafter.The valid metric name among the options is go_goroutines, which follows all these rules. It starts with a letter (g), uses underscores to separate words, and contains only allowed characters.By contrast:go routines is invalid because it contains a space.go.goroutines is invalid because it contains a dot (.), which is reserved for recording rule naming hierarchies, not metric identifiers.99_goroutines is invalid because metric names cannot start with a number.Following these conventions ensures compatibility with PromQL syntax and Prometheus' internal data model.
Extracted from Prometheus documentation Metric Naming Conventions and Data Model Rules sections.
What is an example of a single-target exporter?
Answer(s): A
A single-target exporter in Prometheus is designed to expose metrics for a specific service instance rather than multiple dynamic endpoints. The Redis Exporter is a prime example -- it connects to one Redis server instance and exports its metrics (like memory usage, keyspace hits, or command statistics) to Prometheus.By contrast, exporters like the SNMP Exporter and Blackbox Exporter can probe multiple targets dynamically, making them multi-target exporters. The Node Exporter, while often deployed per host, is considered a host-level exporter, not a true single-target one in configuration behavior.The Redis Exporter is instrumented specifically for a single Redis endpoint per configuration, aligning it with Prometheus's single-target exporter definition. This design simplifies monitoring and avoids dynamic reconfiguration.
Verified from Prometheus documentation and official exporter guidelines Writing Exporters, Exporter Types, and Redis Exporter Overview sections.
How do you configure the rule evaluation interval in Prometheus?
Prometheus evaluates alerting and recording rules at a regular cadence determined by the evaluation_interval setting. This can be defined globally in the main Prometheus configuration file (prometheus.yml) under the global: section or overridden for specific rule groups in the rule configuration files.The global evaluation_interval specifies how frequently Prometheus should execute all configured rules, while rule-specific intervals can fine-tune evaluation frequency for individual groups. For instance:global:evaluation_interval: 30sThis means Prometheus evaluates rules every 30 seconds unless a rule file specifies otherwise.This parameter is distinct from scrape_interval, which governs metric collection frequency from targets. It has no relation to TSDB, service discovery, or command-line flags.
Verified from Prometheus documentation Configuration File Reference, Rule Evaluation and Recording Rules sections.
Post your Comments and Discuss Linux Foundation PCA exam prep with other Community members:
Our website is free, but we have to fight against AI bots and content theft. We're sorry for the inconvenience caused by these security measures. You can access the rest of the PCA content, but please register or login to continue.