Ping multiple IP addresses

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
xmesg
Posts: 2
Joined: Wed Oct 19, 2011 5:31 pm

Ping multiple IP addresses

Post by xmesg »

Hello All,

I have recently installed nagios and it is working well. I have run into one snag. I am trying to monitor many nodes across a T1 line and display it as a T1 "host" with many ping services.
I have a host file set up something like this:

define host{
use generic-switch
host_name t1_line
alias t1 line
address 192.168.0.1
hostgroups t1lines
}

define service{
use generic-service
host_name t1_line
service_description PING
check_command check_ping!100.0,20%!500.0,60%
}

define service{
use generic-service
service_description ping of 2nd hop on T1 line
check_command check_ping -H 192.168.0.2 -w 100.0,20% -c 500.0,60%
}

Nagios check comes back fine but when I run it, it only show one service (my main IP) and the second one never shows up. Can anyone point me to where I am going wrong?

Any help is appreciated.

Cheers,

Steve
xvvivan
Posts: 8
Joined: Thu Oct 27, 2011 10:31 am
Location: Varese - Italy

Re: Ping multiple IP addresses

Post by xvvivan »

Hi,

you miss the host_name definition.

Try this

define service{
use generic-service
host_name t1_line
service_description ping of 2nd hop on T1 line
check_command check_ping -H 192.168.0.2 -w 100.0,20% -c 500.0,60%
}

Regards

Ivan
Locked