Page 1 of 1

Ping Second IP

Posted: Wed Aug 10, 2016 1:16 pm
by mdsupersonic
Hi Support Team,
I'm a little bit confused about Pinging second IP in Nagios XI.I have Servers in nagios which they have second IPs and Nagios Pinging them like pinging the first IP but there are not any command for second Ping.
Dose Nagios do it automatically and adding the second ping by itself or I the administrator should do it?
If it is administrator why it does not have any check command?
I've attached pics about this and showing 'Second Ping IP' without any check command.
Any help or suggestion is really appreciated.

Regards
Majid

Re: Ping Second IP

Posted: Wed Aug 10, 2016 1:28 pm
by rkennedy
Can you click 'Manage Templates' and show us what is assigned to it? If it's inheriting through the template, then the options will still be blank.

Re: Ping Second IP

Posted: Wed Aug 10, 2016 1:33 pm
by mdsupersonic
Yes it has template assigned to it and the question is when I'm using NRPE wizard to add a new Linux server can I add both IP addresses in IP address field at the beginning of wizard? How can I have this second IP in wizard like the regular Ping?

Re: Ping Second IP

Posted: Wed Aug 10, 2016 1:43 pm
by rkennedy
How do you have the check setup currently? Can you PM over a profile for us to look at? (Admin -> System Profile -> Download Profile)

Re: Ping Second IP

Posted: Wed Aug 10, 2016 1:48 pm
by mdsupersonic
Here is the Profile.zip attached.
I have several Linux servers with second IPs monitoring only with templates like Regular Ping which you have in Wizard.The question is I don't know how to include second IP in NRPE wizard at the beginning?

Re: Ping Second IP

Posted: Wed Aug 10, 2016 3:13 pm
by rkennedy
mdsupersonic wrote:Here is the Profile.zip attached.
I have several Linux servers with second IPs monitoring only with templates like Regular Ping which you have in Wizard.The question is I don't know how to include second IP in NRPE wizard at the beginning?
Oh - I understand now. Unfortunately, this isn't going to be possible using the NRPE wizard.

Re: Ping Second IP

Posted: Wed Aug 10, 2016 3:27 pm
by mdsupersonic
How can I ping the second IP of a host in any wizard? how can I add second IP to my host and ping that too?
There should be a solution that you can assign second IP and ping it in Linux servers.

Re: Ping Second IP

Posted: Wed Aug 10, 2016 4:28 pm
by mcapra
The wizards simply haven't been set up to include considerations for multiple IP addresses. If you would like, I can file a feature request for this functionality. Strictly speaking, each Host can only have one "address" in Nagios Core.

The check_icmp plugin itself is able to handle multiple addresses:

Code: Select all

[root@localhost ~]# /usr/local/nagios/libexec/check_icmp -H 192.168.67.1 192.168.67.2
 :: OK - 192.168.67.1: rta 0.024ms, lost 0%192.168.67.2: rta 0.068ms, lost 0%|192.168.67.1rta=0.024ms;200.000;500.000;0; 192.168.67.1pl=0%;40;80;; 192.168.67.1rtmax=0.056ms;;;; 192.168.67.1rtmin=0.014ms;;;; 192.168.67.2rta=0.068ms;200.000;500.000;0; 192.168.67.2pl=0%;40;80;; 192.168.67.2rtmax=0.154ms;;;; 192.168.67.2rtmin=0.029ms;;;;
You could set up a Command definition named something like "check_multi_ping" which accepts IP addresses as the "host" argument.

Many of the stock XI command definitions that leverage check_icmp are going to try to use the Host's address as the target. This is likely where you are running into problems:
2016_08_10_16_27_04_Nagios_XI_Nagios_Core_Config_Manager.png
But in terms of Nagios Core (which supports Nagios XI) each Host can only possess one "address". If your host is accessible through multiple addresses and you need to configure Service/Host checks against each of those addresses, the best route would be to configure each address as a Host object.

Re: Ping Second IP

Posted: Wed Aug 10, 2016 4:56 pm
by Box293
You could setup two ping services and then for the host check use the check_cluster plugin which can base it's status on the state of the other two service checks.

https://assets.nagios.com/downloads/nag ... sters.html