Manish Khandelwal
Manish Khandelwal

Reputation: 2310

Can we download log files from Elastic search engine?

We are planning to use elastic search engine for indexing our logs in our K8S cluster. It is known to us that using Kibana we can view logs on gui. But if we need to transport logs to some remote team which do not have Kibana access, then how to address such scenario. Can we somehow download logs from search engine?

Upvotes: 2

Views: 12096

Answers (2)

Jaycreation
Jaycreation

Reputation: 2089

You can always connect any app to Elasticsearch and collect all data in your indices. So if another team need to access to logs, you can create a read only access to your elastic search and consume the logs into this application. If you want to Download everything, you can use the scoll api. Here in an implementation example in JAVA

  1. https://www.elastic.co/guide/en/elasticsearch/client/java-rest/7.9/java-rest-high-search-scroll.html

  2. https://www.elastic.co/guide/en/elasticsearch/client/java-rest/7.9/java-rest-high-search-scroll.html

Upvotes: 1

Ashok Kumar
Ashok Kumar

Reputation: 63

If you want to manually download results of a kibana query into a CSV, that is possible.

From the Kibana results page, click on

Share menu -> Share this search -> CSV Reports -> Generate CSV

It will take a while for the CSV to be generated. Once the CSV generation is completed, a message will appear with a link to the CSV.

Upvotes: 3

Related Questions