Skip to content

2026-10-30: Prometheus volume "filling up" because its size cap sat above the alert threshold

Kind: reference (incident report)

Severity: warning · Status: resolved · Resolved by: operator agent (#2191 fix, #2192 verification) · Duration: 36 min 36 s, 04:11:24 – 04:48:00 UTC (PersistentVolumeFillingUp from 03:37:04, 1 h 11 min) · Taskbase task: #2191, #2192

Summary

On hetzner-mgmt, KubePersistentVolumeFillingUp fired for Prometheus's own volume (prometheus-pv, 10 Gi) with 13.61 % free. The volume was not running away: Prometheus's size retention held it in a sawtooth between about 6.5 and 8.1 GiB used. But the cap, retentionSize: 8GiB, let each peak go below the alert's 15 % free, so the alert fires every few days by design. The fix lowers the cap to 7 GiB. After the merge, size retention dropped the oldest blocks and both alerts resolved at 04:48 UTC.

Impact

  • Services: none. Prometheus ran, scraped and compacted normally (0 failed compactions).
  • Users: none. The Mattermost-only PersistentVolumeFillingUp (over 80 % used) fired for the same volume.
  • Data: none lost. The risk was the headroom: at a peak of 8.08 GiB, Prometheus (not root) had about 1.2 GiB left. Compacting into its largest block (54 h, about 1.1 GiB) needs that much temporary space. Merging the fix deletes the oldest ~2 days of metrics: the window falls from about 15.7 to about 14 days. Prometheus TSDB has no backup gate. That data would only have been dropped later by retention.
  • Duration: KubePersistentVolumeFillingUp 04:11:24 – 04:48:00 (36 min 36 s); PersistentVolumeFillingUp 03:37:04 – 04:48:00.

Timeline

All times UTC, 2026-10-30.

Time Event Source
04:11:24 Detected: KubePersistentVolumeFillingUp fires for prometheus-monitoring-kube-prometheus-prometheus-db-prometheus-monitoring-kube-prometheus-prometheus-0 (13.61 % free) Alertmanager, fingerprint c0c1e62957684c14
04:12:24 Taskbase opens incident #2191 Taskbase
04:13 operator agent: alert still active, not silenced, no active silences Alertmanager API
04:14 operator agent: usage is a capped sawtooth; size retention (8 GiB) puts peaks under 15 % free Prometheus queries below
04:16 Pull request #1063 lowers retentionSize to 7 GiB, with this report Skatzi/platform#1063
04:34:55 #1063 merged (0fccd47) Git
04:41:37 Flux applies 0fccd47; Helm release monitoring-kube-prometheus-stack revision 166 deployed helm history
04:42:32 Prometheus reloads its configuration with size retention 7 GiB (no pod restart) /api/v1/status/runtimeinfo
~04:47 Size retention deletes the oldest blocks; volume use falls from 7.97 to 6.12 GiB Prometheus queries below
04:48:00 Resolved: neither alert is active for the volume Alertmanager API

Root cause

components/prometheus-stack/helmrelease.yaml set retention: 30d and retentionSize: 8GiB on a 10 Gi volume. The size cap counts TSDB blocks, WAL and head chunks: 7.42 + 0.36 + 0.08 GiB at detection. It does not count the filesystem. The 10 Gi Hetzner volume gives 9.75 GiB of ext4, and about 0.51 GiB of that is reserved for root. Available space is therefore capacity − used − 0.51 GiB.

Prometheus wrote about 0.47 GiB a day. Size retention deleted the oldest block when the total passed 8 GiB (prometheus_tsdb_size_retentions_total = 4, all within the last 14 days). Usage therefore climbed to about 8.1 GiB and dropped by 0.6–1 GiB every two to three days:

12 h samples, GiB used 10-22 04:13 7.36 · 10-23 04:13 7.85 · 10-24 04:13 6.52 · 10-25 16:13 7.28 · 10-26 04:13 6.59 · 10-28 04:13 7.68 · 10-28 16:13 7.04 · 10-30 04:13 7.91

At 8.08 GiB used, available is (9.75 − 8.08 − 0.51) / 9.75 ≈ 12 %. That is below the 15 % of the upstream KubePersistentVolumeFillingUp (kubernetes-mixin). On each rising edge, the rule's 6 h predict_linear projects the volume full within four days. The time retention of 30 d was never reached: the oldest sample was 15.7 days old.

With 7 GiB, the peak is about 7.1 GiB used (73 %), with about 22 % available. That is clear of both the 15 % rule and the 80 % PersistentVolumeFillingUp, and leaves about 2.2 GiB for compaction.

What the agent did

No write to the cluster. Every step was read-only, followed by one pull request.

  1. kubectl -n monitoring port-forward svc/alertmanager-operated 9093, then curl -sG localhost:9093/api/v2/alerts --data-urlencode 'filter=alertname="KubePersistentVolumeFillingUp"'. The result was one alert, c0c1e62957684c14, state active, not silenced or inhibited. GET /api/v2/silences showed no active silences.
  2. flux get kustomizations -A and flux get helmreleases -A: everything Ready. kubectl -n monitoring get pvc: the volume is bound to prometheus-pv, 10Gi, hcloud-volumes.
  3. kubectl -n monitoring get prometheus: retention=30d retentionSize=8GiB.
  4. Prometheus queries through port-forward svc/monitoring-kube-prometheus-prometheus 9090:
  5. kubelet_volume_stats_*: used 7.91 GiB, capacity 9.75 GiB, available 13.58 %.
  6. TSDB storage: blocks 7.42, WAL 0.36 and head chunks 0.08 GiB.
  7. prometheus_tsdb_size_retentions_total = 4, prometheus_tsdb_time_retentions_total = 0.
  8. The oldest data is 15.7 days old, and prometheus_tsdb_compactions_failed_total = 0.
  9. Used space peaked at 8.08 GiB over 14 days. Available space bottomed at 12.5 %.
  10. Used space was 7.85 GiB seven days earlier.
  11. Webshop: kubectl --context webshop and kubelet stats summary showed its Prometheus volume at 0.7 GiB after 34 h, with 7 d time retention, so a 7 GiB cap never applies there.
  12. Upstream runbook (KubePersistentVolumeFillingUp): find what fills the volume, then resize it or clean up its data. Here the data is Prometheus's own TSDB, and its size retention is the cleanup. The volume is a static Hetzner volume made by Terraform (terraform/environments/hetzner-mgmt-cluster/3-ekstra), so resizing it is a person's step. The agent lowered the cap in Git instead.
  13. kubectl apply --dry-run=server of the rendered HelmRelease: accepted.
  14. Pull request #1063: retentionSize 8GiB → 7GiB in components/prometheus-stack/helmrelease.yaml. It also corrects the storage numbers in docs/content/services/prometheus-monitoring.md (20Gi → 10Gi, Alertmanager has no volume).

Resolution and verification

Resolved by #1063. Task #2192 verified it read-only, with no write to the cluster. It waited for Flux's 5-minute source poll and did not force a reconcile.

  • flux get kustomizations prometheus-stack showed Applied revision: main@sha1:0fccd47d. flux get helmreleases kube-prometheus-stack showed Ready, Helm upgrade succeeded for release monitoring/monitoring-kube-prometheus-stack.v166. helm -n monitoring history monitoring-kube-prometheus-stack showed revision 166 deployed, 04:41:37.
  • kubectl -n monitoring get prometheus monitoring-kube-prometheus-prometheus -o jsonpath='{.spec.retentionSize}' returned 7GiB.
  • The Prometheus Operator (v0.94.1) does not pass --storage.tsdb.retention.size. It writes the cap into the generated configuration (storage.tsdb.retention: {time: 30d, size: 7GiB} in Secret prometheus-monitoring-kube-prometheus-prometheus), and Prometheus reloads it. The pod prometheus-monitoring-kube-prometheus-prometheus-0 kept running (2/2, 8 d, 0 restarts), and /api/v1/status/runtimeinfo showed storageRetention: "30d or 7GiB", reloadConfigSuccess: true, lastConfigTime: 2026-10-30T04:42:32Z.
  • At 04:42 the volume used 7.97 GiB (blocks 7.42 GiB). At 04:47:51: kubelet_volume_stats_used_bytes 6.12 GiB, blocks 5.57 GiB, WAL 0.42 GiB. increase(prometheus_tsdb_size_retentions_total[15m]) ≈ 2. Available was 31.9 % of capacity.
  • At 04:48:00 GET /api/v2/alerts with alertname=~"(Kube)?PersistentVolumeFillingUp" and the volume's PVC returned [], and ALERTS{alertname=~"(Kube)?PersistentVolumeFillingUp"} returned no series. No silence covered them.

Follow-ups

  • 2192 — verified the fix after the merge and set this report to resolved (done).

References

  • Alert: KubePersistentVolumeFillingUp, runbook
  • Taskbase incident task: #2191
  • Runs: operator run of #2191
  • Pull requests: Skatzi/platform#1063 (fix and this report); the #2192 pull request (verification)
  • Runbook sections: none in the ops runbook applies; the upstream runbook above was followed

Open questions

  • Should hetzner-mgmt keep the full 30 days? That needs a larger Hetzner volume (Terraform and a person's apply). Until then, the size cap limits it to about 14 days.