-
Notifications
You must be signed in to change notification settings - Fork 217
Open
Description
I'm unable to run mongodb exporter it always crashes either on Linux (within k8s) or locally on OSX. The error I got is always the same, see below the output from OSX crash. I run MongoDB locally, it does not have any replicas, etc, very basic setup. But error seems to be related to replica sets which I explicitly turned off. The error occurs every time I start querying the mongodb_exporter server via curl command. Any ideas?
mongodb_exporter-darwin-amd64 -mongodb.uri "mongodb://localhost:8230" -mongodb.collect.replset=false -mongodb.collect.oplog=false -alsologtostderr
Listening on :9001 (scheme=HTTP, secured=no, clientValidation=no)
I0625 15:22:31.202532 13887 mongodb_collector.go:63] Collecting Server Status
I0625 15:22:31.222753 13887 mongodb_collector.go:84] exporting ServerStatus Metrics
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1087c8]
goroutine 22 [running]:
panic(0x344640, 0xc420018100)
/usr/local/go/src/runtime/panic.go:500 +0x1a1
github.com/dcu/mongodb_exporter/collector.(*PreloadStats).Export(0x0, 0xc420196180)
/Users/dc/code/go/src/github.com/dcu/mongodb_exporter/collector/metrics.go:363 +0x38
github.com/dcu/mongodb_exporter/collector.(*ReplStats).Export(0xc420247380, 0xc420196180)
/Users/dc/code/go/src/github.com/dcu/mongodb_exporter/collector/metrics.go:352 +0x90
github.com/dcu/mongodb_exporter/collector.(*MetricsStats).Export(0xc4201cbf40, 0xc420196180)
/Users/dc/code/go/src/github.com/dcu/mongodb_exporter/collector/metrics.go:435 +0x4c7
github.com/dcu/mongodb_exporter/collector.(*ServerStatus).Export(0xc4200af720, 0xc420196180)
/Users/dc/code/go/src/github.com/dcu/mongodb_exporter/collector/server_status.go:111 +0x1f9
github.com/dcu/mongodb_exporter/collector.(*MongodbCollector).collectServerStatus(0xc4200165f0, 0xc42007bd40, 0xc420196180, 0x329f00)
/Users/dc/code/go/src/github.com/dcu/mongodb_exporter/collector/mongodb_collector.go:85 +0xe3
github.com/dcu/mongodb_exporter/collector.(*MongodbCollector).Collect(0xc4200165f0, 0xc420196180)
/Users/dc/code/go/src/github.com/dcu/mongodb_exporter/collector/mongodb_collector.go:64 +0x2d4
github.com/dcu/mongodb_exporter/vendor/github.com/prometheus/client_golang/prometheus.(*Registry).Gather.func2(0xc42017c0f0, 0xc420196180, 0x534d00, 0xc4200165f0)
/Users/dc/code/go/src/github.com/dcu/mongodb_exporter/vendor/github.com/prometheus/client_golang/prometheus/registry.go:433 +0x63
created by github.com/dcu/mongodb_exporter/vendor/github.com/prometheus/client_golang/prometheus.(*Registry).Gather
/Users/dc/code/go/src/github.com/dcu/mongodb_exporter/vendor/github.com/prometheus/client_golang/prometheus/registry.go:434 +0x326
Metadata
Metadata
Assignees
Labels
No labels