mehdy / keepalived-exporter

Prometheus Keepalived exporter
GNU General Public License v3.0
115 stars 37 forks source link

Exporter crashes while it is running #78

Closed Alexcei88 closed 2 years ago

Alexcei88 commented 2 years ago

I am catching a follow panic. Version of exporter is 1.0.0

panic: runtime error: index out of range [2] with length 1

goroutine 31 [running]:
github.com/cafebazaar/keepalived-exporter/internal/collector.(*KeepalivedCollector).Collect(0xc0000b48c0, 0xc0000ad500)
        /home/seena/storage/keepalived-exporter/internal/collector/collector.go:151 +0x29ef
github.com/prometheus/client_golang/prometheus.(*Registry).Gather.func1()
        /home/seena/go/pkg/mod/github.com/prometheus/client_golang@v1.7.1/prometheus/registry.go:444 +0x19d
created by github.com/prometheus/client_golang/prometheus.(*Registry).Gather
        /home/seena/go/pkg/mod/github.com/prometheus/client_golang@v1.7.1/prometheus/registry.go:536 +0xe36

My keepalived version is

Keepalived v2.2.4 (08/21,2021)
Alexcei88 commented 2 years ago

I just updated to latest version 1.0.2 and a problem lost. Sorry for issue.