Fix server connection info in mongodb input (#5048)

This commit is contained in:
Mauro Murari 2018-11-27 23:45:23 -02:00 committed by Daniel Nelson
parent 1279db1a8f
commit 9bc92c5c75
1 changed files with 5 additions and 0 deletions

View File

@ -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"]