Add uptime_ns field to mongodb input (#6669)

This commit is contained in:
pertu
2019-12-02 19:16:00 +00:00
committed by Daniel Nelson
parent 906027c39b
commit 6175d17969
4 changed files with 9 additions and 1 deletions

View File

@@ -477,6 +477,8 @@ type StatLine struct {
IsMongos bool
Host string
UptimeNanos int64
// The time at which this StatLine was generated.
Time time.Time
@@ -659,6 +661,8 @@ func NewStatLine(oldMongo, newMongo MongoStatus, key string, all bool, sampleSec
Faults: -1,
}
returnVal.UptimeNanos = 1000 * 1000 * newStat.UptimeMillis
// set connection info
returnVal.CurrentC = newStat.Connections.Current
returnVal.AvailableC = newStat.Connections.Available