Logstash: is there a way to view the complete running config when using multiple config files in /etc/logstash/conf.d

logstash

I am running logstash 1.5.0.1 and I have multiple config files in my /etc/logstash/conf.d folder:

 01-input-source-one.conf
 02-input-source-two.conf
 10-filter-one.conf
 11-filter-two.conf
 20-output-one.conf
 21-output-two.conf

After modifying a config file I test using /opt/logstash/bin/logstash agent -f /etc/logstash/conf.d --configtest.

If there is a problem with one of my config files I get a message that references the line number in the combined file as follows:

Error: Expected one of #, ", ', } at line 331, column 13 (byte 15167) after filter {

Sometimes, but not all the time, it shows a code snippet after the error that helps me locate the correct file but the line number in the error still doesn't do me any good.

Does anyone know if there is a way to view the combined config file?

This could also be useful in troubleshooting configuration issues that aren't the result of a syntax error (that pass a --configtest) but the result of an ordering issue.

Thanks!

Best Answer

Yes, run it interactively from the command line. It will generate a lot of other information though.

/opt/logstash/bin/logstash --debug -f /etc/logstash/conf.d

Or run following to just test and see the compiled config

/opt/logstash/bin/logstash --debug --debug-config -t -f /etc/logstash/conf.d/

You probably want to tee the output, this also gives you all of the grok filters etc.