Monitoring Wizard - Configuration verification failed

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
gbnag
Posts: 26
Joined: Thu Jan 21, 2016 7:58 pm

Re: Monitoring Wizard - Configuration verification failed

Post by gbnag »

sorry for all these questions, just started to work with nagiosxi.

from the nagiosxi server getting a connection refused:

/usr/local/nagios/libexec/check_nrpe -H dmg-dev -t 30 -c check_disk -a '-w 20% -c 10% -p /'
connect to address x.x.xx. port 5666: Connection refused

on the target host, it does not have this port open:

dmg-dev<2> # netstat -ano |grep 5666
-- /usr2/gberger


How would i verify that the nagios agent is actually running on the target? if i grep for the process 'nagios' there is nothing returned.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Monitoring Wizard - Configuration verification failed

Post by tgriep »

The NRPE agent usually runs under the xinetd daemon and the config file should be in the following location if the agent installed correctly.

Code: Select all

/etc/xinetd.d/nrpe
If the file is there and xinetd is installed on that server, restart xinetd and see if that fixes the issue for you.
Be sure to check out our Knowledgebase for helpful articles and solutions!
gbnag
Posts: 26
Joined: Thu Jan 21, 2016 7:58 pm

Re: Monitoring Wizard - Configuration verification failed

Post by gbnag »

When i run the query from NMS:

[root@localhost-010049098179 ~]# /usr/local/nagios/libexec/check_nrpe -H dmg-dev -t 30 -c check_disk -a '-w 20% -c 10% -p /'
connect to address x.x.x. port 5666: Connection refused
connect to host dmg-dev port 5666: Connection refused[root@localhost-010049098179 ~]#


then check the /var/log/messages and syslog, there are no entries mapping to the time stamp.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Monitoring Wizard - Configuration verification failed

Post by Box293 »

Please post your file:

Code: Select all

/etc/xinetd.d/nrpe
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
gbnag
Posts: 26
Joined: Thu Jan 21, 2016 7:58 pm

Re: Monitoring Wizard - Configuration verification failed

Post by gbnag »

Getting connection refused from the nagiosxi system:

[root@localhost-010049098179 ~]# /usr/local/nagios/libexec/check_nrpe -H dmg-dev -t 30 -c check_cpu_stats -a '-w 85 -c 95'
connect to address 10.49.32.35 port 5666: Connection refused
connect to host dmg-dev port 5666: Connection refused[root@localhost-010049098179 ~]#
[root@localhost-010049098179 ~]#
[root@localhost-010049098179 ~]# /usr/local/nagios/libexec/check_nrpe -H dmg-dev -t 30 -c check_mem -a '-w 20 -c 10'
connect to address 10.49.32.35 port 5666: Connection refused
connect to host dmg-dev port 5666: Connection refused[root@localhost-010049098179 ~]#


Here is the nmap command output:

root@localhost-010049098179 ~]# nmap -p5666 dmg-dev

Starting Nmap 6.47 ( http://nmap.org ) at 2016-09-02 15:38 PDT
Nmap scan report for dmg-dev (10.49.32.35)
Host is up (0.00023s latency).
rDNS record for 10.49.32.35: dmg-dev.qualcomm.com
PORT STATE SERVICE
5666/tcp closed nrpe

Nmap done: 1 IP address (1 host up) scanned in 0.06 seconds
[root@localhost-010049098179 ~]#




when checking the target system, there are no nagios related syslog entries.

also, when checking the port on the target host, it is not listed:

gberger@dmg-dev<5> # netstat -ano |grep 5666
-- /var/log



So everything points to the agent on the target hosts, correct?
How would we troubleshoot that?
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Monitoring Wizard - Configuration verification failed

Post by rkennedy »

As @Box293 mentioend -
Box293 wrote:Please post your file:

Code: Select all

/etc/xinetd.d/nrpe
Former Nagios Employee
gbnag
Posts: 26
Joined: Thu Jan 21, 2016 7:58 pm

Re: Monitoring Wizard - Configuration verification failed

Post by gbnag »

config file is present, restarted xinetd on target system


dmg-dev<11> # sudo /etc/init.d/xinetd start
* Starting internet superserver xinetd
...done.

-----------------------------------------

Forced an immediate check and most checks turned green.

We still see the cpu stats as red.

/usr/local/nagios/libexec/check_nrpe -H dmg-dev.qualcomm.com -t 30 -c check_cpu_stats -a '-w 85 -c 95'
NRPE: Unable to read output


CPU load does work ok:

/usr/local/nagios/libexec/check_nrpe -H dmg-dev.qualcomm.com -t 30 -c check_load -a '-w 85 -c 95'
OK - load average: 2.25, 2.31, 2.39|load1=2.250;85.000;95.000;0; load5=2.310;85.000;95.000;0; load15=2.390;85.000;95.000;0;
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Monitoring Wizard - Configuration verification failed

Post by rkennedy »

How is check_cpu_stats defined in NRPE? Check the permissions on the file and make sure that the nagios user can execute it locally.
Former Nagios Employee
gbnag
Posts: 26
Joined: Thu Jan 21, 2016 7:58 pm

Re: Monitoring Wizard - Configuration verification failed

Post by gbnag »

On the nagiosxi server, under /usr/local/nagios/libexec we see check_load but there is no check_cpu_stats

root@localhost-010049098179 libexec]# ls -lrt | grep check_load
-rwxrwxr-x 1 apache nagios 158060 Jun 14 10:44 check_load

root@localhost-010049098179 libexec]# ls -lrt | grep check_cpu_stats
root@localhost-010049098179 libexec]#

is this what you wanted us to check?

We do show cpu stats on a different linux server, but not on our ubuntu servers.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Monitoring Wizard - Configuration verification failed

Post by Box293 »

On your nrpe client, please execute the following command:

Code: Select all

su nagios
/usr/local/nagios/libexec/check_cpu_stats.sh -w 85 -c 95
What output is produced?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked