Fix mongodb document stats (#5049)
This commit is contained in:
parent
db497a04ea
commit
55b798bd20
|
@ -48,11 +48,18 @@ Error in input [mongodb]: not authorized on admin to execute command { serverSta
|
|||
- active_reads (integer)
|
||||
- active_writes (integer)
|
||||
- commands_per_sec (integer)
|
||||
- connections_current (integer)
|
||||
- connections_available (integer)
|
||||
- connections_total_created (integer)
|
||||
- cursor_timed_out (integer)
|
||||
- cursor_no_timeout (integer)
|
||||
- cursor_pinned (integer)
|
||||
- cursor_total (integer)
|
||||
- deletes_per_sec (integer)
|
||||
- document_deleted (integer)
|
||||
- document_inserted (integer)
|
||||
- document_returned (integer)
|
||||
- document_updated (integer)
|
||||
- flushes_per_sec (integer)
|
||||
- getmores_per_sec (integer)
|
||||
- inserts_per_sec (integer)
|
||||
|
|
|
@ -633,6 +633,12 @@ func NewStatLine(oldMongo, newMongo MongoStatus, key string, all bool, sampleSec
|
|||
returnVal.TotalC = diff(newStat.Metrics.Cursor.Open.Total, oldStat.Metrics.Cursor.Open.Total, sampleSecs)
|
||||
}
|
||||
}
|
||||
if newStat.Metrics.Document != nil {
|
||||
returnVal.DeletedD = newStat.Metrics.Document.Deleted
|
||||
returnVal.InsertedD = newStat.Metrics.Document.Inserted
|
||||
returnVal.ReturnedD = newStat.Metrics.Document.Returned
|
||||
returnVal.UpdatedD = newStat.Metrics.Document.Updated
|
||||
}
|
||||
}
|
||||
|
||||
if newStat.OpcountersRepl != nil && oldStat.OpcountersRepl != nil {
|
||||
|
|
Loading…
Reference in New Issue