How to Retrieve Documents Indexed Per Second, Python API

I am attempting to retrieve data for how many documents are being ingested into the cluster per second. I am currently using the elasticsearch python API 5.4 on elasticsearch and kibana docker images: and I am expecting to retrieve documents per second from the indicies API. However I have had no luck in pulling from the cluster or cat API's. indexing.index_current is always 0, no matter how many documents are being indexed.

elasticsearch_client = Elasticsearch(host=config['es.hostname'], port=config['es.port'])
resp = elasticsearch_client.indices.stats(index="data-20171021", format="json")
total_docs = resp['indices']['data-20171021']['primaries']['indexing']['index_current']"Total Docs {0}".format(total_docs))


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