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 committed Mar 15, 2019
1 parent fff30cc commit 7ffc279
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 7ffc279

Please sign in to comment.