How to query rsyslog settings

configurationsyslog

I am using rsyslog for program logging and system logging so I have unified log files. I'm having some messages dropping out and I'm not sure why, but I think it may be a configuration option set incorrectly or left at a default value I need to change. I know I can set the values for options in rsyslog.conf but how can I see what is being used by rsyslog currently?

I have searched for a while for the answer to this online and can't believe it's not possible, someone must have needed this and figured it out.

Thanks for any help!

Best Answer

There is no such option for querying rsyslog config, see the rsyslogd(8) man page and that's why you can't find anything.

If you want to check rsyslog config, you may use the following command:

rsyslogd -N1

This tells rsyslog to do a config check. It does NOT run in regular mode, but just check configuration file correctness. This option is meant to verify a config file. To do so, run rsyslogd interactively in foreground, specifying -f and -N level. The level argument modifies behaviour. Currently, 0 is the same as not specifying the -N option at all (so this makes limited sense) and 1 actually activates the code.

See deatils here: http://www.rsyslog.com/doc/v8-stable/troubleshooting/troubleshoot.html#configuration-problems

Or you can use debugging, here is How to use debug on demand