Page 2 of 9

Re: Error in AWS EC2 Uubuntu Monitoring

Posted: Fri Mar 10, 2017 8:59 am
by ivp2015
Yes its show

ps aux | grep nrpe

root@ip-172-31-28-18:~# ps aux | grep nrpe
root 4040 0.0 0.0 10460 932 pts/2 S+ 13:53 0:00 grep --color=auto nrpe
nagios 23238 0.0 0.0 23332 1128 ? Ss Feb25 0:00 /usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -d
root@ip-172-31-28-18:~#

and
ls -al /etc/init.d is show


root@ip-172-31-28-18:~# ls -al /etc/init.d
total 236
drwxr-xr-x 2 root root 4096 Feb 25 14:15 .
drwxr-xr-x 102 root root 4096 Mar 1 13:23 ..
-rwxr-xr-x 1 root root 2243 Apr 3 2014 acpid
-rwxr-xr-x 1 root root 9974 Jan 7 2014 apache2
-rwxr-xr-x 1 root root 4596 Mar 27 2014 apparmor
-rwxr-xr-x 1 root root 2801 Mar 18 2015 apport
-rwxrwxr-x 1 root root 1071 Sep 8 2013 atd
-rwxr-xr-x 1 root root 1919 Jan 18 2011 console-setup
lrwxrwxrwx 1 root root 21 Feb 9 2013 cron -> /lib/init/upstart-job
-rwxr-xr-x 1 root root 938 Nov 1 2013 cryptdisks
-rwxr-xr-x 1 root root 896 Nov 1 2013 cryptdisks-early
-rwxr-xr-x 1 root root 2813 Nov 25 2014 dbus
-rwxr-xr-x 1 root root 1217 Mar 7 2013 dns-clean
lrwxrwxrwx 1 root root 21 Mar 14 2012 friendly-recovery -> /lib/init/upstart-job
-rwxr-xr-x 1 root root 1105 May 8 2014 grub-common
-rwxr-xr-x 1 root root 1329 Mar 13 2014 halt
-rwxr-xr-x 1 root root 1864 Nov 12 2012 irqbalance
-rwxr-xr-x 1 root root 1293 Mar 13 2014 killprocs
-rwxr-xr-x 1 root root 1990 Jan 22 2013 kmod
-rwxr-xr-x 1 root root 2611 Jan 5 2015 landscape-client
-rw-r--r-- 1 root root 0 Mar 25 2015 .legacy-bootordering
-rwxr-xr-x 1 root root 5897 Nov 14 2013 nagios3
-rwxr-xr-x 1 root root 2015 Jan 13 2014 nagios-nrpe-server
-rwxr-xr-x 1 root root 4479 Mar 20 2014 networking
-rwxr-xr-x 1 root root 1346 Mar 13 2015 ondemand
-rwxr-xr-x 1 root root 1466 Mar 11 2014 open-vm-tools
-rwxr-xr-x 1 root root 7507 Feb 5 2015 postfix
-rwxr-xr-x 1 root root 561 Nov 25 2014 pppd-dns
-rwxr-xr-x 1 root root 1192 May 27 2013 procps
-rwxr-xr-x 1 root root 6120 Mar 13 2014 rc
-rwxr-xr-x 1 root root 782 Mar 13 2014 rc.local
-rwxr-xr-x 1 root root 117 Mar 13 2014 rcS
-rw-r--r-- 1 root root 2427 Mar 13 2014 README
-rwxr-xr-x 1 root root 639 Mar 13 2014 reboot
-rwxr-xr-x 1 root root 2918 Jun 13 2014 resolvconf
-rwxr-xr-x 1 root root 2512 Aug 12 2014 rpcbind
-rwxr-xr-x 1 root root 4395 Apr 17 2014 rsync
-rwxr-xr-x 1 root root 2913 Dec 4 2013 rsyslog
-rwxr-xr-x 1 root root 1226 Jul 22 2013 screen-cleanup
-rwxr-xr-x 1 root root 3920 Mar 13 2014 sendsigs
-rwxr-xr-x 1 root root 590 Mar 13 2014 single
-rw-r--r-- 1 root root 4290 Mar 13 2014 skeleton
-rwxr-xr-x 1 root root 4077 May 2 2014 ssh
-rwxr-xr-x 1 root root 731 Feb 5 2014 sudo
-rwxr-xr-x 1 root root 1597 Nov 10 2013 sysstat
-rwxr-xr-x 1 root root 6173 Apr 14 2014 udev
-rwxr-xr-x 1 root root 2721 Mar 13 2014 umountfs
-rwxr-xr-x 1 root root 2260 Mar 13 2014 umountnfs.sh
-rwxr-xr-x 1 root root 1872 Mar 13 2014 umountroot
-rwxr-xr-x 1 root root 1361 Dec 6 2013 unattended-upgrades
-rwxr-xr-x 1 root root 3111 Mar 13 2014 urandom
-rwxr-xr-x 1 root root 2443 Oct 26 2013 xinetd


