# Can you make sure this path is a logstash config file?

**URL:** <https://discuss.elastic.co/t/can-you-make-sure-this-path-is-a-logstash-config-file/132897>\
**Category:** Logstash\
**Created:** [May 22, 2018, 9:45pm UTC](https://discuss.elastic.co/t/can-you-make-sure-this-path-is-a-logstash-config-file/132897 "2018-05-22T21:45:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cmardonespino](https://avatars.discourse-cdn.com/v4/letter/c/97f17d/32.png) [@cmardonespino](https://discuss.elastic.co/u/cmardonespino)\
**Post date:** [May 22, 2018, 9:45pm UTC](https://discuss.elastic.co/t/can-you-make-sure-this-path-is-a-logstash-config-file/132897/1 "2018-05-22T21:45:39Z")

</div>

Hi guys,  
Im a really novice guy working for first time with Logstash, Elasticsearch and Kibana. I created a logstash.conf file:

> input{  
> stdin{}  
> }  
> output{  
> elasticsearch { hosts =\> ["elasticsearch:9200"] }  
> }

I created this file in the same path where I run the following command to create a container docker:

`docker run -h logstash --name logstash --link elasticsearch:elasticsearch -it --rm -v "$PW D":/config-dir logstash -f ./logstash.conf `  
And this return the following:

> 20:28:48.062 [LogStash::Runner] INFO logstash.agent - No config files found in path {:path=\>"/logstash.conf"}  
> 20:28:48.068 [LogStash::Runner] ERROR logstash.agent - failed to fetch pipeline configuration {:message=\>"No config files found: ./logstash.conf. Can you make sure this path is a logstash config file?"}

I tried with `./logstash.conf` - `/logstash.conf` - `logstash` like parameter but nothing of this is working  
I hope can you help me 🙂  
Regards!

---

<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:** [May 23, 2018, 6:03am UTC](https://discuss.elastic.co/t/can-you-make-sure-this-path-is-a-logstash-config-file/132897/2 "2018-05-23T06:03:07Z")

</div>

You're mounting the current directory as /config-dir inside the container, but when Logstash starts in the container /config-dir isn't the current directory so ./logstash.conf can't be found. Passing /config-dir/logstash.conf to Logstash should work better.

---

<div class="post-metadata">

**Author:** ![cmardonespino](https://avatars.discourse-cdn.com/v4/letter/c/97f17d/32.png) [@cmardonespino](https://discuss.elastic.co/u/cmardonespino)\
**Post date:** [May 23, 2018, 1:02pm UTC](https://discuss.elastic.co/t/can-you-make-sure-this-path-is-a-logstash-config-file/132897/3 "2018-05-23T13:02:57Z")

</div>

Hey Magnus! Really thanks!. That works for me. I created a config-dir folder and inside it, I created a logstash.conf file. Then, in the project root, I runned the following command:

`docker run -h logstash --name logstash --link elasticsearch:elasticsearch -it --rm -v "$PWD":/config-dir logstash -f /confi g-dir/logstash.conf`

Regards!

---

<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 20, 2018, 1:02pm UTC](https://discuss.elastic.co/t/can-you-make-sure-this-path-is-a-logstash-config-file/132897/4 "2018-06-20T13:02:58Z")

</div>

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