1. create a file named "packetloss" at this location "/etc/zabbix/externalscripts/"
/etc/zabbix/externalscripts/packetloss
2. cut out and paste this in "packetloss" file
#!/bin/sh
if [ -z $1 ]
then
echo "missing ip / hostname address"
echo " example ./packetloss 192.168.201.1 10000"
echo "10000 = 10000 bytes to ping with. the more you use the harder the netrwork will have to deliver it and you start see packetloss. ping with normal ping size is kinda pointless, on LAN networks I recomend to use 10000 - 20000 and on internet around 3000"
echo "Remember some firewalls might block pings over 100"
echo "/ Fableman"
fi
if [ -z $2 ]
then
echo "missing ping size"
echo " example ./packetloss 192.168.201.1 10000"
echo "10000 = 10000 bytes to ping with. the more you use the harder the netrwork will have to deliver
it and you start see packetloss. ping with normal ping size is kinda pointless, on LAN networks I recomend to use 10000 - 20000 and on internet around 3000"
echo "Remember some firewalls might block pings over 100"
echo "/ Fableman"
exit
fi
tal=`ping -q -i0.30 -n -s $2 -c5 $1 | grep "packet loss" | cut -d " " -f6 | cut -d "%" -f1`
if [ -z $tal ]
then
echo 100
else
echo $tal
fi
3. Now we make file runnable Type: chmod u+x etc/zabbix/externalscripts/packetloss
4. in zabbix verify the host you want to monitor the packetloss on have a valid IP or hoste name and the correct "Connect to" selected.
Then under Item you create a new Item for that host
Type: External Check
Key: packetloss[10000]
SAVE
5. now check monitoring /lastest data for that host and you should start see packetloss numbers
Done.
the numer 10000 you added is Ping size.
its very hard to spot packetloss when only sending a few byte as a normal ping dose.
Soo I added ping size and I sening the pings much faster speed aswell.
Try increase the size until you see packetloss then you know you pushing your equipment limits
Good luck..
(I hope I dident miss any.)
/etc/zabbix/externalscripts/packetloss
2. cut out and paste this in "packetloss" file
#!/bin/sh
if [ -z $1 ]
then
echo "missing ip / hostname address"
echo " example ./packetloss 192.168.201.1 10000"
echo "10000 = 10000 bytes to ping with. the more you use the harder the netrwork will have to deliver it and you start see packetloss. ping with normal ping size is kinda pointless, on LAN networks I recomend to use 10000 - 20000 and on internet around 3000"
echo "Remember some firewalls might block pings over 100"
echo "/ Fableman"
fi
if [ -z $2 ]
then
echo "missing ping size"
echo " example ./packetloss 192.168.201.1 10000"
echo "10000 = 10000 bytes to ping with. the more you use the harder the netrwork will have to deliver
it and you start see packetloss. ping with normal ping size is kinda pointless, on LAN networks I recomend to use 10000 - 20000 and on internet around 3000"
echo "Remember some firewalls might block pings over 100"
echo "/ Fableman"
exit
fi
tal=`ping -q -i0.30 -n -s $2 -c5 $1 | grep "packet loss" | cut -d " " -f6 | cut -d "%" -f1`
if [ -z $tal ]
then
echo 100
else
echo $tal
fi
3. Now we make file runnable Type: chmod u+x etc/zabbix/externalscripts/packetloss
4. in zabbix verify the host you want to monitor the packetloss on have a valid IP or hoste name and the correct "Connect to" selected.
Then under Item you create a new Item for that host
Type: External Check
Key: packetloss[10000]
SAVE
5. now check monitoring /lastest data for that host and you should start see packetloss numbers
Done.
the numer 10000 you added is Ping size.
its very hard to spot packetloss when only sending a few byte as a normal ping dose.
Soo I added ping size and I sening the pings much faster speed aswell.
Try increase the size until you see packetloss then you know you pushing your equipment limits

Good luck..
(I hope I dident miss any.)
Comment