liveBook · Manning

Recording rule

As explained in ScyllaDB in Action

A recording rule is a named Prometheus expression that is evaluated and stored as a derived time-series value for convenient reuse.

A recording rule is a named Prometheus expression evaluated and stored as a derived time-series value, giving repeated calculations a convenient shortcut. section 11.1.2 section 11.4

Average read latency

Combine the total read-latency metric with its request-count metric: sum(scylla_storage_proxy_coordinator_read_latency_sum) divided by sum(scylla_storage_proxy_coordinator_read_latency_count). A recording rule can provide this result directly for monitoring and dashboards; a related rule exposes rlatency95, the 95th-percentile read latency. section 11.1.2

Recording rules support the monitoring workflow by:

  • Reducing repeated PromQL work for complex metric calculations. section 11.4
  • Supplying reusable values to Grafana dashboards and visualizations. section 11.4
  • Supporting application-specific alerts and visualizations when existing queries are insufficient. section 11.1.2
Figure 11.3 PromQL combines metrics, labels, functions, and recording rules to help you query and transform ingested metrics.
figure

Shows how PromQL combines metrics, labels, functions, and recording rules to query and transform ingested metrics. section 11.1.2

How ScyllaDB in Action covers it

How deep it goes
Explains recording rules as query shortcuts and demonstrates their latency use, but does not detail configuration syntax.
Examples
Uses summed read-latency totals, request counts, average latency, and rlatency95 as concrete examples.
What it assumes
Assumes familiarity with Prometheus metrics, labels, aggregation, and PromQL expressions.
What you can do after
Apply it via PromQL and Prometheus to reuse complex calculations in dashboards, alerts, and visualizations.
How it connects
Connects recording rules to Prometheus, PromQL, metrics, labels, Grafana, dashboards, and alerting.

Also explained in

Compare how 2 books explain recording rule →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of ScyllaDB in Action. The section links point to the parts of the book it draws on.