I am interested in knowing how many documents are being indexed (created/updated) within a particular index. I looked at the _stats api but could not make much sense out of it. Can anyone please tell me how to figure out the indexing rate. It can be per second/minute. Thanks
Elasticsearch does not provide this data directly, but you are right about the API.
On the _stat API you will have to look at the total of index operation (since the server started) and store the time of when you call it:
GET _stats?filter_path=indices.index_name_here.total.indexing.index_total
{
"indices": {
"index_name_here": {
"total": {
"indexing": {
"index_total": 555
}
}
}
}
}
Some times later, you will need to make a second call, to the same API:
{
"indices": {
"index_name_here": {
"total": {
"indexing": {
"index_total": 666
}
}
}
}
}
And with a bit of calculation, you will have your indexing rate:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With