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: docker.elastic.co/elasticsearch/elasticsearch:5.4.0 and docker.elastic.co/kibana/kibana:5.4.0. 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']
logging.info("Total Docs {0}".format(total_docs))
{
'indices':{
'data-20171021':{
'primaries':{
'flush':{
'total_time_in_millis':0,
'total':0
},
'refresh':{
'listeners':0,
'total_time_in_millis':209,
'total':15
},
'indexing':{
'throttle_time_in_millis':0,
'delete_total':0,
'index_time_in_millis':1395,
'index_failed':0,
'index_current':0,
'delete_time_in_millis':0,
'index_total':426,
'noop_update_total':0,
'is_throttled':False,
'delete_current':0
},...