CentOS - Unable to monitor Redhat OS

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: CentOS - Unable to monitor Redhat OS

Post 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?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
timlee
Posts: 60
Joined: Mon Jan 12, 2015 10:01 pm

Re: CentOS - Unable to monitor Redhat OS

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: CentOS - Unable to monitor Redhat OS

Post by scottwilkerson »

does this client have syslog installed? or is it rsyslog?

Code: Select all

ls /etc/init.d/|grep syslog
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: CentOS - Unable to monitor Redhat OS

Post 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 ***
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
timlee
Posts: 60
Joined: Mon Jan 12, 2015 10:01 pm

Re: CentOS - Unable to monitor Redhat OS

Post 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'
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: CentOS - Unable to monitor Redhat OS

Post by tmcdonald »

I'll be closing this thread now, but feel free to open another if you need anything in the future!
Former Nagios employee
Locked