These steps must be completed from within the Syslog-ng PE Linux environment.
- With root privileges please run the following command from within the Linux environment which is running the Syslog-ng PE instance
/opt/syslog-ng/sbin/syslog-ng -svf /opt/syslog-ng/etc/syslog-ng.conf
Replace "/opt/syslog-ng/etc/syslog-ng.conf" with the location of the syslog-ng configuration file if not using the default location.
- The -ng service will then run a syntax check against the -ng configuration file to ensure its validity.
- If nothing is returned from within the terminal once the syslog-ng syntax tool has been run, then the configuration file is valid.
- If a syntax error is found after running the syslog-ng syntax tool the error will be displayed within the terminal which will state where the syntax error is located.
- For knowledge:
- -s informs the syslog-ng service to perform a syntax verification
- -v informs the syslog-ng service to perform the syntax verification verbosely
- -f informs the syslog-ng service to use a specific configuration file which is then specified
- the -svf syntax within this command combine the above syntaxes to perform the syslog-ng syntax verification of the configuration file verbosely using a configuration file specified.