Which Prometheus metrics show a disk filling up?
With Tares you pick the disk metrics your Prometheus server exposes, by name or by label, and a trigger watches their numeric value for a disk filling up. The most direct signal is a computed series that reports used disk space as a percent. A trigger takes the max of its value and fires above your threshold.
How it works
The Prometheus connector ingests the metrics you choose. Each series becomes a metric event on every poll tick. You never write PromQL for a raw metric.
- Discovery. Give the connector your Prometheus
urland it lists the server’s metrics and labels. You browse that list for the disk and filesystem metrics your exporters publish. - Pick by name. Type a metric name or a
prefix_*pattern and tick the matches. - Pick by label. Choose a label, see the metrics that carry it, and tick the ones you want.
- Value. The metric value is stored as a number-typed
valuelabel, so a trigger can aggregate it. - Event type. Your picks compile to one selector, and each event is named by its own metric name. A trigger filters to one metric by
event_type. - Computed series. For a percentage, add a
queriesrow that holds one PromQL expression, with an explicitevent_typeandfield, and optionally atextline. This is the escape hatch for a derived metric such as used percent. A used-percent series gives you a number you can compare to a threshold directly.
If your disk metrics reach Tares through an OpenTelemetry Collector instead, the OpenTelemetry connector receives OTLP metrics, and resource attributes such as service.name become labels.
Set it up
-
Start Tares locally.
tares up -
Ask a connected agent to do the picking for you: “Use tares to ingest the disk metrics from the Prometheus at
localhost:9090.” The agent discovers the metrics and labels, samples your picks, tests one poll and creates the source. Or open Sources → Add source → Prometheus in the console, enter theurland any auth, and select Discover. -
Pick the disk metrics by name or by label, then confirm. Tares proposes the entity key and labels from a sample. The details are on the Prometheus connector page.
-
For a percent-used signal, add a computed series. It is a
queriesrow with your own PromQL expression for used percent, anevent_typesuch asdisk_used_percent, andfieldset tovalue. -
Add a trigger that filters to that event type and aggregates the
valuefield. The condition needs a field, so setfield: valuenext toaggregate: max.- name: disk-nearly-full sources: [metrics] filters: - { field: event_type, op: eq, value: disk_used_percent } condition: { aggregate: max, field: value, predicate: "> 90", window: 5m } cooldown: 15mHere
disk_used_percentis the event type you chose for the computed series. The threshold is a number you set for your own disks. -
Open the source and check Recent events and Fields. You see one event per series per poll, the labels such as
metric.service, and the numericvalue. Watch it move in Explore by picking the entity the series is keyed on.
The number-typed value label comes from the generated config. The config Tares generates for a basket of picks looks like this, with your own metric names in the matcher:
- name: metrics
connector: prometheus
poll: 10s
config:
url: http://localhost:9090
queries:
- promql: '{__name__=~"(pg_stat_database_xact_commit|pg_up)"}' # generated from your picks
by_name: true
labels:
- { name: service, field: metric.service, primary: true }
- { name: value, field: value, type: number } # the metric value, aggregate it in triggersWhat you get
- Disk metrics from your Prometheus server arrive as events you can read next to logs, deploys and alerts on the same key.
- The numeric
valueis available to triggers, so a rule such as max ofvalueabove a threshold over five minutes fires when a disk fills. - A cooldown keeps one filling disk from raising the same trigger again on every poll.
- A computed used-percent series gives one comparable number for every disk, so one threshold covers them.
- The trigger can feed the rest of your AI SRE setup, so an agent investigates with the metric history already in Tares.
When something else fits
- If you already alert on disk space in Prometheus rules, the Prometheus alerts connector brings in those fired alerts instead, so you do not rebuild the threshold in Tares.
- If your metrics flow through an OpenTelemetry Collector, use the OpenTelemetry connector rather than polling Prometheus.