# Where can I access the logs sent to Elasticsearch?

**URL:** <https://discuss.elastic.co/t/where-can-i-access-the-logs-sent-to-elasticsearch/306259>\
**Category:** Elasticsearch\
**Created:** [June 2, 2022, 5:46pm UTC](https://discuss.elastic.co/t/where-can-i-access-the-logs-sent-to-elasticsearch/306259 "2022-06-02T17:46:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![BenGur](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bengur/32/106547_2.png) [@BenGur](https://discuss.elastic.co/u/BenGur)\
**Post date:** [June 2, 2022, 5:46pm UTC](https://discuss.elastic.co/t/where-can-i-access-the-logs-sent-to-elasticsearch/306259/1 "2022-06-02T17:46:37Z")

</div>

Hello,

I am trying to access the log files sent to Elasticsearch outside of the Kibana browser but don't know where to find them.

I am running Elasticsearch on a remote CentOS 7 server with another AWS CentOS 7 server sending it Nginx logs with Filebeat. I have tried navigating to /var/lib/Elasticsearch/indexes but am unsure where to go from there or what to make of the files I found.

Ideally I would be able to open and move the parsed log files received by Elasticsearch (the JSON's on Kibana would be great).

Thank you

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 2, 2022, 11:02pm UTC](https://discuss.elastic.co/t/where-can-i-access-the-logs-sent-to-elasticsearch/306259/2 "2022-06-02T23:02:04Z")

</div>

Welcome to our community! 😃

You should **never** work with the Elasticsearch files on the filesystem, **always** use the APIs. Can you elaborate more on what you're trying to do?

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [June 3, 2022, 1:30am UTC](https://discuss.elastic.co/t/where-can-i-access-the-logs-sent-to-elasticsearch/306259/3 "2022-06-03T01:30:37Z")

</div>

You can't access the files directly, it is not possible.

Elasicsearch is REST based, to see what you have stored without using a visualization tool like Kibana, or something like Grafana, you would need to make a request using the [Search API](https://www.elastic.co/guide/en/elasticsearch/reference/current/search.html) and work with the result.

For example, if you have an index named `nginx-logs` and want to see what you have stored a simple GET request using curl would return you some data.

```auto
curl -X GET "localhost:9200/nginx-logs/_search?pretty"

```

You also can use the [Query DSL](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html) to make more complex queries with filters and things like that.

It is also possible to write some tool or script using one of the [clients](https://www.elastic.co/guide/en/elasticsearch/client/index.html) to retrieve and parse the logs.

---

<div class="post-metadata">

**Author:** ![BenGur](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bengur/32/106547_2.png) [@BenGur](https://discuss.elastic.co/u/BenGur)\
**Post date:** [June 3, 2022, 6:35pm UTC](https://discuss.elastic.co/t/where-can-i-access-the-logs-sent-to-elasticsearch/306259/4 "2022-06-03T18:35:00Z")

</div>

Got it, thank you!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 1, 2022, 6:35pm UTC](https://discuss.elastic.co/t/where-can-i-access-the-logs-sent-to-elasticsearch/306259/5 "2022-07-01T18:35:47Z")

</div>

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