Random Project

Works better than I hoped!

Thanks for the thorough explanation of setting it up. I thought I can add some more to it to help.

– First for CentOS 6.5 I had to comment out the option in visudo ‘Defaults requiretty’ so that nrpe can become root thru script.

– Here is my config to help any others. I monitor Syslog-ng client and server remotely using the nrpe on each local machine.

# ‘check_syslog-ng’ command definition
define command{
command_name check_syslog-ng
command_line $USER1$/check_exit_status.pl -s /etc/init.d/syslog-ng -r
}

define service {
host_name prod-db-backup
service_description check_syslog-ng
is_volatile 1
check_command check_nrpe!check_syslog-ng
max_check_attempts 5
normal_check_interval 15
retry_check_interval 1
check_period 24×7
notification_interval 60
notifications_enabled 1
notification_period 24×7
notification_options w,u,c,r,f
contact_groups admingroup
stalking_options w,u,c
}

nrpe.cfg:
command[check_syslog-ng]=/usr/lib64/nagios/plugins/check_exit_status.pl -s /etc/init.d/syslog-ng -r

Reloaded Nagios and it worked just fine. No need for ARG or -w -c. If status is stopped, service alerts, if status is running, it stays green and checks.

Thank you again.