Evaluation Cycle

Recording rules are evaluated at regular intervals as an instant query (a PromQL query that is evaluated at a single point in time, producing an output for that point in time). The evaluation interval is determined by the global.evaluation_interval field in the Prometheus configuration file, or by the rule-group-specific interval override. The default interval is 1 minute. If a rule group evaluation takes longer than the configured interval, any subsequent evaluations are skipped until the overdue evaluation completes.

For each rule evaluation cycle, Prometheus will:

  1. Evaluate the rule's PromQL expression as an instant query at the server's current timestamp,
  2. Apply label overrides (if any) to the output series,
  3. Apply sample output limits (if any) and fail the evaluation if the limit is exceeded,
  4. Store the resulting time series in the local TSDB under the provided new metric name and at the evaluation timestamp.

Note: Recording rules will only start creating output series on an ongoing basis from the time they were configured, so you will not see historical data for them by default. However, you can use the promtool command-line tool to backfill data for a recording rule, if needed. See the Prometheus documentation for more details on backfilling.