Monitoring
Introduction
The monitoring module exports host metrics to Grafana Cloud through Alloy, provides Cockpit for host administration, and runs Smokeping for network latency history.
Requirements
Grafana Cloud monitoring requires the agenix-managed
grafana-cloud-env secret containing
GRAFANA_CLOUD_API_KEY. Set the host role to
desktop, laptop, or server;
optionally enable SMART metrics on hosts where smartctl can
inspect the disks. Smokeping requires the Podman server and shared
storage. Cockpit’s configured web origins depend on the host name and
tailnet domain.
Persistence
Alloy state is persisted at /var/lib/private/alloy
through the root filesystem persistence abstraction. Smokeping state is
stored in storage.datasets.app.children.smokeping. Cockpit
primarily exposes host state and does not declare a separate application
dataset.
Troubleshooting
For Grafana Cloud, inspect alloy.service,
/etc/alloy/config.alloy,
/run/agenix/grafana-cloud-env, and persisted state at
/var/lib/private/alloy. If SMART metrics are missing, check
prometheus-smartctl-exporter.service and its loopback
listener. Smokeping uses smokeping.service,
apps-network.service, and
/storage/app/smokeping/{config,data}; Cockpit uses
cockpit.socket and cockpit.service on port
9090.
Options
cockpit.enable
Enable Cockpit web UI.
Type: boolean
Default:
falseDeclared by:
grafanaCloud.enable
Whether to enable host monitoring through Grafana Cloud.
Type: boolean
Default:
falseExample:
trueDeclared by:
grafanaCloud.prometheus.url
Grafana Cloud Prometheus remote-write endpoint.
Type: string
Default:
"https://prometheus-us-central1.grafana.net/api/prom/push"Declared by:
grafanaCloud.prometheus.username
Grafana Cloud Prometheus tenant ID.
Type: string
Default:
"711583"Declared by:
grafanaCloud.role
Host role attached to metrics for dashboards and alert routing.
Type: one of “desktop”, “laptop”, “server”
Default:
"desktop"Declared by:
grafanaCloud.smartctl.enable
Whether to enable SMART metrics collection.
Type: boolean
Default:
falseExample:
trueDeclared by:
smokeping.enable
Enable Smokeping container and Caddy endpoint.
Type: boolean
Default:
falseDeclared by: