Open yeya24 opened 5 years ago
Check out https://github.com/percona/mongodb_exporter which is a fork of this repository and seems more active than this one. I'm curious if it would resolve this issue
Hi @yeya24 , does this issue occur if you provide username and password? Because I am experiencing the same issue, but i have not tried it with credentials. This issue appeared after I upgrade from mongo 3.6 to 4.1.9. However I was able to apply the following quick fix:
func (replStats *ReplStats) Export(ch chan<- prometheus.Metric) {
replStats.Apply.Export(ch)
replStats.Buffer.Export(ch)
replStats.Network.Export(ch)
if replStats.PreloadStats != nil {
replStats.PreloadStats.Export(ch)
}
// 3.0+ only
if replStats.Executor != nil {
replStats.Executor.Export(ch)
}
}
In metrics.go This way you probably loose some metrics, but the rest should work.
Start mongodb in 192.168.2.254 centos 7 with no username and password set
Then I start the exporter binary in another centos in the same subnet
The error is