# How to test logstash .conf file easily without logstash shutting down everytime?

**URL:** <https://discuss.elastic.co/t/how-to-test-logstash-conf-file-easily-without-logstash-shutting-down-everytime/260004>\
**Category:** Logstash\
**Created:** [January 1, 2021, 8:03pm UTC](https://discuss.elastic.co/t/how-to-test-logstash-conf-file-easily-without-logstash-shutting-down-everytime/260004 "2021-01-01T20:03:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kelk](https://avatars.discourse-cdn.com/v4/letter/k/13edae/32.png) [@kelk](https://discuss.elastic.co/u/kelk)\
**Post date:** [January 1, 2021, 8:03pm UTC](https://discuss.elastic.co/t/how-to-test-logstash-conf-file-easily-without-logstash-shutting-down-everytime/260004/1 "2021-01-01T20:03:33Z")

</div>

I'm currently testing the logstash in below manner.  
`/opt/logstash/bin/logstash -f /tmp/simpleInputs.conf`

This works perfectly, but the issue is, it takes some time to execute it.. just for the starting of java process , spinning up and shutting down etc.. so for every small test I can see it takes around 47 seconds. out of those , the actual running time of the conf is less than 1 second ! .. so when im testing 40-50 conf file, it takes enormous time which ideally should have processed in seconds

Is there an option, whereby I can "put" a conf file and get output instantly without re-spawning the entire logstash process from start & shutdown? What i'm looking for is something like is to inject a .conf file to an already running/existing logstash process?

```auto
myInjectScript -f /tmp/simpleInputs.conf

```

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [January 1, 2021, 9:07pm UTC](https://discuss.elastic.co/t/how-to-test-logstash-conf-file-easily-without-logstash-shutting-down-everytime/260004/2 "2021-01-01T21:07:48Z")

</div>

If you use the `--config.reload.automatic` option on the command line then each time you modify / overwrite the configuration logstash will try to restart the pipeline, which will cause the new file to be read.

Some pipelines cannot be restarted. For example, a stdin input cannot be restarted.

---

<div class="post-metadata">

**Author:** ![kelk](https://avatars.discourse-cdn.com/v4/letter/k/13edae/32.png) [@kelk](https://discuss.elastic.co/u/kelk)\
**Post date:** [January 1, 2021, 9:26pm UTC](https://discuss.elastic.co/t/how-to-test-logstash-conf-file-easily-without-logstash-shutting-down-everytime/260004/3 "2021-01-01T21:26:48Z")

</div>

@Badger , thanks mate for the reply  
I got your idea. But can you please clarify if my below understanding is correct?

- Run my first pipeline normally with `--config.reload.automatic`
- and afterwards, just changing contents of the same pipeline

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [January 1, 2021, 10:10pm UTC](https://discuss.elastic.co/t/how-to-test-logstash-conf-file-easily-without-logstash-shutting-down-everytime/260004/4 "2021-01-01T22:10:29Z")

</div>

Yes, run

```
/opt/logstash/bin/logstash -f /tmp/simpleInputs.conf --config.reload.automatic

```

and then edit, or overwrite, /tmp/simpleInputs.conf

---

<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:** [January 29, 2021, 10:10pm UTC](https://discuss.elastic.co/t/how-to-test-logstash-conf-file-easily-without-logstash-shutting-down-everytime/260004/5 "2021-01-29T22:10:42Z")

</div>

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