vpenso/prometheus-slurm-exporter

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

Opened this issue · 0 comments

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=myip:port
INFO[0000] Starting Server: ip:port 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