Slurm Exporter - Cluster Usage
Comprehensive utilization metrics: CPU/memory/GPU gauges, per-user and per-account breakdowns, fairshare, scheduler health, and trend timeseries.
Comprehensive utilization metrics: CPU/memory/GPU gauges, per-user and per-account breakdowns, fairshare, scheduler health, and trend timeseries.
| Panel | Type | Description |
|---|---|---|
| CPU / Node / Memory / GPU Utilization | gauge | Current utilization percentages |
| Avg CPU Util (period) | stat | avg_over_time(cpu_util[1h:5m]) |
| Max CPU Util (period) | stat | max_over_time(cpu_util[1h:5m]) |
| Total CPUs / Nodes / GPUs / Running Jobs | stat | Cluster capacity snapshot |
| CPU Utilization % Over Time | timeseries | Instantaneous + rolling average |
| Memory Utilization % Over Time | timeseries | sum(node_mem_alloc) / sum(node_mem_total) |
| GPU Utilization & Allocation % | timeseries | GPU util and alloc trend |
| Node States Over Time | timeseries | Idle / Mix / Alloc / Down / Drain |
| FairShare per Account | timeseries | Fairshare factor by account |
| Running / Pending Jobs per User & Account | timeseries | Per-user and per-account breakdown |
| CPUs Allocated per User & Account | timeseries | CPU demand by user/account |
| GPU Running per Account & User | timeseries | GPU job distribution |
| CPU Allocation (total) | timeseries | Alloc / Idle / Total CPUs |
| CPUs Allocated per Partition | timeseries | Per-partition CPU usage |
| GPU States Over Time | timeseries | Total / Alloc / Idle GPU trend |
| Scheduler Stats | stat + timeseries | Threads, queue size, cycle time, backfill |
Requirements
- Prometheus Slurm Exporter, scraped by Prometheus
- Grafana 12+ with a Prometheus datasource
- The dashboard uses a
$datasourcetemplate variable, so it works with any Prometheus datasource name
Getting started
- Run the exporter on a host with a working Slurm client + munge setup (slurmctld host, login node or monitoring VM):
docker run -d --name slurm_exporter \
-p 9341:9341 \
-v /etc/slurm:/etc/slurm:ro \
-v /var/run/munge:/var/run/munge:ro \
-v /etc/munge/munge.key:/etc/munge/munge.key:ro \
sckyzo/slurm-exporter:latest
Pre-compiled binaries, systemd unit and Kubernetes options are described in the project README.
- Add a scrape job to Prometheus:
scrape_configs:
- job_name: slurm
static_configs:
- targets: ['slurm-exporter-host:9341']
- Import this dashboard and select your Prometheus datasource.
The full dashboard suite
This dashboard is part of a set of 10 dashboards maintained with the exporter:
| # | Dashboard | Focus |
|---|---|---|
| 01 | Cluster Overview | Slurm HPC cluster overview: nodes, jobs, CPU/GPU utilization, partition breakdown. |
| 02 | Jobs & Queue | Job states, queue status, top users and accounts by CPU/job usage. |
| 03 | Node Detail | Per-node CPU and memory utilization by partition. Designed to scale from small clusters to 100k+ nodes. |
| 04 | Cluster Usage Statistics (this one) | Cluster utilization (CPU/Memory/GPU/Node), fairshare, jobs, users, accounts, scheduler. Based on gnetId 4323. |
| 05 | Scheduler | slurmctld scheduler cycle times, backfill stats, RPC operation breakdown. |
| 06 | Reservations & Licenses | Reservation status, timeline, node health per reservation, and software license usage. |
| 07 | Accounting | HPC accounting: user and account resource consumption, FairShare analysis, top consumers, and priority diagnostics. |
| 08 | Exporter Health | Collector success/failure status, scrape duration, and Slurm binary version info. |
| 09 | Exporter Performance | Internal performance dashboard for slurm_exporter: command durations, cache freshness, error rates, and scrape health. Use this to validate optimisations and detect slowdowns before they cause scrape failures. |
| 10 | All Metrics Reference | All metrics exposed by slurm_exporter — reference dashboard for admins/users to copy panels into their own dashboards. GPU panels included (show 0 if no GPUs). |
All JSON files, screenshots and Prometheus alert/recording rules are in monitoring/ on GitHub. Issues and contributions welcome.
Source file: 04-slurm-usage.json | UID: slurm-usage
Data source config
Collector type:
Collector plugins:
Collector config:
Revisions
Upload an updated version of an exported dashboard.json file from Grafana
| Revision | Description | Created | |
|---|---|---|---|
| Download |