clamav-prometheus-exporter icon indicating copy to clipboard operation
clamav-prometheus-exporter copied to clipboard

Index out of range on start, causing crash

Open micah opened this issue 2 years ago • 1 comments

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

micah avatar Jul 29 '22 13:07 micah

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

padraiglennon avatar Jun 26 '23 15:06 padraiglennon