PCA practice question 14 of 15

How do you configure the rule evaluation interval in Prometheus?

Full set: 60 questions
Answer options
A: You can configure the evaluation interval in the global configuration file and in the rule configuration file. Correct answer
B: You can configure the evaluation interval in the service discovery configuration and in the command-line flags.
C: You can configure the evaluation interval in the scraping job configuration file and in the command-line flags.
D: You can configure the evaluation interval in the Prometheus TSDB configuration file and in the rule configuration file.
Correct Answer:
A. You can configure the evaluation interval in the global configuration file and in the rule configuration file.
Explanation

The Prometheus rule evaluation interval is configured in two primary locations. A default interval for all rule groups is set globally in the main Prometheus configuration file (prometheus.yml) under the global block using the evaluationinterval parameter. This global default can be overridden for specific groups of rules by defining an interval key within a rulegroup in a separate rule configuration file (e.g., rules.yml). This hierarchical approach allows for a general setting while providing granular control over how frequently specific rule sets are evaluated.

Why Incorrect

B. Service discovery configurations define how Prometheus finds targets to scrape; they are unrelated to rule evaluation intervals.
C. The scraping job configuration defines the scrapeinterval (how often to collect metrics from a target), not the evaluationinterval for rules.
D. Prometheus TSDB (Time Series Database) settings are configured via command-line flags and relate to data storage, not the frequency of rule evaluation.

References

1. Prometheus Official Documentation, Configuration: The section details the evaluationinterval parameter. It states, "How frequently to evaluate rules. The default is every 1 minute."

Source: Prometheus Authors. (n.d.). Configuration. Prometheus. Retrieved from https://prometheus.io/docs/prometheus/latest/configuration/configuration/#globalconfig. Section: .

2. Prometheus Official Documentation, Recording Rules: The documentation on rule files explains the structure of a , which includes the interval field. It explicitly states, "The interval may be specified on a per-group basis. It will override the global evaluationinterval."

Source: Prometheus Authors. (n.d.). Recording rules. Prometheus. Retrieved from https://prometheus.io/docs/prometheus/latest/configuration/recordingrules/#rulegroup. Section: .

Scroll to Top