Settings File
editSettings File
editYou can set options in the Logstash settings file, logstash.yml
, to control Logstash execution. For example,
you can specify pipeline settings, the location of configuration files, logging options, and other settings.
Most of the settings in the logstash.yml
file are also available as command-line flags
when you run Logstash. Any flags that you set at the command line override the corresponding settings in the
logstash.yml
file.
The logstash.yml
file, which is written in YAML, is located in LOGSTASH_HOME/config
. You can
specify settings in hierarchical form or use flat keys. For example, to use hierarchical form to set the pipeline batch
size and batch delay, you specify:
pipeline: batch: size: 125 delay: 5
To express the same values as flat keys, you specify:
pipeline.batch.size: 125 pipeline.batch.delay: 5
The logstash.yml
file includes the following settings:
Setting | Description | Default value |
---|---|---|
|
A descriptive name for the node. |
Machine’s hostname |
|
The directory that Logstash and its plugins use for any persistent needs. |
|
|
The number of workers that will, in parallel, execute the filter and output stages of the pipeline. If you find that events are backing up, or that the CPU is not saturated, consider increasing this number to better utilize machine processing power. |
Number of the host’s CPU cores |
|
The number of workers to use per output plugin instance. |
|
|
The maximum number of events an individual worker thread will collect from inputs
before attempting to execute its filters and outputs.
Larger batch sizes are generally more efficient, but come at the cost of increased memory
overhead. You may have to increase the JVM heap size by setting the |
|
|
When creating pipeline event batches, how long in milliseconds to wait before dispatching an undersized batch to filters and workers. |
|
|
When set to |
|
|
The path to the Logstash config for the main pipeline. If you specify a directory or wildcard, config files are read from the directory in alphabetical order. |
Platform-specific. See Logstash Directory Layout. |
|
A string that contains the pipeline configuration to use for the main pipeline. Use the same syntax as the config file. |
None |
|
When set to |
|
|
When set to |
|
|
How often in seconds Logstash checks the config files for changes. |
|
|
When set to |
|
|
The bind address for the metrics REST endpoint. |
|
|
The bind port for the metrics REST endpoint. |
|
|
The log level. Valid options are:
|
|
|
The log format. Set to |
|
|
The directory where Logstash will write its log to. |
`LOGSTASH_HOME/logs |
|
Where to find custom plugins. You can specify this setting multiple times to include
multiple paths. Plugins are expected to be in a specific directory hierarchy:
|
Platform-specific. See Logstash Directory Layout. |