MongoDB collstats metricset

edit
IMPORTANT: This documentation is no longer updated. Refer to Elastic's version policy and the latest documentation.

MongoDB collstats metricset

edit

This is the collstats metricset of the module mongodb.

It is using the top administrative command to return usage statistics for each collection. It provides the amount of time, in microseconds, used and a count of operations for the following types:

  • total
  • readLock
  • writeLock
  • queries
  • getmore
  • insert
  • update
  • remove
  • commands

Fields

edit

For a description of each field in the metricset, see the exported fields section.

Here is an example document generated by this metricset:

{
  "@timestamp": "2016-05-23T08:05:34.853Z",
  "beat": {
    "hostname": "beathost",
    "name": "beathost"
  },
  "metricset": {
    "host": "localhost",
    "module": "mongodb",
    "name": "collstats",
    "rtt": 44269
  },
  "mongodb": {
    "collstats": {
      "db": "admin",
      "collection": "system.users",
      "name": "admin.system.users",
      "total": {
        "time": {
          "us": 54756221
        },
        "count": 3159951
      },
      "lock": {
        "read": {
          "time": {
            "us": 54747284
          },
          "count": 3159944
        },
        "write": {
          "time": {
            "us": 8937
          },
          "count": 7
        }
      },
      "queries": {
        "time": {
          "us": 2310
        },
        "count": 15
      },
      "getmore": {
        "time": {
          "us": 0
        },
        "count": 0
      },
      "insert": {
        "time": {
          "us": 8937
        },
        "count": 7
      },
      "update": {
        "time": {
          "us": 0
        },
        "count": 0
      },
      "remove": {
        "time": {
          "us": 0
        },
        "count": 0
      },
      "commands": {
        "time": {
          "us": 50743698
        },
        "count": 45793
      }
    }
  },
  "type": "metricsets"
}