clamav-prometheus-exporter
clamav-prometheus-exporter copied to clipboard
Index out of range on start, causing crash
Using current head of the branch, when I try to run the exporter, I get this error:
panic: runtime error: index out of range [2] with length 1
goroutine 26 [running]:
github.com/r3kzi/clamav-prometheus-exporter/pkg/collector.(*Collector).Collect(0xc0001ae100, 0xc000055f60?)
/usr/pkg/mod/github.com/r3kzi/[email protected]/pkg/collector/collector.go:139 +0x1452
github.com/prometheus/client_golang/prometheus.(*Registry).Gather.func1()
/usr/pkg/mod/github.com/prometheus/[email protected]/prometheus/registry.go:444 +0xfb
created by github.com/prometheus/client_golang/prometheus.(*Registry).Gather
/usr/pkg/mod/github.com/prometheus/[email protected]/prometheus/registry.go:455 +0x4c5
I am getting this error as well when the exporter is unable to connect to the clamav service which is down
goroutine 7 [running]:
github.com/r3kzi/clamav-prometheus-exporter/pkg/collector.(*Collector).Collect(0xc0000aa100, 0xc000044760?)
/go/pkg/mod/github.com/r3kzi/[email protected]/pkg/collector/collector.go:139 +0x1452
github.com/prometheus/client_golang/prometheus.(*Registry).Gather.func1()
/go/pkg/mod/github.com/prometheus/[email protected]/prometheus/registry.go:444 +0x10d
created by github.com/prometheus/client_golang/prometheus.(*Registry).Gather
/go/pkg/mod/github.com/prometheus/[email protected]/prometheus/registry.go:455 +0x4bd