Does logstash use its own file syntax in config file? Is there any parser or validator for config file syntax?
For anyone that does not use logstash but have idea about file formats here is a sample syntax:
input {
file {
path => "/var/log/messages"
type => "syslog"
}
file {
path => "/var/log/apache/access.log"
type => "apache"
}
}
Apparently command line arguments have been updated since the answers have been posted and --configtest
and --config
arguments are no longer valid. In order to ask Logstash (at least v5) to validate config file:
bin/logstash -t -f config.conf
With expanded arguments it looks like this:
bin/logstash --config.test_and_exit --path.config config.conf