Page 2 of 3

Re: Monitoring Wizard - Configuration verification failed

Posted: Tue Aug 30, 2016 3:41 pm
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.

Re: Monitoring Wizard - Configuration verification failed

Posted: Tue Aug 30, 2016 4:26 pm
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.

Re: Monitoring Wizard - Configuration verification failed

Posted: Tue Aug 30, 2016 4:45 pm
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.

Re: Monitoring Wizard - Configuration verification failed

Posted: Tue Aug 30, 2016 4:47 pm
by Box293
Please post your file:

Code: Select all

/etc/xinetd.d/nrpe

Re: Monitoring Wizard - Configuration verification failed

Posted: Fri Sep 02, 2016 5:41 pm
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?

Re: Monitoring Wizard - Configuration verification failed

Posted: Tue Sep 06, 2016 10:29 am
by rkennedy
As @Box293 mentioend -
Box293 wrote:Please post your file:

Code: Select all

/etc/xinetd.d/nrpe

Re: Monitoring Wizard - Configuration verification failed

Posted: Tue Sep 06, 2016 5:20 pm
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;

Re: Monitoring Wizard - Configuration verification failed

Posted: Wed Sep 07, 2016 10:27 am
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.

Re: Monitoring Wizard - Configuration verification failed

Posted: Wed Sep 07, 2016 6:42 pm
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.

Re: Monitoring Wizard - Configuration verification failed

Posted: Thu Sep 08, 2016 10:38 am
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?