This simple Perl script checks whether syslog-ng work through UDP or not. It's only useful and useable when the Nagios is on the same host as Syslog-ng.

Because of "The functions openlog(), syslog() and closelog() return the undefined value." I couldn't check for openlog() errors, so if nagios can't connect to the syslog-ng server the service state will be "UNKNOWN".

If anyone knows how to check for openlog() errors, please let me know.