Skip to content

Commit

Permalink
fix: mongodb input plugin issue #9845 (#9846)
Browse files Browse the repository at this point in the history
  • Loading branch information
howardyoo authored Oct 4, 2021
1 parent 6c1bdfa commit c1f51b0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions plugins/inputs/mongodb/mongostat.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down

0 comments on commit c1f51b0

Please sign in to comment.