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)
|
- ok (integer)
|
||||||
- storage_size (integer)
|
- storage_size (integer)
|
||||||
- type (string)
|
- type (string)
|
||||||
|
- fs_used_size (integer)
|
||||||
|
- fs_total_size (integer)
|
||||||
|
|
||||||
- mongodb_col_stats
|
- mongodb_col_stats
|
||||||
- tags:
|
- tags:
|
||||||
|
|
|
||||||
|
|
@ -245,15 +245,17 @@ var defaultStorageStats = map[string]string{
|
||||||
}
|
}
|
||||||
|
|
||||||
var dbDataStats = map[string]string{
|
var dbDataStats = map[string]string{
|
||||||
"collections": "Collections",
|
"collections": "Collections",
|
||||||
"objects": "Objects",
|
"objects": "Objects",
|
||||||
"avg_obj_size": "AvgObjSize",
|
"avg_obj_size": "AvgObjSize",
|
||||||
"data_size": "DataSize",
|
"data_size": "DataSize",
|
||||||
"storage_size": "StorageSize",
|
"storage_size": "StorageSize",
|
||||||
"num_extents": "NumExtents",
|
"num_extents": "NumExtents",
|
||||||
"indexes": "Indexes",
|
"indexes": "Indexes",
|
||||||
"index_size": "IndexSize",
|
"index_size": "IndexSize",
|
||||||
"ok": "Ok",
|
"ok": "Ok",
|
||||||
|
"fs_used_size": "FsUsedSize",
|
||||||
|
"fs_total_size": "FsTotalSize",
|
||||||
}
|
}
|
||||||
|
|
||||||
var colDataStats = map[string]string{
|
var colDataStats = map[string]string{
|
||||||
|
|
|
||||||
|
|
@ -96,6 +96,8 @@ type DbStatsData struct {
|
||||||
IndexSize int64 `bson:"indexSize"`
|
IndexSize int64 `bson:"indexSize"`
|
||||||
Ok int64 `bson:"ok"`
|
Ok int64 `bson:"ok"`
|
||||||
GleStats interface{} `bson:"gleStats"`
|
GleStats interface{} `bson:"gleStats"`
|
||||||
|
FsUsedSize int64 `bson:"fsUsedSize"`
|
||||||
|
FsTotalSize int64 `bson:"fsTotalSize"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ColStats struct {
|
type ColStats struct {
|
||||||
|
|
@ -837,6 +839,8 @@ type DbStatLine struct {
|
||||||
Indexes int64
|
Indexes int64
|
||||||
IndexSize int64
|
IndexSize int64
|
||||||
Ok int64
|
Ok int64
|
||||||
|
FsUsedSize int64
|
||||||
|
FsTotalSize int64
|
||||||
}
|
}
|
||||||
type ColStatLine struct {
|
type ColStatLine struct {
|
||||||
Name string
|
Name string
|
||||||
|
|
@ -1361,6 +1365,8 @@ func NewStatLine(oldMongo, newMongo MongoStatus, key string, all bool, sampleSec
|
||||||
Indexes: dbStatsData.Indexes,
|
Indexes: dbStatsData.Indexes,
|
||||||
IndexSize: dbStatsData.IndexSize,
|
IndexSize: dbStatsData.IndexSize,
|
||||||
Ok: dbStatsData.Ok,
|
Ok: dbStatsData.Ok,
|
||||||
|
FsTotalSize: dbStatsData.FsTotalSize,
|
||||||
|
FsUsedSize: dbStatsData.FsUsedSize,
|
||||||
}
|
}
|
||||||
returnVal.DbStatsLines = append(returnVal.DbStatsLines, *dbStatLine)
|
returnVal.DbStatsLines = append(returnVal.DbStatsLines, *dbStatLine)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue