feat(mongodb): add FsTotalSize and FsUsedSize informations (#10625)
This commit is contained in:
parent
99d2d2b6a9
commit
789f351948
|
|
@ -248,6 +248,8 @@ by running Telegraf with the `--debug` argument.
|
|||
- ok (integer)
|
||||
- storage_size (integer)
|
||||
- type (string)
|
||||
- fs_used_size (integer)
|
||||
- fs_total_size (integer)
|
||||
|
||||
- mongodb_col_stats
|
||||
- tags:
|
||||
|
|
|
|||
|
|
@ -245,15 +245,17 @@ var defaultStorageStats = map[string]string{
|
|||
}
|
||||
|
||||
var dbDataStats = map[string]string{
|
||||
"collections": "Collections",
|
||||
"objects": "Objects",
|
||||
"avg_obj_size": "AvgObjSize",
|
||||
"data_size": "DataSize",
|
||||
"storage_size": "StorageSize",
|
||||
"num_extents": "NumExtents",
|
||||
"indexes": "Indexes",
|
||||
"index_size": "IndexSize",
|
||||
"ok": "Ok",
|
||||
"collections": "Collections",
|
||||
"objects": "Objects",
|
||||
"avg_obj_size": "AvgObjSize",
|
||||
"data_size": "DataSize",
|
||||
"storage_size": "StorageSize",
|
||||
"num_extents": "NumExtents",
|
||||
"indexes": "Indexes",
|
||||
"index_size": "IndexSize",
|
||||
"ok": "Ok",
|
||||
"fs_used_size": "FsUsedSize",
|
||||
"fs_total_size": "FsTotalSize",
|
||||
}
|
||||
|
||||
var colDataStats = map[string]string{
|
||||
|
|
|
|||
|
|
@ -96,6 +96,8 @@ type DbStatsData struct {
|
|||
IndexSize int64 `bson:"indexSize"`
|
||||
Ok int64 `bson:"ok"`
|
||||
GleStats interface{} `bson:"gleStats"`
|
||||
FsUsedSize int64 `bson:"fsUsedSize"`
|
||||
FsTotalSize int64 `bson:"fsTotalSize"`
|
||||
}
|
||||
|
||||
type ColStats struct {
|
||||
|
|
@ -837,6 +839,8 @@ type DbStatLine struct {
|
|||
Indexes int64
|
||||
IndexSize int64
|
||||
Ok int64
|
||||
FsUsedSize int64
|
||||
FsTotalSize int64
|
||||
}
|
||||
type ColStatLine struct {
|
||||
Name string
|
||||
|
|
@ -1361,6 +1365,8 @@ func NewStatLine(oldMongo, newMongo MongoStatus, key string, all bool, sampleSec
|
|||
Indexes: dbStatsData.Indexes,
|
||||
IndexSize: dbStatsData.IndexSize,
|
||||
Ok: dbStatsData.Ok,
|
||||
FsTotalSize: dbStatsData.FsTotalSize,
|
||||
FsUsedSize: dbStatsData.FsUsedSize,
|
||||
}
|
||||
returnVal.DbStatsLines = append(returnVal.DbStatsLines, *dbStatLine)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue