Issues with NRPE Monitoring for a Linux Server
-
venturegardengroup
- Posts: 62
- Joined: Tue Jun 28, 2016 10:11 am
Re: Issues with NRPE Monitoring for a Linux Server
See output below:
[root@localhost ~]# netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 ens192
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 ens160
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 ens192
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 ens160
[root@localhost ~]#
Regards,
[root@localhost ~]# netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 ens192
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 ens160
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 ens192
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 ens160
[root@localhost ~]#
Regards,
Re: Issues with NRPE Monitoring for a Linux Server
On the client, change the following line in the "/etc/xinetd.d/nrpe" from this:
to this:
and restart xinetd:
Next, test it from the CLI by running on the nagios server:
Did this help?
Code: Select all
only_from = 127.0.0.1 192.168.0.155Code: Select all
only_from = 127.0.0.1 192.168.0.155 192.168.0.250Code: Select all
service xinetd restartCode: Select all
./check_nrpe -H <client ip>Be sure to check out our Knowledgebase for helpful articles and solutions!
-
venturegardengroup
- Posts: 62
- Joined: Tue Jun 28, 2016 10:11 am
Re: Issues with NRPE Monitoring for a Linux Server
See output below:
[root@localhost ~]# netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 ens192
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 ens160
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 ens192
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 ens160
[root@localhost ~]#
[root@localhost ~]# netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 ens192
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 ens160
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 ens192
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 ens160
[root@localhost ~]#
-
venturegardengroup
- Posts: 62
- Joined: Tue Jun 28, 2016 10:11 am
Re: Issues with NRPE Monitoring for a Linux Server
I have run the commands on both the client and the Nagios server; for the Nagios server see output I got below:
[root@localhost /]# ./check_nrpe -H 197.253.1.248
-bash: ./check_nrpe: No such file or directory
[root@localhost /]# ./check_nrpe -H 197.253.1.248
-bash: ./check_nrpe: No such file or directory
Re: Issues with NRPE Monitoring for a Linux Server
Did you make changes to the /etc/xinetd.d/nrpe file that @lmiltchev mentioned?venturegardengroup wrote:I have run the commands on both the client and the Nagios server; for the Nagios server see output I got below:
[root@localhost /]# ./check_nrpe -H 197.253.1.248
-bash: ./check_nrpe: No such file or directory
You need to be in the directory nrpe is installed. Try /usr/local/nagios/libexec/check_nrpe -H 197.253.1.248
Former Nagios Employee
Re: Issues with NRPE Monitoring for a Linux Server
You can run "./check_nrpe" from within the "libexec" directory (where your plugins are located), i.e.[root@localhost /]# ./check_nrpe -H 197.253.1.248
-bash: ./check_nrpe: No such file or directory
Code: Select all
cd /usr/local/nagios/libexec
./check_nrpe -H 197.253.1.248Code: Select all
/usr/local/nagios/libexec/check_nrpe -H 197.253.1.248Be sure to check out our Knowledgebase for helpful articles and solutions!
-
venturegardengroup
- Posts: 62
- Joined: Tue Jun 28, 2016 10:11 am
Re: Issues with NRPE Monitoring for a Linux Server
See output below;
[root@localhost /]# /usr/local/nagios/libexec/check_nrpe -H 197.253.1.248
CHECK_NRPE: Error - Could not complete SSL handshake.
[root@localhost /]# /usr/local/nagios/libexec/check_nrpe -H 197.253.1.248
CHECK_NRPE: Error - Could not complete SSL handshake.
Re: Issues with NRPE Monitoring for a Linux Server
I noticed something I didn't catch on the previous post. When you ran "ip addr" on the client, you showed us a different IP address - 192.168.3.11...
Why are you running your check against the 197.253.1.248 IP address? What is the output of the following command?root@ERP-UAT-APP:/home/xpansa# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:50:56:8c:68:cc brd ff:ff:ff:ff:ff:ff
inet 192.168.3.11/24 brd 192.168.3.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::250:56ff:fe8c:68cc/64 scope link
valid_lft forever preferred_lft forever
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H 192.168.3.11Be sure to check out our Knowledgebase for helpful articles and solutions!
-
venturegardengroup
- Posts: 62
- Joined: Tue Jun 28, 2016 10:11 am
Re: Issues with NRPE Monitoring for a Linux Server
The 197.253.1.248 is the Internet facing IP of the linux server, whereas the 192.168.3.11 is on the local LAN. The Nagios server has no direct communication path to the client machine on 192.168.3.11 only on the 197.253.1.248 address.
[root@localhost /]# /usr/local/nagios/libexec/check_nrpe -H 192.168.3.11
CHECK_NRPE: Socket timeout after 10 seconds.
You have mail in /var/spool/mail/root
[root@localhost /]# /usr/local/nagios/libexec/check_nrpe -H 192.168.3.11
CHECK_NRPE: Socket timeout after 10 seconds.
You have mail in /var/spool/mail/root
Re: Issues with NRPE Monitoring for a Linux Server
If you are trying to test the remote host across the internet, you would have to add the IP address of the internet facing side of the router the Nagios XI server is behind to the /etc/xinetd/nrpe file on the remove server and restart xinetd for the changes to take effect.
Try that and let us know if this helps.
Since the router is NATing the XI server, you will have to do this so the NRPE agent on the remote system allows the correct IP address in for running the checks.
Try that and let us know if this helps.
Since the router is NATing the XI server, you will have to do this so the NRPE agent on the remote system allows the correct IP address in for running the checks.
Be sure to check out our Knowledgebase for helpful articles and solutions!