Skip to content

Commit

Permalink
Fix server connection info in mongodb input (#5048)
Browse files Browse the repository at this point in the history
(cherry picked from commit 9bc92c5)
  • Loading branch information
otherpirate authored and danielnelson committed Nov 29, 2018
1 parent 2bdee69 commit 08e6d6c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions plugins/inputs/mongodb/mongostat.go
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,11 @@ func NewStatLine(oldMongo, newMongo MongoStatus, key string, all bool, sampleSec
Faults: -1,
}

// set connection info
returnVal.CurrentC = newStat.Connections.Current
returnVal.AvailableC = newStat.Connections.Available
returnVal.TotalCreatedC = newStat.Connections.TotalCreated

// set the storage engine appropriately
if newStat.StorageEngine != nil && newStat.StorageEngine["name"] != "" {
returnVal.StorageEngine = newStat.StorageEngine["name"]
Expand Down

0 comments on commit 08e6d6c

Please sign in to comment.