Statistics
An object that contains metrics for clusters, databases, nodes, or shards
Statistics overview
Clusters, databases, nodes, and shards collect various statistics at regular time intervals. View the statistics for these objects using GET stats
requests to their respective endpoints:
View endpoint stats using GET
requests, see:
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:
Optional URL parameters
There are several optional URL parameters you can pass to the various GET stats
requests to filter the returned statistics.
stime
: limit the start of the time range of the returned statisticsetime
: limit the end of the time range of the returned statisticsmetrics
: 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.