Page 1 of 1

Nagios server not able to communicate using virtual IP

Posted: Thu Jan 17, 2013 2:35 am
by wiproltdwiv
Hi,

We are using Nagios XI 2012 R1.2 on RHEL 6.3 OS. We were using http://10.128.17.12/nagiosxi url for accessing Nagios. Where 10.128.17.12 was physical server IP. We are using two node, one is Nagios application and other is Nagios database. For failover we are doing active-passive clustering. We need above url should work in any server goes fail, for this we have change physical IP address of Nagios server 10.128.17.253 instead of 10.128.17.12, but we assign 10.128.17.12 as virtual IP. Now we can access http://10.128.17.12/nagiosxi url and see all devices, but we are getting communication error with all added devices. While command line we are getting below error.

[root@EMSNagios1 libexec]# ./check_nrpe -H 10.128.17.13 -c check_disk
CHECK_NRPE: Error - Could not complete SSL handshake

whether i am getting output of localhost using virtual IP as well suppose i changed IP in remote host nrpe file as 10.128.17.253 instead of 10.128.17.12.

[root@EMSNagios1 libexec]# ./check_nrpe -H 10.128.17.12 -c check_disk
DISK OK - free space: / 29059 MB (60% inode=98%);| /=18776MB;40316;45356;0;50396

[root@EMSNagios1 libexec]# ./check_nrpe -H 10.128.17.13 -c check_disk
DISK OK - free space: / 20334 MB (42% inode=99%);| /=27502MB;40316;45356;0;50396


We have add 10.128.17.12 IP on all devices and we cant change that. Because hosts are more than 400 hundreds. Please suggest the solution, so we can use 10.128.17.12 Ip as virtual, this IP should be work if any host goes down, all devices should be communicate with Nagios using virtual IP.

Re: Nagios server not able to communicate using virtual IP

Posted: Thu Jan 17, 2013 10:22 am
by slansing
Have you checked your firewall for port 5666? Some are a little touchy and reset after a IP swap like that.

It looks like whatever you did fixed the:

Code: Select all

CHECK_NRPE: Error - Could not complete SSL handshake
As it does not appear on the last check you linked. I would normally suggest our Bulk Modifications tool for this job though it does not support changing the IP address of a host.
Please suggest the solution, so we can use 10.128.17.12 Ip as virtual, this IP should be work if any host goes down, all devices should be communicate with Nagios using virtual IP.
Forgive me if I am wrong but are you asking how to drop a static IP and use it somewhere else?

Re: Nagios server not able to communicate using virtual IP

Posted: Mon Jan 21, 2013 2:38 am
by wiproltdwiv
Below are the output of my nagios server network details. Where is 17.253 is physical and 17.12 is virtual ip (service ip).
Now system is in clustering, before clustering we were using 17.12 as physical ip and nagios was working fine, but now it is showing below error. Also client system nrpe file having same address (17.12).

[root@EMSNagios1 libexec]# ./check_nrpe -H 10.128.17.13 -c check_disk
CHECK_NRPE: Error - Could not complete SSL handshake.

[root@EMSNagios1 libexec]# ip add
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP qlen 1000
link/ether 04:7d:7b:6d:d8:2c brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP qlen 1000
link/ether 04:7d:7b:6d:d8:2c brd ff:ff:ff:ff:ff:ff
4: eth2: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP qlen 1000
link/ether 04:7d:7b:6d:d8:2c brd ff:ff:ff:ff:ff:ff
5: eth3: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP qlen 1000
link/ether 04:7d:7b:6d:d8:2c brd ff:ff:ff:ff:ff:ff
6: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
link/ether 04:7d:7b:6d:d8:2c brd ff:ff:ff:ff:ff:ff
inet 10.128.17.253/23 brd 10.128.17.255 scope global bond0
inet 10.128.17.12/23 scope global secondary bond0
inet6 fe80::67d:7bff:fe6d:d82c/64 scope link
valid_lft forever preferred_lft forever
7: virbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
link/ether 52:54:00:f5:67:18 brd ff:ff:ff:ff:ff:ff
inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
8: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 500
link/ether 52:54:00:f5:67:18 brd ff:ff:ff:ff:ff:ff

Re: Nagios server not able to communicate using virtual IP

Posted: Mon Jan 21, 2013 3:10 pm
by scottwilkerson
Did you install NRPE with the Linux Agent tarball?

Is it running under xinetd ?

If so, do you have all the applicable IP's in /etc/xinetd.d/nrpe in the only_from field (space seperated)