# How to count the number of docs indexed per N seconds

**URL:** <https://discuss.elastic.co/t/how-to-count-the-number-of-docs-indexed-per-n-seconds/253631>\
**Category:** Elasticsearch\
**Created:** [October 29, 2020, 1:57am UTC](https://discuss.elastic.co/t/how-to-count-the-number-of-docs-indexed-per-n-seconds/253631 "2020-10-29T01:57:27Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![AClerk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aclerk/32/55297_2.png) [@AClerk](https://discuss.elastic.co/u/AClerk)\
**Post date:** [October 29, 2020, 1:57am UTC](https://discuss.elastic.co/t/how-to-count-the-number-of-docs-indexed-per-n-seconds/253631/1 "2020-10-29T01:57:28Z")

</div>

Hello,  
I would like to know how many documents are indexed per N seconds.  
So, I want to export/get statistics about the Elastic cluster performance.  
Is there a way to get these numbers?  
Is there a way to split these numbers per index?

Cheers!

---

<div class="post-metadata">

**Author:** ![wangqinghuan](https://avatars.discourse-cdn.com/v4/letter/w/d26b3c/32.png) [@wangqinghuan](https://discuss.elastic.co/u/wangqinghuan)\
**Post date:** [October 29, 2020, 3:56am UTC](https://discuss.elastic.co/t/how-to-count-the-number-of-docs-indexed-per-n-seconds/253631/2 "2020-10-29T03:56:25Z")

</div>

Kibana provide visualize, which is easy to get/export some statistics from Elasticsearch.

---

<div class="post-metadata">

**Author:** ![AClerk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aclerk/32/55297_2.png) [@AClerk](https://discuss.elastic.co/u/AClerk)\
**Post date:** [October 29, 2020, 4:07am UTC](https://discuss.elastic.co/t/how-to-count-the-number-of-docs-indexed-per-n-seconds/253631/3 "2020-10-29T04:07:17Z")

</div>

Any specific?  
I couldn't find anything handy.

---

<div class="post-metadata">

**Author:** ![wangqinghuan](https://avatars.discourse-cdn.com/v4/letter/w/d26b3c/32.png) [@wangqinghuan](https://discuss.elastic.co/u/wangqinghuan)\
**Post date:** [October 29, 2020, 4:17am UTC](https://discuss.elastic.co/t/how-to-count-the-number-of-docs-indexed-per-n-seconds/253631/4 "2020-10-29T04:17:32Z")

</div>

For example, count documents of packeatbeats indices per 5s.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/4/74ef29f694cf64b554ae43f7fa630b9a681e08e0.png)

---

<div class="post-metadata">

**Author:** ![Iker](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/iker/32/91708_2.png) [@Iker](https://discuss.elastic.co/u/Iker)\
**Post date:** [October 29, 2020, 5:54am UTC](https://discuss.elastic.co/t/how-to-count-the-number-of-docs-indexed-per-n-seconds/253631/5 "2020-10-29T05:54:56Z")

</div>

You could use an external monitoring agent through the stats api; personally I use grafana +influxdb+telegraf

 ![image_2020-10-29_005422](https://us1.discourse-cdn.com/elastic/original/3X/4/1/41a16e48fe67473a40317b8e8691e74ec00cc7f3.png)

> **[Cluster stats API | Elasticsearch Reference \[7.9\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-stats.html)**

---

<div class="post-metadata">

**Author:** ![AClerk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aclerk/32/55297_2.png) [@AClerk](https://discuss.elastic.co/u/AClerk)\
**Post date:** [October 29, 2020, 6:12am UTC](https://discuss.elastic.co/t/how-to-count-the-number-of-docs-indexed-per-n-seconds/253631/6 "2020-10-29T06:12:29Z")

</div>

Stats will not give me the # of documents indexed per second.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [October 29, 2020, 6:31am UTC](https://discuss.elastic.co/t/how-to-count-the-number-of-docs-indexed-per-n-seconds/253631/7 "2020-10-29T06:31:45Z")

</div>

Elasticsearch does not store this natively, so you need to monitor or calculate this based on calls to the stats APIs, which is what Elasticsearch monitoring does or query the indexed data, which assumes you have accurate time stamps.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 26, 2020, 6:31am UTC](https://discuss.elastic.co/t/how-to-count-the-number-of-docs-indexed-per-n-seconds/253631/8 "2020-11-26T06:31:55Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
