# Where does Logstash store its data?

**URL:** https://discuss.elastic.co/t/where-does-logstash-store-its-data/60930
**Category:** Logstash
**Created:** [September 19, 2016, 6:23pm UTC](https://discuss.elastic.co/t/where-does-logstash-store-its-data/60930 "2016-09-19T18:23:52Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![ZillaG](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zillag/32/10505_2.png) [@ZillaG](https://discuss.elastic.co/u/ZillaG)
#### Post date: [September 19, 2016, 6:23pm UTC](https://discuss.elastic.co/t/where-does-logstash-store-its-data/60930/1 "2016-09-19T18:23:52Z")

</div>

I'm using a central Logstash server that gets logs from multiple remote Logstash clients, which use rsyslog to forward logs. Where does Logstash store the logs in the server? Can I setup an NFS mount and tell Logstash to store them there? I want to set the NFS up using AWS Elastic File System (EFS) so the volume grows automatically. Make sense?

---

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [September 19, 2016, 7:30pm UTC](https://discuss.elastic.co/t/where-does-logstash-store-its-data/60930/2 "2016-09-19T19:30:33Z")

</div>

> I'm using a central Logstash server that gets logs from multiple remote Logstash clients, which use rsyslog to forward logs. Where does Logstash store the logs in the server?

By default Logstash doesn't store any logs.

> Can I setup an NFS mount and tell Logstash to store them there?

Yes.

---

<div class="post-metadata">

### Author: ![ZillaG](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zillag/32/10505_2.png) [@ZillaG](https://discuss.elastic.co/u/ZillaG)
#### Post date: [September 19, 2016, 8:03pm UTC](https://discuss.elastic.co/t/where-does-logstash-store-its-data/60930/3 "2016-09-19T20:03:25Z")

</div>

Thanks. Let me clarify what I'm after.

Say from my clients, I send this log to my central Logstash serer

`2016-08-26 16:15:09,586 INFO :some_thread [com.mycompany.classpath] The message body`

If I have 10 clients, and each client sends 1000 of these per hour, I would've collected 10,000/hour on my server. Or if my clients send 1,000,000 per hour, I would've collected 10,000,000/hour on my server. 10,000,000/hour would require more space than 10,000/hour, correct? Obviously then it'll take more room to store 10,000,000 logs per hour, that it would to store 10,000 logs per hour. What Logstash construct stores this information? How can I then tell Logstash to use an NFS to store this  
information?

My logstash configuration file has this

```
input {
  tcp {
    port => 5514
  }
}

filter {
   grok {
   }
}

output {
   elasticsearch {
     some_es_configuration => some_es_configuration_value
   }
}
```

---

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [September 19, 2016, 8:15pm UTC](https://discuss.elastic.co/t/where-does-logstash-store-its-data/60930/4 "2016-09-19T20:15:02Z")

</div>

So you're really asking about Elasticsearch rather than Logstash? And is the question if Elasticsearch can have its storage on NFS? The answer is probably yes but it's strongly discouraged.

---

<div class="post-metadata">

### Author: ![ZillaG](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zillag/32/10505_2.png) [@ZillaG](https://discuss.elastic.co/u/ZillaG)
#### Post date: [September 19, 2016, 8:44pm UTC](https://discuss.elastic.co/t/where-does-logstash-store-its-data/60930/5 "2016-09-19T20:44:36Z")

</div>

For Elasticsearch I can why that would be discouraged.

Any documentation (either Logstash or Elasticsearch) on how I can handle this then? I do want to use AWS Elastic File System to manage expanding my volume that holds the actual data, but I can't find any info on HOW to tell either Logstash or Elasticsearch to use this volume.

---

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [September 20, 2016, 5:31am UTC](https://discuss.elastic.co/t/where-does-logstash-store-its-data/60930/6 "2016-09-20T05:31:06Z")

</div>

NFS is discouraged mainly because it's slower than local disk. To configure where Elasticsearch stores its data, look into the path.data configuration option.

[https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-dir-layout.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-dir-layout.html)

---

<div class="post-metadata">

### Author: ![ZillaG](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zillag/32/10505_2.png) [@ZillaG](https://discuss.elastic.co/u/ZillaG)
#### Post date: [September 20, 2016, 7:38pm UTC](https://discuss.elastic.co/t/where-does-logstash-store-its-data/60930/7 "2016-09-20T19:38:04Z")

</div>

Thanks again @magnusbaeck.

So what is the recommended way to setup the ELK stack so the volume can grow dynamically? I'm trying to setup an AWS Elastic File Service, which of course has to be NFS-mounted? Should I start a separate thread?

---

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [September 20, 2016, 7:59pm UTC](https://discuss.elastic.co/t/where-does-logstash-store-its-data/60930/8 "2016-09-20T19:59:46Z")

</div>

I'm no AWS expert, but why not use EBS volumes?

---

<div class="post-metadata">

### Author: ![ZillaG](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zillag/32/10505_2.png) [@ZillaG](https://discuss.elastic.co/u/ZillaG)
#### Post date: [September 20, 2016, 8:42pm UTC](https://discuss.elastic.co/t/where-does-logstash-store-its-data/60930/9 "2016-09-20T20:42:20Z")

</div>

@magnusbaeck, I'm exploring both EBS and EFS. Thanks!

---

<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 6, 2017, 4:37am UTC](https://discuss.elastic.co/t/where-does-logstash-store-its-data/60930/10 "2017-07-06T04:37:44Z")

</div>


