Continuously get data from Elasticsearch, when new poll data comes in


I am creating an external plugin in Kibana 8.1.1 using React.

I am retrieving the data I have in ES using the data plugin. Is it possible to fetch and update the plugin state as and when data is inserted into the index, rather than have to call the retrieval function every 2 minutes?


Hi there, no Elasticsearch doesn't provide any push event for data added to the index.
This could translate to sending all the data to the client that could become unsustainable depending on the ingestion load.
Polling is the way to handle that right now. Depending on your data queries, you can probably also increase the frequency of the polling and reduce the fetched data just to the interval between the current time and the last call time, appending the data to the previous one.

1 Like

Thanks for the reply

So every 2 mins (poll interval) I have to call a retrieval function (using searchSource, query, or search functionalities of data plugin - ) within my plugin to fetch the last polled data?

Correct, or as described in the documents you linked you can set the auto-refresh interval to 2 minutes

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