✨ darkone.service.prometheus
Prometheus monitoring server with declarative Alertmanager escalation.
Options
Section titled “Options”-
enable
boolEnable the Prometheus metrics + alerting server -
retentionTime
strPrometheus metrics retention duration -
alerting.enable
boolEnable Alertmanager (defaults on once the Matrix alert rooms are provisioned) -
alerting.matrix.enable
boolDeliver alerts to Matrix rooms via the matrix-alertmanager bot -
alerting.matrix.userId
strMatrix user ID of the alert bot (defaults from network.matrix.bot) -
alerting.matrix.warningsRoom
strMatrix room ID for warnings (defaults from network.matrix.warningsRoom) -
alerting.matrix.incidentsRoom
strMatrix room ID for incidents (defaults from network.matrix.incidentsRoom) -
alerting.email.enable
boolAlso send critical alerts by mail (through the local Postfix relay) -
alerting.email.to
strRecipient of critical alert mails -
alerting.network.enable
boolProbe network reachability (gateway/tailnet/DNS) with blackbox_exporter -
alerting.network.internetProbeTargets
listOf strExternal IPs the zone gateway pings to detect a WAN outage. When all fail,ZoneInternetDownfires and inhibits the (false) down-alerts of hosts reachable only across the WAN (e.g. the HCS). Empty disables it. -
alerting.network.httpProbeUrls
listOf strHTTP(S) URLs probed for liveness (ServiceEndpointDown) and TLS certificate expiry (CertificateExpiringSoon/Critical). Empty by default: list the public web endpoints worth watching. Redirects to an SSO login (3xx) count as up; cert expiry is read from the TLS handshake regardless of HTTP status. -
alerting.silenceOnRebuild
boolShip the dnf-maintenance flag (textfile collector) so rebuilds inhibit a node’s alerts -
alerting.thresholds
attrsOverride resource alert thresholds (see dnf/lib/alerts.nix defaults) -
alerting.silences
listOf submoduleKnown, accepted alerts that must never notify. Each entry becomes an Alertmanager route to thenullreceiver: the alert still fires and stays visible in the Prometheus/Alertmanager/Grafana UIs, it just stops reaching Matrix and mail.Declared on the host running Prometheus, since that is where the zone’s rules and routes are generated. A fleet-wide consumer module (
usr/modules/alerts.nix) is the practical place: it is imported everywhere and only takes effect where Prometheus runs.- alert
strAlert name to mute (alertnamelabel). Always constrained, so sibling severities stay armed. - host
nullOr strRestrict the silence to one host. Null mutes the alert fleet-wide. - matchers
attrsExtra exact label matchers, ANDed with the others (e.g. the mount or device the alert is about). - reason
strWhy this alert is accepted, and what would make the silence removable.
- alert
darkone.service.prometheus = { enable = false; retentionTime = "30d"; alerting.enable = roomsReady; alerting.matrix.enable = true; alerting.matrix.userId = "@alertbot:domain.tld"; alerting.matrix.warningsRoom = "!warnings:domain.tld"; alerting.matrix.incidentsRoom = "!incidents:domain.tld"; alerting.email.enable = true; alerting.email.to = "admin@${network.domain}"; alerting.network.enable = true; alerting.network.internetProbeTargets = [ ]; alerting.network.httpProbeUrls = [ ]; alerting.silenceOnRebuild = true; alerting.thresholds = { }; alerting.silences = [ ]; alerting.silences.alert = "DiskSpaceLow"; alerting.silences.host = "srv-main"; alerting.silences.matchers = { }; alerting.silences.reason = null;};Source: modules/service/prometheus.nix 🡕