# Quick way to test logstash config file?

**URL:** <https://discuss.elastic.co/t/quick-way-to-test-logstash-config-file/159270>\
**Category:** Logstash\
**Created:** [December 4, 2018, 2:17am UTC](https://discuss.elastic.co/t/quick-way-to-test-logstash-config-file/159270 "2018-12-04T02:17:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jamespb](https://avatars.discourse-cdn.com/v4/letter/j/4da419/32.png) [@jamespb](https://discuss.elastic.co/u/jamespb)\
**Post date:** [December 4, 2018, 2:17am UTC](https://discuss.elastic.co/t/quick-way-to-test-logstash-config-file/159270/1 "2018-12-04T02:17:30Z")

</div>

I just started with logstash. I am tune with the config fie.  
I wonder if I must run following everytime with any change? It takes a long time to start.  
Any grammar checker or a quick way to test what the config file going to do?

logstash.bat -f C:\tmp\elk\TASpattern\jmaster.conf

---

<div class="post-metadata">

**Author:** ![Petr.Simik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/petr.simik/32/38082_2.png) [@Petr.Simik](https://discuss.elastic.co/u/Petr.Simik)\
**Post date:** [December 4, 2018, 5:46am UTC](https://discuss.elastic.co/t/quick-way-to-test-logstash-config-file/159270/2 "2018-12-04T05:46:36Z")

</div>

Yes logstash start is so slow I use reload automatic parameter see below  
this will start logstash and you can update any parameter it will reload it automatically  
in case there is an err it keeps printing the err message on default output (terminal) as soon as you fix it

`bin/logstash -f configfile.conf --config.reload.automatic`

my best practice working with logstash is to run it this way w automatic reload having output to screen  
and I randomly put line by line to the tail of this file and check the desired output

I was curious of are others best practices to dev with logstash?

---

<div class="post-metadata">

**Author:** ![balumurari1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/balumurari1/32/39203_2.png) [@balumurari1](https://discuss.elastic.co/u/balumurari1)\
**Post date:** [December 5, 2018, 9:46am UTC](https://discuss.elastic.co/t/quick-way-to-test-logstash-config-file/159270/3 "2018-12-05T09:46:37Z")

</div>

Hello,  
1.Make sure elasticsearch is up and running.  
2.Open logstash folder in cmd,  
cd logstash  
3.Take sample config file and copy sample data shown in below example into sample.conf and copy the sample.conf file in logstash folder  
Ex;-  
input{stdin{}}output{stdout{}}  
4.Now execute as shown below

logstash\>bin\logstash -f sample.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 2, 2019, 9:59am UTC](https://discuss.elastic.co/t/quick-way-to-test-logstash-config-file/159270/4 "2019-01-02T09:59:35Z")

</div>

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