Are input and output plugins required

In doing some debugging for a project, I happened to run a configtest (-t) on a config file that only had a filter plugin section, but NO input and NO output. To my surprised, it passed the config test.

If I start Logstash pointing to this config, will the pipeline ever be used?

@marinoc : I am running logstash 5.4.2. It only checks if the config is a valid json with valid sections.
If you start logstash pointing to this config the pipeline will start but not get any input data and produce any output so basically it is useless without atleast one input and output.

Thanks @karanshah

It only checks if the config is a valid json with valid sections.

The Logstash configuration isn't JSON.

Thanks Magnus. Can you provide any more info as to what the config test is looking for?

Can you provide any more info as to what the config test is looking for?

It checks that the configuration is syntactically sound and that the plugin options pass the sometimes rudimentary validation. A failed configtest means that your configuration definitely is wrong but a passed test just means that the configuration isn't necessarily wrong.

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