# Logstash is not reading files in conf.d when running as a service(using NSSM) on windows

**URL:** <https://discuss.elastic.co/t/logstash-is-not-reading-files-in-conf-d-when-running-as-a-service-using-nssm-on-windows/100792>\
**Category:** Logstash\
**Created:** [September 17, 2017, 2:24pm UTC](https://discuss.elastic.co/t/logstash-is-not-reading-files-in-conf-d-when-running-as-a-service-using-nssm-on-windows/100792 "2017-09-17T14:24:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rajesh](https://avatars.discourse-cdn.com/v4/letter/r/8e7dd6/32.png) [@rajesh](https://discuss.elastic.co/u/rajesh)\
**Post date:** [September 17, 2017, 2:24pm UTC](https://discuss.elastic.co/t/logstash-is-not-reading-files-in-conf-d-when-running-as-a-service-using-nssm-on-windows/100792/1 "2017-09-17T14:24:56Z")

</div>

Hi,

I am running Logstash as a service on windows using NSSM, but it's not picking conf files from conf.d. I gave the path to config files in logstash.yml.

When I pass the arguments(in NSSM) as '-f C:logstash\install\bin\myfile.conf' it works fine but it's not working when I pass the arguments(in NSSM) as '--config C:\logstash\conf.d'

Can someone please help resolve the issue?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [September 17, 2017, 5:00pm UTC](https://discuss.elastic.co/t/logstash-is-not-reading-files-in-conf-d-when-running-as-a-service-using-nssm-on-windows/100792/2 "2017-09-17T17:00:22Z")

</div>

The `-f` flag can take a file or a directory, so I think it should be `-f C:\logstash\conf.d`.

---

<div class="post-metadata">

**Author:** ![rajesh](https://avatars.discourse-cdn.com/v4/letter/r/8e7dd6/32.png) [@rajesh](https://discuss.elastic.co/u/rajesh)\
**Post date:** [September 18, 2017, 2:34pm UTC](https://discuss.elastic.co/t/logstash-is-not-reading-files-in-conf-d-when-running-as-a-service-using-nssm-on-windows/100792/3 "2017-09-18T14:34:59Z")

</div>

Thanks Christian. It is working now.

---

<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:** [October 16, 2017, 2:34pm UTC](https://discuss.elastic.co/t/logstash-is-not-reading-files-in-conf-d-when-running-as-a-service-using-nssm-on-windows/100792/4 "2017-10-16T14:34:59Z")

</div>

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