Monitoring
A monitored cluster sends its Slurm metrics, its nodes’ resource use and their systemd journals to a monitoring stack that belongs to the realm: Grafana Alloy collects them, Prometheus stores the metrics, Loki the logs, and Grafana shows them on dashboards made for sind. The stack runs as four containers on the realm’s mesh network and needs no agent in the nodes. Use it to watch a scheduler test, to find which node logged an error, or to see what a job really used next to what Slurm allocated.
Turn it on
Set monitoring: true in the cluster config:
kind: Cluster
name: dev
monitoring: true
nodes: [controller, db, worker: 2]sind create cluster --config cluster.yamlOr add --monitoring to sind create cluster, also on top of a config:
sind create cluster --monitoringThe flag and the key are ORed: either turns monitoring on, and --monitoring=false does not turn off a config’s monitoring: true.
The first monitored cluster of a realm creates the stack, and the next ones join it. sind create cluster returns once the stack is ready and knows the new nodes, within the same --wait limit as the nodes. Monitoring is fixed for the cluster’s life: an existing cluster cannot be switched, and workers added with sind create worker are monitored when their cluster is.
Requirements
-
Slurm 26.05 or later, with the HTTP parser plugin: slurmctld serves its metrics, and slurmctld and slurmd their health endpoints, over HTTP on their RPC ports. The default image and the
26.11and26.05images have it. A cluster onsind-node:25.11fails before any node exists:image ghcr.io/gsi-hpc/sind-node:25.11 cannot serve monitoring: Slurm 25.11.9 is older than 26.05, which monitoring needsCustom images need a few more things; see Building Images.
-
A managed cluster. An unmanaged cluster is rejected, as sind writes no
slurm.conffor it. Unmanaged workers, db and api nodes of a managed cluster are collected, without Slurm probes. -
Metrics without a token. The
mainsection must not set aMetricsTypeother thanmetrics/openmetrics(oropenmetrics),CommunicationParameters=disable_httporMetricsAuthUsers, and withPrivateDatait must also setMetricsParameters=ignore_private_data. sind setsMetricsType=metrics/openmetricsitself.
sind pulls the stack’s four images with the node images when it creates the stack, so the first monitored create downloads them once; later ones reuse them.
Open Grafana
Grafana listens on port 3000 of its container on the mesh. With host DNS, open:
http://grafana.sind.sind:3000The name is grafana.<realm>.sind, so a cluster in realm ci-42 has its Grafana at http://grafana.ci-42.sind:3000. Without host DNS, use the address sind get monitoring prints in its JSON output; on Linux the host reaches the containers’ addresses directly:
sind get monitoring -o json | jq -r '.services[] | select(.name == "grafana") | "http://\(.ip):3000"'When Docker runs on another machine that you reach over SSH, forward the port:
ssh -L 3000:grafana.sind.sind:3000 devboxand open http://localhost:3000. sind publishes no host port, so realms and CI jobs never compete for port 3000.
There is no login: every visitor is an anonymous org Editor, who can use Explore and save dashboards, but cannot add or change datasources. Grafana alerting is off, as sind provisions no alerts. Grafana installs no plugins and contacts nothing on the internet, so the stack works offline once its images are on the host.
What is collected
| Source | What | Where it comes from |
|---|---|---|
| Slurm metrics | Nodes, jobs, partitions and the scheduler as slurmctld counts them, and jobs per user and account | slurmctld’s OpenMetrics endpoints (/metrics/*) on the controllers, every 30 s (users and accounts every 60 s) |
| Slurm health | Whether slurmctld is live and ready, slurmd ready, slurmdbd listening | HTTP probes of /livez and /readyz, and a TCP connect to slurmdbd, every 15 s |
| Resource use | CPU, memory, processes and disk I/O of each node’s container, of each systemd unit in it and of each job | the nodes’ cgroups on the host, every 15 s |
| Logs | Each node’s whole journal: the Slurm daemons, MariaDB, systemd and every other unit | the node’s persistent journal |
Every series and log line has the labels realm, cluster, node and role. Slurm metrics also have slurm_version, the cluster’s Slurm version. Logs also have unit and level. The Slurm daemons and MariaDB log every line at journal priority info, so sind reads the level from the message: a slurmctld error: ... line has level="err", a MariaDB [Warning] line level="warning". Resource series have unit for a systemd unit’s cgroup and job_id for a job’s.
A standby slurmctld redirects the metrics to the controller in control, so on a cluster with a backup controller the scrape’s up is 1 only on the controller in control.
Dashboards
The dashboards are in the folder sind. Each one picks the realm and the cluster at the top.
| Dashboard | Shows |
|---|---|
| Slurm cluster | Opens first: the controller in control, nodes and jobs by state, CPUs and memory allocated, partitions, and the scheduler’s cycles and queues |
| Nodes | Each node’s CPU, memory, processes and disk I/O next to what Slurm has allocated on it, and the use of each unit |
| Service health | The Slurm daemons’ probes as a node by service matrix, which controller is in control, and the errors and warnings in the logs |
| Users and accounts | Running and pending jobs and allocated CPUs per user and per account, and the CPU and memory of each running job |
| Logs | The journals of the cluster’s nodes, filtered by node, unit, level and a search text |
The node panels link to the Logs dashboard for the same node. The dashboards refresh every 30 s, and at most every 15 s, the shortest scrape interval. They cannot be changed in place: save a copy to change one. Explore queries Prometheus and Loki directly, for example the slurmctld errors of cluster dev:
{cluster="dev", unit="slurmctld.service", level="err"}Prometheus and Loki answer on the mesh too. Prometheus has a web UI and an API; Loki has an API only, so a browser shows no page at its address and its logs are read in Grafana’s Explore. Their addresses are prometheus.<realm>.sind:9090 and loki.<realm>.sind:3100, without authentication:
curl -s 'http://prometheus.sind.sind:9090/api/v1/query?query=slurm_nodes_idle'Show the stack
sind get monitoringSERVICE CONTAINER ADDRESS TYPE STATUS
grafana sind-grafana http://grafana.sind.sind:3000 web UI running
prometheus sind-prometheus http://prometheus.sind.sind:9090 web UI + API running
loki sind-loki http://loki.sind.sind:3100 API running
alloy sind-alloy http://172.18.0.9:12345 web UI running
loki serves an API only, no web UI. To see its data, open Grafana and use Explore.
CLUSTERS
NAME NODES SLURM
default 3 26.11.0
dev 5 26.11.0TYPE says what the port serves: web UI, API, or both. Only Grafana and Prometheus (and Alloy’s debug page) show a page in a browser; Loki has an API only. STATUS is the container’s state, not ready while it runs but does not answer its readiness check, unchecked while it runs but Grafana, which runs the checks, does not, or missing. Without a stack, the command fails with no monitoring stack in realm "sind". sind get cluster lists the stack’s containers under MESH SERVICES and the journal mount under MOUNTS (see Diagnostics).
Journals
On a monitored cluster, each node keeps its journal on a Docker volume of the realm, <realm>-journal, in a directory of its own, <cluster>/<node>, mounted at /var/log/journal; Alloy reads it from there. sind caps it at 64 MB per node. The journal then survives sind power reboot and cycle, so sind logs NODE SERVICE also shows the node’s earlier runs. A cluster created again under the same name, or a worker added again, starts with an empty journal.
MariaDB’s own messages reach the journal only when its error log goes there, as in the official images. Unmanaged nodes are collected too: a cap that your provisioning sets for journald is replaced by sind’s 64 MB.
Lifecycle
- Several clusters of a realm share one stack, and its dashboards switch between them. A cluster created without monitoring in a realm with a stack is not collected.
sind create workeradds the new workers to the stack, andsind delete workerandsind delete clustertake their nodes out. The metrics and logs collected from them stay until they expire.- Deleting the realm’s last cluster removes the stack with the mesh, its data included. The stack stays as long as the realm has a cluster, monitored or not.
- After a host reboot the stack is stopped like the nodes;
sind power onstarts it again (see Power Control). - After a sind upgrade that changes the stack’s images, configuration or dashboards, the next monitored
sind create clusterorsind create workerreplaces the stack’s containers and keeps their data. It also replaces a container that never started, as an interrupted create can leave one without its configuration. - Retention: Prometheus keeps 7 days of metrics, at most 2 GB, and Loki 7 days of logs.
In CI
Once the images are on the runner, the stack starts beside the Slurm daemons, and it needs no host port, so parallel jobs in their own realms do not collide. With sind-action, turn it on in the cluster config:
- uses: GSI-HPC/sind-action@v2
with:
clusters: |
- kind: Cluster
monitoring: true
nodes: [controller, worker: 2]A later step can query the stack, or save a cluster’s logs when the tests failed:
LOKI=http://$(sind get monitoring -o json | jq -r '.services[] | select(.name == "loki") | .ip'):3100
curl -sG "$LOKI/loki/api/v1/query_range" \
--data-urlencode 'query={cluster="default", level=~"crit|err"}' \
--data-urlencode limit=5000 \
--data-urlencode "start=$(date -d '-1 hour' +%s)000000000" > slurm-errors.jsonThe stack’s images come from Docker Hub; a runner that cannot reach it needs them preloaded (see Installation).
Limits
- Anyone who reaches the mesh is a Grafana org Editor and reads everything that the stack holds: local users of the host, jobs on the nodes, and web pages that a browser on the host opens. A page reaches the stack by its address or by DNS rebinding, and needs no answer to write: it can add series to Prometheus through its remote-write receiver, add log lines to Loki, and stop Loki with
/ingester/shutdown, whichsind get monitoringthen shows andsind power onrepairs. Loki refuses deletes. Browsers that ask before a page reaches a local network, such as Chrome from version 142, ask first. Prometheus and Loki have no authentication. The stack is a development tool: do not browse untrusted pages on a host where it holds data that matters. - Grafana, Prometheus and Loki get 1 GB of memory each, Alloy 512 MB.
- Slurm 26.05 reports the node memory of its metrics, such as
slurm_node_memory_bytes, in MiB, asslurm.confstatesRealMemory, whatever the_bytesin the names says. Slurm 26.11 and later report bytes. The dashboards show bytes for both. In a query of your own, multiply by 1048576 the series whoseslurm_versionis a 26.05 release. Slurm reports the memory of jobs and partitions in MiB in every release. - Job history, such as efficiency and timelines as
sacctshows them, is not collected: no metric carries accounting data.



