fix: mongodb input plugin issue #9845 (#9846)

This commit is contained in:
Howard Yoo 2021-10-04 11:04:58 -05:00 committed by GitHub
parent 6c1bdfad76
commit c1f51b0645
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -1086,8 +1086,10 @@ func NewStatLine(oldMongo, newMongo MongoStatus, key string, all bool, sampleSec
}
if newStat.Metrics.Repl.Network != nil {
returnVal.ReplNetworkBytes = newStat.Metrics.Repl.Network.Bytes
returnVal.ReplNetworkGetmoresNum = newStat.Metrics.Repl.Network.GetMores.Num
returnVal.ReplNetworkGetmoresTotalMillis = newStat.Metrics.Repl.Network.GetMores.TotalMillis
if newStat.Metrics.Repl.Network.GetMores != nil {
returnVal.ReplNetworkGetmoresNum = newStat.Metrics.Repl.Network.GetMores.Num
returnVal.ReplNetworkGetmoresTotalMillis = newStat.Metrics.Repl.Network.GetMores.TotalMillis
}
returnVal.ReplNetworkOps = newStat.Metrics.Repl.Network.Ops
}
}