# Logstash.conf location in Windows

**URL:** <https://discuss.elastic.co/t/logstash-conf-location-in-windows/86142>\
**Category:** Logstash\
**Created:** [May 17, 2017, 4:10pm UTC](https://discuss.elastic.co/t/logstash-conf-location-in-windows/86142 "2017-05-17T16:10:01Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![teejayuu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/teejayuu/32/18356_2.png) [@teejayuu](https://discuss.elastic.co/u/teejayuu)\
**Post date:** [May 17, 2017, 4:10pm UTC](https://discuss.elastic.co/t/logstash-conf-location-in-windows/86142/1 "2017-05-17T16:10:01Z")

</div>

Hi,

Have just started with ELK and following a couple of guides have got it working (I think). I am moving on to the next step of monitoring Exchange traffic and following this guide (it uses an older version) [https://elijahpaul.co.uk/analysing-exchange-2013-message-tracking-logs-using-elk-elasticsearch-logstash-kibana/](https://elijahpaul.co.uk/analysing-exchange-2013-message-tracking-logs-using-elk-elasticsearch-logstash-kibana/), but can't find the logstash.conf file in /etc/logstash/conf.d/.

I am using a Windows VM (I know the path above is for \*Nix) and have installed:

- elasticsearch 5.3.2
- kibana 5.3.2
- logstash 5.3.2
- nssm 2.24

Could someone tell me where I can find logstash.conf, so I can add my inputs, filters and outputs?

Thanks  
Tony

---

<div class="post-metadata">

**Author:** ![karnamonkster](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/karnamonkster/32/67266_2.png) [@karnamonkster](https://discuss.elastic.co/u/karnamonkster)\
**Post date:** [May 18, 2017, 5:01am UTC](https://discuss.elastic.co/t/logstash-conf-location-in-windows/86142/2 "2017-05-18T05:01:11Z")

</div>

The link you provided mentions that you have to create and add the config file on your own as a "_ **someconfig.conf** _"  
In that you may provide the details required (input,filters,output) for you use case.  
Make sure you dont save the file as **.txt** , it should be " **.conf**"

---

<div class="post-metadata">

**Author:** ![teejayuu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/teejayuu/32/18356_2.png) [@teejayuu](https://discuss.elastic.co/u/teejayuu)\
**Post date:** [May 18, 2017, 6:49am UTC](https://discuss.elastic.co/t/logstash-conf-location-in-windows/86142/3 "2017-05-18T06:49:38Z")

</div>

Thanks Karnamonkster. Where do I create them in a Windows file structure...the tutorial only provides \*nix paths? My system in Windows.

---

<div class="post-metadata">

**Author:** ![karnamonkster](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/karnamonkster/32/67266_2.png) [@karnamonkster](https://discuss.elastic.co/u/karnamonkster)\
**Post date:** [May 18, 2017, 6:57am UTC](https://discuss.elastic.co/t/logstash-conf-location-in-windows/86142/4 "2017-05-18T06:57:54Z")

</div>

You may create it on any partition on windows where logstash has access to.  
I use the command line to parse a logfile for example:

`F:\elkstack\logstash-5.4.0\bin>logstash -f C:\Users\somepath\Desktop\yourconfig.conf --debug`

or you may refer to the following

> <https://github.com/elastic/logstash/issues/4005>

---

<div class="post-metadata">

**Author:** ![teejayuu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/teejayuu/32/18356_2.png) [@teejayuu](https://discuss.elastic.co/u/teejayuu)\
**Post date:** [May 19, 2017, 10:25am UTC](https://discuss.elastic.co/t/logstash-conf-location-in-windows/86142/5 "2017-05-19T10:25:16Z")

</div>

Thanks again.

I have run the command (D:\ELK\logstash-5.3.2\bin\logstash -f D:\ELK\logstash-5.3.2\01-inputs.conf\exchange\_msg\_trk.conf --debug) and I get the following errors:  
ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.  
Could not find log4j2 configuration at path /ELK/logstash-5.3.2/config/log4j2.properties. Using default config which logs to console

11:02:43.250 [LogStash::Runner] ERROR logstash.agent - Cannot load an invalid configuration {:reason=\>"Something is wrong with your configuration.", backtrace=\>["D:/ELK/logstash-5.3.2/logstash-core/lib/logstash/config/mixin.rb:125:in `config_init'", "D:/ELK/logstash-5.3.2/logstash-core/lib/logstash/outputs/base.rb:63:in`initialize'", "D:/ELK/logstash-5.3.2/logstash-core/lib/logstash/output\_delegator\_strategies/shared.rb:3:in `initialize'", "D:/ELK/logstash-5.3.2/logstash-core/lib/logstash/output_delegator.rb:23:in`initialize'", "D:/ELK/logstash-5.3.2/logstash-core/lib/logstash/pipeline.rb:91:in `plugin'", "(eval):147:in`initialize'", "org/jruby/RubyKernel.java:1079:in `eval'", "D:/ELK/logstash-5.3.2/logstash-core/lib/logstash/pipeline.rb:60:in`initialize'", "D:/ELK/logstash-5.3.2/logstash-core/lib/logstash/pipeline.rb:139:in `initialize'", "D:/ELK/logstash-5.3.2/logstash-core/lib/logstash/agent.rb:277:in`create\_pipeline'", "D:/ELK/logstash-5.3.2/logstash-core/lib/logstash/agent.rb:95:in `register_pipeline'", "D:/ELK/logstash-5.3.2/logstash-core/lib/logstash/runner.rb:264:in`execute'", "D:/ELK/logstash-5.3.2/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:67:in`run'", "D:/ELK/logstash-5.3.2/logstash-core/lib/logstash/runner.rb:183:in`run'", "D:/ELK/logstash-5.3.2/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:132:in `run'", "D:\\ELK\\logstash-5.3.2\\lib\\bootstrap\\environment.rb:71:in`(root)'"]}

Could you help with these?  
Thanks

---

<div class="post-metadata">

**Author:** ![teejayuu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/teejayuu/32/18356_2.png) [@teejayuu](https://discuss.elastic.co/u/teejayuu)\
**Post date:** [May 19, 2017, 3:26pm UTC](https://discuss.elastic.co/t/logstash-conf-location-in-windows/86142/6 "2017-05-19T15:26:55Z")

</div>

Solved. Changed the hosts section to  
`["localhost:9200"]`  
and it's working great

---

<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:** [June 16, 2017, 3:26pm UTC](https://discuss.elastic.co/t/logstash-conf-location-in-windows/86142/7 "2017-06-16T15:26:56Z")

</div>

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