Skip to content

Long-term metrics on the phone: lab remote_write + laptop Grafana datasource - #150

Merged
MIERAI merged 1 commit into
mainfrom
promlt-lab
Nov 23, 2026
Merged

MIERAI merged 1 commit into
mainfrom
promlt-lab

Conversation

@MIERAI

@MIERAI MIERAI commented Nov 23, 2026

Copy link
Copy Markdown
Owner

This adds the long-term metrics store on the phone: a second official Prometheus (3.13.2, ~/promlt, :9091) running only as a remote-write receiver, kept for 1 year or 150 GB, whichever comes first. The lab starts sending to it here; the laptop follows after a soak, as a draft PR for daytime.

  • lab (clusters.lab.components.monitoring.values.prometheus.prometheusSpec.remoteWrite): sends to http://100.80.225.15:9091/api/v1/write.
    • Small queue: capacity 2500, 1–2 shards, 1000 samples per send, backoff 1s–1m, timeout 30s. Prometheus reads the queue from its WAL in the background, so the phone being down never blocks scraping or rules. Unsent samples are dropped after about 2h (the WAL window).
    • Not sent: job="apiserver" (about 35k of the lab's 68k series) and control-plane / runtime histograms (workqueue, scheduler, kine, storage_operation, kubelet_runtime_operations, rest_client, cnpg_pg_settings). These are causes to look at live, not to keep for a year.
    • The copy alone gets the label cluster=lab; the lab's own series and alerts are unchanged.
  • laptop Grafana: a datasource Prometheus · long-term (phone) (uid longterm-prometheus), added to the existing additionalDataSources next to Prometheus · phone. This needed no product change.
  • Phone side (not in git):
    • It is a services.sh service, restarted by the watchdog.
    • The phone's own Prometheus scrapes it (job promlt) and has an alert rule PhonePromLTDown.
    • logrotate covers its log.
    • The binary is the phone's existing official Prometheus binary (cmp confirms they are identical).

Render evidence (product render.py v0.1.5, main → this branch):

  • lab: the 12 Applications are byte-identical; in the root, only platform-monitoring's prometheus.prometheusSpec.remoteWrite changes (+23 lines).
  • laptop: the 28 Applications are byte-identical; in the root, only platform-monitoring's grafana.additionalDataSources changes (+7 lines, one entry).

🤖 Generated with Claude Code

…asource

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Rendered diff (as Argo CD renders: kustomize / Helm, against origin/main)

No change in the rendered manifests.

@MIERAI
MIERAI merged commit ef5f27f into main Nov 23, 2026
2 checks passed
@MIERAI
MIERAI deleted the promlt-lab branch November 23, 2026 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant