Skip to main content

Grafana (monitoring dashboards)

Self-hosted Grafana (OSS edition, AGPLv3) — the single user interface for the rack's metrics. Data comes from Prometheus; Grafana is the only client allowed to query it.

Guestsrv-gf — Rocky Linux 9.8, VM 133, 192.168.88.24 on rumba
PlaneM1 (hg-m1-systems; TLS name srv-gf.isc3.isc-vs.ch in hg-m1-service-names)
URLhttps://srv-gf.isc3.isc-vs.ch/ (any other host name is redirected there)
SourceOfficial Grafana RPM repository (https://rpm.grafana.com), package grafana
Version13.2.4
StackNative systemd service (grafana-server), HTTPS terminated by Grafana itself (no reverse proxy)
DatabaseSQLite (/var/lib/grafana/grafana.db)
AuthLDAPS to FreeIPA only (group access-grafana) + local admin as break-glass
ScopeISC3 only today; Calc may be added later

Sign-in​

Every account signs in with its FreeIPA identity over LDAPS (ipa01.ipa.isc-vs.ch:636, TLS 1.3, certificate checked against the FreeIPA CA). Rights come from groups only:

FreeIPA groupContainsGrafana role
access-grafanathe three groups below, nothing elseadmission (LDAP search filter)
app-shared-prod-grafana-adm-m1adm-m1-shared-grafana (-m1 accounts)Admin + Server Admin
app-shared-prod-grafana-editornamed accounts (tristan.martinet, intern, 2026-11-19)Editor: dashboards and folders, Explore; no data sources, users or plugins
app-shared-prod-grafana-viewernamed accountsViewer

There is no catch-all mapping: an account outside these groups cannot sign in. Grafana is an M1 application, so -c0 credentials are never typed into it; apply.py check (freeipa-model, ACCESS_PLANE) fails if a C0 identity ends up in access-grafana. To grant access, add the account to the right group in FreeIPA — never in Grafana.

The LDAP configuration lives only in files: /etc/grafana/ldap.toml and [auth.ldap] of grafana.ini. A configuration saved from the UI (Administration → Authentication → LDAP) is stored in the database and silently overrides the files; the one entered on 2026-10-15 (stale bind password) was deleted on 2026-10-27 with DELETE /api/v1/sso-settings/ldap. Do not use that page.

Bind account and its password​

Grafana searches the directory as the sysaccount svc-grafana-m1 (FreeIPA role group svc-m1-shared-ldap-bind). Its password is owned by OpenBao (ldap-freeipa-m1/static-role/svc-grafana-m1, rotated every 6 days) and known by no human. grafana-ldap-bind.timer on srv-gf reads the current value every 15 min, authenticated by the host's FreeIPA certificate (auth/cert-freeipa, role srv-gf-m1), renders ldap.toml, proves the bind, and restarts Grafana only when the password changed. Details and runbook: dc-isc-prod playbooks/secrets/consumers/grafana/README.md.

Break-glass​

The local admin account works even when FreeIPA is down (tested 2026-10-27 with port 636 blocked). Password: Vaultwarden organisation ISC, item « Grafana admin ». Every new admin session sends an e-mail to rack-admins@isc-vs.ch (grafana-breakglass-watch.timer, every 5 min). HTTP basic auth on the API is disabled: automations use service account tokens.

TLS and hardening​

ItemValue
Certificate/etc/grafana/tls/server.{crt,key}, HTTP/srv-gf.isc3.isc-vs.ch, FreeIPA CA, certmonger grafana-isc3-fqdn (auto-renew)
Reloadcerts_watch_interval = 1m (HTTPS); certmonger post-save restarts Grafana (Prometheus client certificate)
ProtocolTLS 1.3 only, HSTS one year, CSP on, cookie_secure, gravatar off
Sessions2 h inactivity, 12 h maximum
Firewallhttps, ssh (cockpit removed, rpcbind masked)

Verifying​

systemctl is-active grafana-server
curl --noproxy '*' -fsS https://srv-gf.isc3.isc-vs.ch/api/health
systemctl list-timers grafana-ldap-bind.timer grafana-breakglass-watch.timer
journalctl -u grafana-ldap-bind.service -n 5 -o cat # « mot de passe inchangé » or « installé »

As admin: Administration → Authentication → LDAP must show ipa01.ipa.isc-vs.ch:636 available (read the status only, do not save anything there).

Where the data lives​

Grafana stores no measurements. Every panel queries Prometheus live for the selected time range.

WhatWhereKept
Metrics and their history (all the curves)Prometheus TSDB, srv-pm:/var/lib/prometheus15 days (--storage.tsdb.retention.time=15d)
Dashboards, folders, users, service accountsGrafana SQLite, srv-gf:/var/lib/grafana/grafana.dbuntil deleted (VM backup)
Foreman patch events (new / resolved / reappeared…)srv-fm:/var/lib/isc-fmops/events.jsonl400 days

A curve older than 15 days is therefore empty even if the dashboard existed. A 12-month history needs its own database (PostgreSQL, not installed yet): see the todo.

Dashboards​

DashboardSourceData
Node Exporter Full (rYdddlPWk)grafana.comjob node
TISC Editor (tisc-editor)hand-madejob tisc
Keycloak, NetBird, Windmillnone yet — being built by the intern (2026-11-19)jobs keycloak, netbird, windmill (collection)
Foreman Operations & Security Center — folder fmops: /d/fmops-command-center, /d/fmops-hostgenerated, dc-isc-prod playbooks/monitoring/foreman-ops/job fmops (scraped, up on 2026-11-19)

The fmops-* dashboards are code: they are generated by build_dashboards.py and published by push_dashboards.py. Edits made in the UI are overwritten at the next publish. A tile with no data is grey and labelled INCONNU (unknown), never green. Service account svc-foreman-operations-grafana (org role None, Edit on folder fmops only) has no token yet.