Replace third-party Slurm exporter with a DeepOps-owned implementation#1366
Merged
Conversation
The exporter previously built from a third-party repository that has been unmaintained since 2024 and needed a build-time patch for a parser panic. Replace it with a small dependency-free Go exporter maintained in this repository (standard library only, no external modules). The owned exporter emits exactly the metric names the shipped Grafana dashboard consumes (slurm_nodes_*, slurm_queue_*, slurm_scheduler_*) plus the aggregate slurm_cpus_* gauges, uses locale- and truncation-safe Slurm client invocations, degrades gracefully when a collector fails (slurm_exporter_collector_errors), and ships unit tests. Intentionally dropped relative to the previous exporter, as nothing in the repo consumes them: per-node series, per-user series, and fair-share series (the sshare bind mount is removed accordingly). Sites needing those can set slurm_exporter_build_image: false and supply their own image.
michael-balint
approved these changes
Jul 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
slurm_nodes_*,slurm_queue_*,slurm_scheduler_*) plus the aggregateslurm_cpus_*gauges, with all series always present (idle clusters omit backfill statistics fromsdiag; the gauges still emit as 0).slurm_exporter_collector_errors) instead of crash-looping; 8 unit tests including fixtures for Slurm 26.05 output shapes.ssharebind mount is removed accordingly). Sites needing them can setslurm_exporter_build_image: falseand supply their own image.Validation
go vet,gofmt, and the unit suite pass; on a Slurm-less host the exporter serves HTTP 200 withcollector_errors 4rather than failing.slurm-cluster.ymlrun): image2.0.0built from in-repo source by the role, service active withNRestarts=0,/metricsHTTP 200 serving 31slurm_*series covering the dashboard contract completely,collector_errors 0, and automatic recovery aftersystemctl restart docker.Notes