check_ping Plugin - choose interface
Posted: Mon Apr 25, 2016 7:53 am
Hi,
My host (a Raspberry PI) has 2 network interfaces (wlan0 - WIFI and eth1 - 3G dongle).
I need to check each different interface pinging 8.8.8.8 and taking packet loss % in order to understand if the interface is ok:
check wlan0 ----->ping -c 5 -q -I wlan0 8.8.8.8| grep -oP '\d+(?=% packet loss) --->if !=100 then interface wlan0 is ok
check eth1 ----->ping -c 5 -q -I eth1 8.8.8.8| grep -oP '\d+(?=% packet loss) --->if !=100 then interface eth1 is ok
Haw can have in Nagios the above informations ?
tks,
Pippo
My host (a Raspberry PI) has 2 network interfaces (wlan0 - WIFI and eth1 - 3G dongle).
I need to check each different interface pinging 8.8.8.8 and taking packet loss % in order to understand if the interface is ok:
check wlan0 ----->ping -c 5 -q -I wlan0 8.8.8.8| grep -oP '\d+(?=% packet loss) --->if !=100 then interface wlan0 is ok
check eth1 ----->ping -c 5 -q -I eth1 8.8.8.8| grep -oP '\d+(?=% packet loss) --->if !=100 then interface eth1 is ok
Haw can have in Nagios the above informations ?
tks,
Pippo