# Command line syntax to use the logstash.yml instead of the pipeline (.conf)

**URL:** https://discuss.elastic.co/t/command-line-syntax-to-use-the-logstash-yml-instead-of-the-pipeline-conf/336630
**Category:** Logstash
**Tags:** docker
**Created:** [June 21, 2023, 10:52pm UTC](https://discuss.elastic.co/t/command-line-syntax-to-use-the-logstash-yml-instead-of-the-pipeline-conf/336630 "2023-06-21T22:52:41Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![elBilo](https://avatars.discourse-cdn.com/v4/letter/e/a88e4f/32.png) [@elBilo](https://discuss.elastic.co/u/elBilo)
#### Post date: [June 21, 2023, 10:52pm UTC](https://discuss.elastic.co/t/command-line-syntax-to-use-the-logstash-yml-instead-of-the-pipeline-conf/336630/1 "2023-06-21T22:52:41Z")

</div>

I see plenty of examples with the command line option -f for using a specific pipeline file can I use the same syntax to use a specific logstash.yml file?

the current helm file settings I have are

command:  
- logstash  
args:  
- '-f'  
- /usr/share/logstash/pipeline/logstash.conf  
- '-l'  
- /var/log  
- '--log.level'  
- debug

is it really as simple as replacing the path for the conf file with the yml file?

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [June 22, 2023, 1:09am UTC](https://discuss.elastic.co/t/command-line-syntax-to-use-the-logstash-yml-instead-of-the-pipeline-conf/336630/2 "2023-06-22T01:09:44Z")

</div>

I think you are looking for --path.settings

**`--path.settings SETTINGS_DIR`**  
Set the directory containing the `logstash.yml` [settings file](https://www.elastic.co/guide/en/logstash/current/logstash-settings-file.html) as well as the log4j logging configuration. This can also be set through the LS\_SETTINGS\_DIR environment variable. The default is the `config` directory under Logstash home.

---

<div class="post-metadata">

### Author: ![elBilo](https://avatars.discourse-cdn.com/v4/letter/e/a88e4f/32.png) [@elBilo](https://discuss.elastic.co/u/elBilo)
#### Post date: [June 22, 2023, 7:29pm UTC](https://discuss.elastic.co/t/command-line-syntax-to-use-the-logstash-yml-instead-of-the-pipeline-conf/336630/3 "2023-06-22T19:29:13Z")

</div>

by specifying the path.settings value to a floder will logstash also read the startup.options file?

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [June 22, 2023, 7:32pm UTC](https://discuss.elastic.co/t/command-line-syntax-to-use-the-logstash-yml-instead-of-the-pipeline-conf/336630/4 "2023-06-22T19:32:39Z")

</div>

If you mean jvm.options then yes. I am not familiar with startup.options.

---

<div class="post-metadata">

### Author: ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)
#### Post date: [June 22, 2023, 8:05pm UTC](https://discuss.elastic.co/t/command-line-syntax-to-use-the-logstash-yml-instead-of-the-pipeline-conf/336630/5 "2023-06-22T20:05:24Z")

</div>

> [@elBilo](#):
>
> I see plenty of examples with the command line option -f for using a specific pipeline file can I use the same syntax to use a specific logstash.yml file?

Can you provide a little more of context of what you are trying to do?

The `-f` option is used to run Logstash pipeline configurations, it has nothing to do with `logstash.yml`.

The file `logstash.yml` is the file where you configure settings for the logstash process like the node name, the paths it will use and [other options](https://www.elastic.co/guide/en/logstash/current/logstash-settings-file.html).

There is also the file [pipelines.yml](https://www.elastic.co/guide/en/logstash/current/multiple-pipelines.html) which is where you should configure your pipelines when you want to run multiple pipelines.

The files `logstash.yml` and `pipelines.yml` should be located in the settings path, which you can specify running logstash with the `--path.settings` option.

The `startup.options` was used in the past to create the init files to run Logstash as a service, but I don't think it is needed anymore and it is not used when you run logstash using the command line.

---

<div class="post-metadata">

### Author: ![elBilo](https://avatars.discourse-cdn.com/v4/letter/e/a88e4f/32.png) [@elBilo](https://discuss.elastic.co/u/elBilo)
#### Post date: [June 22, 2023, 9:25pm UTC](https://discuss.elastic.co/t/command-line-syntax-to-use-the-logstash-yml-instead-of-the-pipeline-conf/336630/6 "2023-06-22T21:25:36Z")

</div>

Thank you for the explanation. In answer to your request; we're using logstash to centralize our microservices operation logs. We only have one pipeline at this time. We're running logstash in a K8 cluster. We're currently working to automate the deployment of this service from one environment to the next (dev, QA, UAT, production). The reason for the command line based questions is because our helm file starts the service using a command and want to use these command line arguments to direct logstash to the correct configuration for the given operating environment.

---

<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 20, 2023, 9:25pm UTC](https://discuss.elastic.co/t/command-line-syntax-to-use-the-logstash-yml-instead-of-the-pipeline-conf/336630/7 "2023-07-20T21:25:56Z")

</div>

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