Add uptime_ns field to mongodb input (#6669)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user