Logstash Configuration File Structure
A Logstash configuration file contains three sections for specifying each type of plugin we want to use. The three sections are input
, filter
, and output
. Consider the following example:
input { } filter { } output { }
Each section contains the configuration for single or multiple plugins. To configure a plugin, provide the plugin name inside the section, followed by the settings or parameters of that plugin. It is specified in terms of key =>
value pair. For each section, if you define multiple plugins, then the order of execution is the order in which they appear in the configuration file. Each plugin has its own set of settings, which needs to be used with the plugin name.
Note
The =>
sign is an assignment operator which assigns the value to the key in the configuration file.
Before going into depth about the various plugins available in each of the sections, let's understand...