From Nagios Server
/usr/local/nagios/libexec/check_nrpe -H 54.76.125.226 -n

[root@ivpnagiosprod varen]# /usr/local/nagios/libexec/check_nrpe -H 54.76.125.226 -n
CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.
[root@ivpnagiosprod varen]#

Re: Error in AWS EC2 Uubuntu Monitoring

Posted: Fri Mar 10, 2017 3:14 pm
by mcapra
The init.d script looks non-standard. This is likely a side-effect from installing NRPE from a repository we don't control.

From the remote machine can you run and share the output of:

Code: Select all

service nagios-nrpe-server restart
And try the command once more from your Nagios server:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H 54.76.125.226 -n
And if that doesn't work, share the output of this from the remote machine:

Code: Select all

/usr/lib/nagios/plugins/check_nrpe -H 127.0.0.1

Re: Error in AWS EC2 Uubuntu Monitoring

Posted: Mon Mar 13, 2017 5:07 am
by ivp2015
When we run command from our AWS remote machine

service nagios-nrpe-server restart

root@ip-172-31-28-18:~# service nagios-nrpe-server restart
* Stopping nagios-nrpe nagios-nrpe [ OK ]
* Starting nagios-nrpe nagios-nrpe [ OK ]

________________________________________________________________________________

From Nagios Server

/usr/local/nagios/libexec/check_nrpe -H 54.76.125.226 -


[root@ivpnagiosprod varen]# /usr/local/nagios/libexec/check_nrpe -H 54.76.125.226 -
NRPE v2.15


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


from our AWS remote machine

/usr/lib/nagios/plugins/check_nrpe -H 127.0.0.1


root@ip-172-31-28-18:~# /usr/lib/nagios/plugins/check_nrpe -H 127.0.0.1
NRPE v2.15
root@ip-172-31-28-18:~#

Re: Error in AWS EC2 Uubuntu Monitoring

Posted: Mon Mar 13, 2017 2:38 pm
by mcapra
That's looking a bit better. Are you able to monitor the Ubuntu machine from Nagios XI now? There may also be some additional configurations we need to play around with, but this output is encouraging:

Code: Select all

[root@ivpnagiosprod varen]# /usr/local/nagios/libexec/check_nrpe -H 54.76.125.226 -
NRPE v2.15

Re: Error in AWS EC2 Uubuntu Monitoring

Posted: Tue Mar 14, 2017 4:58 am
by ivp2015
When we run command from Nagios server

[root@ivpnagiosprod varen]# /usr/local/nagios/libexec/check_nrpe -H 54.76.125.226 -
NRPE v2.15

and - n

[root@ivpnagiosprod varen]# /usr/local/nagios/libexec/check_nrpe -H 54.76.125.226 -n
CHECK_NRPE: Error receiving data from daemon.

and still we are not able to monitor the same its show SSL handshake error on Nagios

Re: Error in AWS EC2 Uubuntu Monitoring

Posted: Tue Mar 14, 2017 2:51 pm
by rkennedy
Post the definition for the failing host / service and your command definition for check_nrpe. Just have to see how it all lines up.

Re: Error in AWS EC2 Uubuntu Monitoring

Posted: Tue Mar 14, 2017 3:23 pm
by mcapra
How are you configuring your checks? Are you using the "Linux Server" configuration wizard? Can you show the specific error (via screenshot) being produced in the Nagios XI GUI?

Can you also send over a system profile? From the Nagios XI GUI, you can gather a profile via Admin -> System Profile -> Download Profile.

Re: Error in AWS EC2 Uubuntu Monitoring

Posted: Wed Mar 15, 2017 3:05 am
by ivp2015
We are using GUI for adding a new host in Nagios XI
Please find out the screen shot of error and profile,

Re: Error in AWS EC2 Uubuntu Monitoring

Posted: Wed Mar 15, 2017 10:54 am
by mcapra
Can you share the screenshots of each step of the configuration wizard you are using? Something might be getting mixed up.

Re: Error in AWS EC2 Uubuntu Monitoring

Posted: Tue Mar 21, 2017 8:28 am
by ivp2015
Hi Team,

Please find out the screen shot of Nagios XI UI for adding host