Page 1 of 1

Monitoring Nagios server

Posted: Thu Mar 07, 2019 4:20 am
by RIDS_I2MP
Hello Team,

We have four Linux servers on which we have configured Nagios XI and we are monitoring a number of application and database servers through them.

IP: 10.144.223.156
IP: 10.144.223.155
IP: 10.147.108.46
IP: 10.147.108.45

Now, we want to monitor one Nagios XI server from other Nagios XI server. We want to enable complete monitoring for them.

[nagios@eu2napu002 ~]$ uname -a
Linux eu2napu002 2.6.32-642.6.2.el6.x86_64 #1 SMP Mon Oct 24 10:22:33 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux

Please let us know if we need to install nrpe agent on them to enable monitoring or it can be achieved just by doing some config changes in them.

Let me know if you need any other information.

Re: Monitoring Nagios server

Posted: Thu Mar 07, 2019 10:47 am
by cdienger
Depending on what you want to monitor, nrpe may not be necessary. https://assets.nagios.com/downloads/nag ... Server.pdf covers monitoring a XI server from another XI server.

Re: Monitoring Nagios server

Posted: Mon Mar 11, 2019 3:28 am
by RIDS_I2MP
Hello,

Thanks for the help.

I have referred the document provided by you and enabled monitoring on Nagios server from other Nagios server.
We are now able to monitor the basic parameters as per doc. Can you please let me know if there is possibility to monitor the mount points as well like /usr, /tmp, /root, etc.

If yes, how it can be achieved? please help us on that.

Re: Monitoring Nagios server

Posted: Mon Mar 11, 2019 10:41 am
by cdienger
The Linux server wizard and nrpe can help you monitor that - https://assets.nagios.com/downloads/nag ... g-NRPE.pdf.

Re: Monitoring Nagios server

Posted: Tue Mar 12, 2019 6:35 am
by RIDS_I2MP
Hello,

We tried using Linux server wizard, but we are getting below error:

(Return code of 255 is out of bounds)

We checked and found that there is one nrpe.cfg present in Nagios XI server whih needs to be monitored by other Nagios server, we found below:

[nagios@eu2napu002 etc]$ ls -lrt
total 340
-rw-rw-r-- 1 apache nagios 4827 May 26 2014 ndomod.cfg
-rw-rw-r-- 1 apache nagios 2229 May 26 2014 ndo2db.cfg
-rw-rw-r-- 1 apache nagios 1627 May 26 2014 send_nsca.cfg
-rw-rw-r-- 1 apache nagios 5345 May 26 2014 nsca.cfg
-rw-rw-r-- 1 apache nagios 71680 May 29 2014 cofnig.tar
-rwxrwxr-x 1 apache nagios 215 Jun 2 2014 resource.cfg
-rwxrwxr-x 1 apache nagios 5598 Aug 8 2015 nagios.cfg
-rw-rw-r-- 1 apache nagios 8021 Aug 30 2018 nrpe.cfg
drwxrwsr-x. 4 apache nagios 4096 Dec 24 04:16 pnp
drwsrwsr-x. 2 apache nagios 4096 Dec 24 04:16 static
-rw-rw-r-- 1 apache nagios 265 Jan 15 09:47 recurringdowntime.cfg
-rw-rw-r-- 1 apache nagios 1430 Mar 4 10:39 cgi.cfg
drwsrwsr-x. 2 apache nagios 20480 Mar 8 10:25 hosts
drwsrwsr-x. 2 apache nagios 16384 Mar 8 12:05 services
drwsrwsr-x. 2 apache nagios 4096 Mar 12 08:16 import
-rw-rw-r-- 1 apache nagios 25923 Mar 12 08:16 hostgroups.cfg
-rw-rw-r-- 1 apache nagios 2075 Mar 12 08:16 servicegroups.cfg
-rw-rw-r-- 1 apache nagios 15552 Mar 12 08:16 hosttemplates.cfg
-rw-rw-r-- 1 apache nagios 23038 Mar 12 08:16 servicetemplates.cfg
-rw-rw-r-- 1 apache nagios 10361 Mar 12 08:16 timeperiods.cfg
-rw-rw-r-- 1 apache nagios 28850 Mar 12 08:16 commands.cfg
-rw-rw-r-- 1 apache nagios 16859 Mar 12 08:16 contacts.cfg
-rw-rw-r-- 1 apache nagios 2096 Mar 12 08:16 contactgroups.cfg
-rw-rw-r-- 1 apache nagios 1675 Mar 12 08:16 contacttemplates.cfg
-rw-rw-r-- 1 apache nagios 823 Mar 12 08:16 servicedependencies.cfg
-rw-rw-r-- 1 apache nagios 817 Mar 12 08:16 hostdependencies.cfg
-rw-rw-r-- 1 apache nagios 1337 Mar 12 08:16 serviceescalations.cfg
-rw-rw-r-- 1 apache nagios 819 Mar 12 08:16 hostescalations.cfg
-rw-rw-r-- 1 apache nagios 843 Mar 12 08:16 serviceextinfo.cfg
-rw-rw-r-- 1 apache nagios 837 Mar 12 08:16 hostextinfo.cfg
[nagios@eu2napu002 etc]$ pwd
/usr/local/nagios/etc


We checked the nrpe.cfg and made the changes to "allowed host" and "dont_blame_nrpe" arguments.

Then we restarted nrpe service on it, then too we were getting the error.

Can you please confirm if we need to install a fresh nrpe agent?
As the one we checked was already present there.

Please suggest.

Re: Monitoring Nagios server

Posted: Tue Mar 12, 2019 9:12 am
by lmiltchev
Is NRPE running on the remote machine? Is it running under xinetd or as a "standalone" daemon? Is port 5666 open? Can you run the following commands and show the output?

On the remote box (client):

Code: Select all

service xinetd status
service nrpe status
ps axuw | grep nrpe
netstat -at | grep nrpe
On the Nagios XI server:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H <client ip>
Can you also show us how the command is configured in the nrpe.cfg on the remote box?

Show us the actual command run from the command line along with the output of it:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H <client ip> -c <command> -a <args>
where you substitute <command> and <args> with the actual command and arguments.