# Elasticsearch Indexing Rate - API

**URL:** https://discuss.elastic.co/t/elasticsearch-indexing-rate-api/209312
**Category:** Elasticsearch
**Created:** [November 25, 2019, 1:28pm UTC](https://discuss.elastic.co/t/elasticsearch-indexing-rate-api/209312 "2019-11-25T13:28:39Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![danielmitterdorfer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danielmitterdorfer/32/110510_2.png) [@danielmitterdorfer](https://discuss.elastic.co/u/danielmitterdorfer)
#### Post date: [November 25, 2019, 2:32pm UTC](https://discuss.elastic.co/t/elasticsearch-indexing-rate-api/209312/2 "2019-11-25T14:32:11Z")

</div>

Hi,

your number seems to match the primary shards metrics of ~ 1100 docs/s pretty well. Quoting from the [index stats API docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-stats.html):

> `primaries` are the values for only the primary shards. `total` are the accumulated values for both primary and replica shards.

So I assume that the numbers you got are from the `primaries` but not from `total`.

With regards to the difference you also need to account for the different sampling rate (see `xpack.monitoring.collection.interval` in our [docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/monitoring-settings.html)) which is 10 seconds by default. These two adjustments should bring you pretty close\*) to the numbers you see in the monitoring application.

Daniel

\*) you can't get the exact same values as you'd need to sample at the _exact_ same point in time as x-pack monitoring but that shouldn't be a problem in practice.

---

_[View the full topic](https://discuss.elastic.co/t/elasticsearch-indexing-rate-api/209312)._
