Skip to content

Commit

Permalink
Fix server connection info in mongodb input (influxdata#5048)
Browse files Browse the repository at this point in the history
  • Loading branch information
otherpirate authored and Jean-Louis Dupond committed Apr 22, 2019
1 parent 71ec0ad commit 494541a
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 494541a

Please sign in to comment.