Logstash has two types of configuration files: pipeline configuration files, which define the Logstash processing pipeline, and settings files, which specify options that control Logstash startup and execution.
You create pipeline configuration files when you define the stages of your Logstash processing pipeline. On deb and
rpm, you place the pipeline configuration files in the
/etc/logstash/conf.d directory. Logstash tries to load only
.conf extension in the
/etc/logstash/conf.d directory and ignores all other files.
See Configuring Logstash for more info.
The settings files are already defined in the Logstash installation. Logstash includes the following settings files:
- Contains Logstash configuration flags. You can set flags in this file instead of passing the flags at the command
line. Any flags that you set at the command line override the corresponding settings in the
logstash.ymlfile. See logstash.yml for more info.
- Contains the framework and instructions for running multiple pipelines in a single Logstash instance. See Multiple Pipelines for more info.
- Contains JVM configuration flags. Use this file to set initial and maximum values for total heap space. You can also use this file to set the locale for Logstash. Specify each flag on a separate line. All other settings in this file are considered expert settings.
- Contains default settings for
log4j 2library. See Log4j2 configuration for more info.
- Contains options used by the
/usr/share/logstash/binto build the appropriate startup script for your system. When you install the Logstash package, the
system-installscript executes at the end of the installation process and uses the settings specified in
startup.optionsto set options such as the user, group, service name, and service description. By default, Logstash services are installed under the user
startup.optionsfile makes it easier for you to install multiple instances of the Logstash service. You can copy the file and change the values for specific settings. Note that the
startup.optionsfile is not read at startup. If you want to change the Logstash startup script (for example, to change the Logstash user or read from a different configuration path), you must re-run the
system-installscript (as root) to pass in the new settings.