# Passing Multiple Arguments while Logstash startup

**URL:** <https://discuss.elastic.co/t/passing-multiple-arguments-while-logstash-startup/47805>\
**Category:** Logstash\
**Created:** [April 19, 2016, 2:57pm UTC](https://discuss.elastic.co/t/passing-multiple-arguments-while-logstash-startup/47805 "2016-04-19T14:57:55Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sameer\_Panicker](https://avatars.discourse-cdn.com/v4/letter/s/d9b06d/32.png) [@Sameer\_Panicker](https://discuss.elastic.co/u/Sameer_Panicker)\
**Post date:** [April 19, 2016, 2:57pm UTC](https://discuss.elastic.co/t/passing-multiple-arguments-while-logstash-startup/47805/1 "2016-04-19T14:57:55Z")

</div>

I have more than 5 logstash conf files. I need to start all the conf files all together. How can I pass all the files names together ?

logstash -f Logstash-ES1.conf  
logstash -f Logstash-ES2.conf  
logstash -f Logstash-ES3.conf

Command Line which I tried and it didnt work -

logstash -f Logstash-ES1.conf Logstash-ES2.conf Logstash-ES3.conf

---

<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:** [April 19, 2016, 6:12pm UTC](https://discuss.elastic.co/t/passing-multiple-arguments-while-logstash-startup/47805/2 "2016-04-19T18:12:42Z")

</div>

Should work:

```
logstash -f file1.conf -f file2.conf ... -f fileN.conf

```

Also works IIRC:

```
logstash -f "*.conf"
```

---

<div class="post-metadata">

**Author:** ![Sameer\_Panicker](https://avatars.discourse-cdn.com/v4/letter/s/d9b06d/32.png) [@Sameer\_Panicker](https://discuss.elastic.co/u/Sameer_Panicker)\
**Post date:** [April 19, 2016, 9:32pm UTC](https://discuss.elastic.co/t/passing-multiple-arguments-while-logstash-startup/47805/3 "2016-04-19T21:32:36Z")

</div>

[quote="magnusbaeck, post:2, topic:47805"]  
logstash -f file1.conf -f file2.conf ... -f fileN.conf  
[/quote] It is only picking the last file event. i.e. fileN.conf event is captured but file.1conf is not.

[quote="magnusbaeck, post:2, topic:47805"]  
logstash -f "\*.conf"  
[/quote]It is not capturing anything.

---

<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:** [April 20, 2016, 5:33am UTC](https://discuss.elastic.co/t/passing-multiple-arguments-while-logstash-startup/47805/4 "2016-04-20T05:33:31Z")

</div>

If you start Logstash with the `--debug` option it'll show you exactly what configuration it loads.

By the way, you know that you can pass a directory name to `-f`? Then LS will load all files in that directory.

---

<div class="post-metadata">

**Author:** ![Sameer\_Panicker](https://avatars.discourse-cdn.com/v4/letter/s/d9b06d/32.png) [@Sameer\_Panicker](https://discuss.elastic.co/u/Sameer_Panicker)\
**Post date:** [April 20, 2016, 5:38am UTC](https://discuss.elastic.co/t/passing-multiple-arguments-while-logstash-startup/47805/5 "2016-04-20T05:38:54Z")

</div>

Can you give me a sample command line for passing in the entire directory name?

Suppose I have a folder named "LgConf" under the bin folder.  
logstash -f "LgConf" -\> Is this correct ?

---

<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:** [April 20, 2016, 5:46am UTC](https://discuss.elastic.co/t/passing-multiple-arguments-while-logstash-startup/47805/6 "2016-04-20T05:46:32Z")

</div>

I wouldn't make any assumptions about Logstash's behavior when passing a relative path but passing an absolute path certainly works.

---

<div class="post-metadata">

**Author:** ![Sameer\_Panicker](https://avatars.discourse-cdn.com/v4/letter/s/d9b06d/32.png) [@Sameer\_Panicker](https://discuss.elastic.co/u/Sameer_Panicker)\
**Post date:** [April 20, 2016, 5:52am UTC](https://discuss.elastic.co/t/passing-multiple-arguments-while-logstash-startup/47805/7 "2016-04-20T05:52:50Z")

</div>

I tried passing the entire path. The syntax worked but it is also capturing only 1 conf. The first conf event is getting captured but the rest are not.

The same result as above command lines.

---

<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:** [April 20, 2016, 6:00am UTC](https://discuss.elastic.co/t/passing-multiple-arguments-while-logstash-startup/47805/8 "2016-04-20T06:00:00Z")

</div>

If events aren't being captured that could be caused by many other things. As I said, with the `--debug` option you can find out exactly which configuration Logstash loads so that you can focus your debugging efforts in the right place.

---

<div class="post-metadata">

**Author:** ![Sameer\_Panicker](https://avatars.discourse-cdn.com/v4/letter/s/d9b06d/32.png) [@Sameer\_Panicker](https://discuss.elastic.co/u/Sameer_Panicker)\
**Post date:** [April 20, 2016, 6:04am UTC](https://discuss.elastic.co/t/passing-multiple-arguments-while-logstash-startup/47805/9 "2016-04-20T06:04:51Z")

</div>

When I execute those conf file individually it works fine. The only prob is while running multiple conf files altogether.

I have enabled the --debug command. But I am unable to triage it because the output keeps on showing Flushing buffer, hence unable to debug it.

Any suggestions, what should I be doing here ?

---

<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:** [April 20, 2016, 9:31am UTC](https://discuss.elastic.co/t/passing-multiple-arguments-while-logstash-startup/47805/10 "2016-04-20T09:31:47Z")

</div>

> I have enabled the --debug command. But I am unable to triage it because the output keeps on showing Flushing buffer, hence unable to debug it.

Redirect the output to a file and read that file.

---

<div class="post-metadata">

**Author:** ![Sameer\_Panicker](https://avatars.discourse-cdn.com/v4/letter/s/d9b06d/32.png) [@Sameer\_Panicker](https://discuss.elastic.co/u/Sameer_Panicker)\
**Post date:** [April 20, 2016, 5:53pm UTC](https://discuss.elastic.co/t/passing-multiple-arguments-while-logstash-startup/47805/11 "2016-04-20T17:53:04Z")

</div>

![](https://us1.discourse-cdn.com/elastic/original/2X/c/cca75efc8388db0ee7afbe79e068baee6328e3b8.png)

 ![](https://us1.discourse-cdn.com/elastic/original/2X/1/144b6e65f28ea099f29ff85a81d39a0d6f9b37be.png)

Tried all of the above...looks like logstash is not able to pull multiple conf's.

Saw threads here -  
[https://groups.google.com/forum/#!msg/elasticsearch/vFIuBage0tE/vNc-HyvZM1sJ](https://groups.google.com/forum/#!msg/elasticsearch/vFIuBage0tE/vNc-HyvZM1sJ)  
[https://groups.google.com/forum/#!msg/logstash-users/eNYmpFueHtM/cx1NjAx1SOQJ](https://groups.google.com/forum/#!msg/logstash-users/eNYmpFueHtM/cx1NjAx1SOQJ)

---

<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:** [April 20, 2016, 6:05pm UTC](https://discuss.elastic.co/t/passing-multiple-arguments-while-logstash-startup/47805/12 "2016-04-20T18:05:28Z")

</div>

Might be a Windows-specific bug.

---

<div class="post-metadata">

**Author:** ![Sameer\_Panicker](https://avatars.discourse-cdn.com/v4/letter/s/d9b06d/32.png) [@Sameer\_Panicker](https://discuss.elastic.co/u/Sameer_Panicker)\
**Post date:** [April 20, 2016, 6:53pm UTC](https://discuss.elastic.co/t/passing-multiple-arguments-while-logstash-startup/47805/13 "2016-04-20T18:53:36Z")

</div>

I was trying this on Windows 7. Will try this on Windows Server 2012 R2.

Will let you know the outcome.

---

<div class="post-metadata">

**Author:** ![Sameer\_Panicker](https://avatars.discourse-cdn.com/v4/letter/s/d9b06d/32.png) [@Sameer\_Panicker](https://discuss.elastic.co/u/Sameer_Panicker)\
**Post date:** [April 20, 2016, 7:16pm UTC](https://discuss.elastic.co/t/passing-multiple-arguments-while-logstash-startup/47805/14 "2016-04-20T19:16:49Z")

</div>

Getting this error on Win 2012 R2 machine.

D:\Elastic\Logstash-2.3.1\bin\>logstash -f "D:/Elastic/Logstash-2.3.1/bin/AppTier  
Conf/\*.conf" --configtest  
io/console not supported; tty will not be manipulated  
←[33mAn unexpected error occurred! {:error=\>#\<RuntimeError: translation missing:  
en.logstash.runner.configuration.scheme-not-supported\>, :class=\>"RuntimeError",  
:backtrace=\>["D:/Elastic/Logstash-2.3.1/vendor/bundle/jruby/1.9/gems/logstash-c  
ore-2.3.1-java/lib/logstash/config/loader.rb:43:in `load_config'", "D:/Elastic/L ogstash-2.3.1/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.1-java/lib/logstash /config/loader.rb:17:in`format\_config'", "D:/Elastic/Logstash-2.3.1/vendor/bund  
le/jruby/1.9/gems/logstash-core-2.3.1-java/lib/logstash/agent.rb:181:in `execute '", "D:/Elastic/Logstash-2.3.1/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.1- java/lib/logstash/runner.rb:94:in`run'", "org/jruby/RubyProc.java:281:in `call' ", "D:/Elastic/Logstash-2.3.1/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.1-j ava/lib/logstash/runner.rb:99:in`run'", "org/jruby/RubyProc.java:281:in `call'" , "D:/Elastic/Logstash-2.3.1/vendor/bundle/jruby/1.9/gems/stud-0.0.22/lib/stud/t ask.rb:24:in`initialize'"], :level=\>:warn}←[0m

---

<div class="post-metadata">

**Author:** ![berglh](https://avatars.discourse-cdn.com/v4/letter/b/8797f3/32.png) [@berglh](https://discuss.elastic.co/u/berglh)\
**Post date:** [April 26, 2016, 1:12am UTC](https://discuss.elastic.co/t/passing-multiple-arguments-while-logstash-startup/47805/15 "2016-04-26T01:12:42Z")

</div>

Making sure you run logstash.bat instead of the logstash binary, run it like this in powershell:

```auto
.\logstash\bin\logstash.bat -f .\multiconffolder

```

Where you don't specify the file glob pattern, just the folder 🕶

---

<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:** [July 6, 2017, 5:00am UTC](https://discuss.elastic.co/t/passing-multiple-arguments-while-logstash-startup/47805/16 "2017-07-06T05:00:37Z")

</div>


