vpenso / prometheus-slurm-exporter

Prometheus exporter for performance metrics from Slurm.
GNU General Public License v3.0
229 stars 142 forks source link

panic: runtime error: index out of range [4] with length 4 when running slurm-exporter (HEAD) #82

Open witlox opened 2 years ago

witlox commented 2 years ago

sinfo -h -N -O "NodeList,AllocMem,Memory,CPUsState,StateLong" compute-1 0 7772 0/2/0/2 idle
compute-1 0 7772 0/2/0/2 idle
computegpu-1 0 31356 0/8/0/8 idle
computegpu-1 0 31356 0/8/0/8 idle
computemgpu-v0 515694 0/128/0/128 idle

prometheus-slurm-exporter --listen-address= INFO[0000] Starting Server: source="main.go:59" INFO[0000] GPUs Accounting: false source="main.go:60" panic: runtime error: index out of range [4] with length 4

goroutine 26 [running]: main.ParseNodeMetrics(0xc000030600, 0x25e, 0x600, 0x1) /opt/slurm_exporter/node.go:56 +0x6d6 main.NodeGetMetrics(0x6) /opt/slurm_exporter/node.go:40 +0x2a main.(NodeCollector).Collect(0xc0000ac000, 0xc000070d80) /opt/slurm_exporter/node.go:128 +0x37 github.com/prometheus/client_golang/prometheus.(Registry).Gather.func1() /opt/slurm_exporter/go/modules/pkg/mod/github.com/prometheus/client_golang@v1.2.1/prometheus/registry.go:443 +0x12b created by github.com/prometheus/client_golang/prometheus.(*Registry).Gather /opt/slurm_exporter/go/modules/pkg/mod/github.com/prometheus/client_golang@v1.2.1/prometheus/registry.go:535 +0xe4d