---
Title: Statistics
alwaysopen: false
categories:
- docs
- operate
- rs
description: An object that contains metrics for clusters, databases, nodes, or shards
hideListLinks: true
linkTitle: statistics
weight: $weight
url: '/operate/rs/7.4/references/rest-api/objects/statistics/'
---
## 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:
- [Cluster stats]({{< relref "/operate/rs/7.4/references/rest-api/requests/cluster/stats" >}})
- [Database stats]({{< relref "/operate/rs/7.4/references/rest-api/requests/bdbs/stats" >}})
- [Node stats]({{< relref "/operate/rs/7.4/references/rest-api/requests/nodes/stats" >}})
- [Shard stats]({{< relref "/operate/rs/7.4/references/rest-api/requests/shards/stats" >}})
View endpoint stats using `GET` requests, see:
- [Endpoint stats]({{< relref "/operate/rs/7.4/references/rest-api/requests/endpoints-stats" >}})
### 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:
- [Cluster metrics]({{< relref "/operate/rs/7.4/references/rest-api/objects/statistics/cluster-metrics" >}})
- [DB metrics]({{< relref "/operate/rs/7.4/references/rest-api/objects/statistics/db-metrics" >}})
- [Node metrics]({{< relref "/operate/rs/7.4/references/rest-api/objects/statistics/node-metrics" >}})
- [Shard metrics]({{< relref "/operate/rs/7.4/references/rest-api/objects/statistics/shard-metrics" >}})
{{}}
Certain statistics are not documented because they are for internal use only and should be ignored. Some 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 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.
{{}}
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.
{{}}