Statistics overview

Clusters, databases, nodes, and shards collect various statistics at regular time intervals. You can view the statistics for these objects via GET stats requests to their respective endpoints:

Response object

Statistics returned from API requests always contain the following fields:

  • interval: a string that represents the statistics time interval. Valid values include:
    • 1sec
    • 10sec
    • 5min
    • 15min
    • 1hour
    • 12hour
    • 1week
  • stime: a timestamp that represents the beginning of the interval, in the format “2015-05-27T12:00:00Z”
  • etime: a timestamp that represents the end of the interval, in the format “2015-05-27T12:00:00Z”

The statistics returned by the API also contain fields that represent the values of different metrics for an object during the specified time interval.

More details about the metrics relevant to each object:

Note:
Some statistics are for internal use only. They are not documented and should be ignored.
Note:
Certain statistics will only appear in API responses when they are relevant.

Optional URL parameters

There are several optional URL parameters you can pass to the various GET stats requests in order to filter the returned statistics.

  • stime: limit the start of the time range of the returned statistics
  • etime: limit the end of the time range of the returned statistics
  • metrics: only return the statistics for the specified metrics (comma-separated list)

Maximum number of samples per interval

The system retains a maximum number of most recent samples for each interval.

Interval Max samples
1sec 10
10sec 30
5min 12
15min 96
1hour 168
12hour 62
1week 53

The actual number of samples returned by a GET stats request depends on how many samples are available and any filters applied by the optional URL parameters. For example, newly created objects (clusters, nodes, databases, or shards) or a narrow time filter range will return fewer samples.

Note:
To reduce load generated by stats collection, relatively inactive databases or shards (less than 5 ops/sec) do not collect 1sec stats at one second intervals. Instead, they collect 1sec stats every 2-5 seconds but still retain the same maximum number of samples.