Page 3 of 3

Re: CentOS - Unable to monitor Redhat OS

Posted: Thu Feb 12, 2015 11:21 pm
by Box293
On the remote host, run the following:

Code: Select all

su nagios
/usr/local/nagios/libexec/check_services -p sendmail
sudo /usr/local/nagios/libexec/check_init_service syslog
What do you get?

Re: CentOS - Unable to monitor Redhat OS

Posted: Fri Feb 13, 2015 1:53 am
by timlee
Box293 wrote:On the remote host, run the following:

Code: Select all

su nagios
/usr/local/nagios/libexec/check_services -p sendmail
sudo /usr/local/nagios/libexec/check_init_service syslog
What do you get?
The error is the same for sendmail, however there is no response for syslog

Code: Select all

[nagios@localhost root]$ /usr/local/nagios/libexec/check_services -p sendmail
  *** sendmail: Nok ***
[nagios@localhost root]$ sudo /usr/local/nagios/libexec/check_init_service syslog

Re: CentOS - Unable to monitor Redhat OS

Posted: Fri Feb 13, 2015 9:56 am
by scottwilkerson
does this client have syslog installed? or is it rsyslog?

Code: Select all

ls /etc/init.d/|grep syslog

Re: CentOS - Unable to monitor Redhat OS

Posted: Fri Feb 13, 2015 8:26 pm
by Box293
timlee wrote:The error is the same for sendmail

Code: Select all

[nagios@localhost root]$ /usr/local/nagios/libexec/check_services -p sendmail
      *** sendmail: Nok ***
In my opinion, the sendmail service on that server is not running, the check_services is reporting this (which is good).
Here's an example using crond:

Code: Select all

[root@centos01 ~]# service crond status
crond (pid  1054) is running...
[root@centos01 ~]# su nagios
[nagios@centos01 root]$ /usr/local/nagios/libexec/check_services -p crond
  crond: 1
[nagios@centos01 root]$ exit
[root@centos01 ~]# service crond stop
Stopping crond:                                            [  OK  ]
[root@centos01 ~]# su nagios
[nagios@centos01 root]$ /usr/local/nagios/libexec/check_services -p crond
  *** crond: Nok ***

Re: CentOS - Unable to monitor Redhat OS

Posted: Sun Feb 15, 2015 8:43 pm
by timlee
scottwilkerson wrote:does this client have syslog installed? or is it rsyslog?

Code: Select all

ls /etc/init.d/|grep syslog
Hi, it is a rsyslog.

Code: Select all

[root@localhost ~]# ls /etc/init.d/|grep syslog
rsyslog
I changed the command for 'syslog' to 'rsyslog' and its working now! Thanks heaps! :D
check_nrpe!check_init_service!-a 'rsyslog'

Re: CentOS - Unable to monitor Redhat OS

Posted: Mon Feb 16, 2015 10:38 am
by tmcdonald
I'll be closing this thread now, but feel free to open another if you need anything in the future!