Skip to content

[input.mongo] add fs size #10624

@bdronneau

Description

@bdronneau

Feature Request

Opening a feature request kicks off a discussion.

Proposal:

Hello,

I would like to add FsUsedSize and FsTotalSize to dbDataStats for mongodb input. These values are present in db.stats() (tested on mongo 4.0.x)

uu:ROLE> db.stats()
{
        "db" : "awesome",
        "collections" : 4,
        "views" : 0,
        "objects" : 55025651,
        "avgObjSize" : 2940.6856609684546,
        "dataSize" : 55881708978,
        "storageSize" : 99163236352,
        "numExtents" : 0,
        "indexes" : 22,
        "indexSize" : 9695956992,
        "fsUsedSize" : 314493155328,
        "fsTotalSize" : 622017689600,
        "ok" : 1,
        "operationTime" : Timestamp(1000000005, 6),
        "$clusterTime" : {
                "clusterTime" : Timestamp(1000000005, 6),
                "signature" : {
                        "hash" : BinData(0,"foo="),
                        "keyId" : NumberLong("bar")
                }
        }
}

Current behavior:

Values are not retrieved.

Desired behavior:

Have

  • mongodb_db_stats_fs_total_size
  • mongodb_db_stats_fs_used_size

Use case:

I would like to monitor disk space usage on my instance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/mongodbfeature requestRequests for new plugin and for new features to existing plugins

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions