fix(grafana): real byte thresholds for the Database size stat #120
Reference in New Issue
Block a user
Delete Branch "feature/grafana-db-size-thresholds"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Give the Database size stat on the Scrabble - Resources dashboard real byte
thresholds, so a healthy small database no longer renders permanently red.
Why
The panel had no
thresholds, so Grafana applied its stat default (green base, red at>=80). The query ismax(pg_database_size_bytes{datname="scrabble"})(unit: bytes), soa ~9 MiB database (9.4M
>>80) showed permanently RED on both test and prod —reading as a false alert. (The neighbouring
percentunitcache-hit stat stayed green onlybecause its 0..1 values fall under 80.) There are no Grafana alert rules provisioned;
this was purely panel coloring.
loadtest/is clean — the small DB is expected (the harness wipes +--cleanups, and thecontour is
DROP SCHEMA'd on schema changes), not an error.Thresholds
Sized to the prod disk (40 GiB; 4.6 GiB used; observability bounded — Tempo
<=1 GiB,Prometheus 7d — so the DB is the only unbounded grower):
An early warning with ample runway before the disk tightens, not a panic line. Easy to
retune if the disk budget changes.
Verification
json.loadparses; the panel resolves togreen/yellow(8 GiB)/red(16 GiB), and thecurrent ~9 MiB maps to green.