Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- COLUMN=VPN # Name of the column
- COLOR=green # By default, everything is OK
- MSG="Customer Tunnel Status"
- IP1=127.0.0.1
- IP2=127.0.0.1
- IP3=127.0.0.1
- ping -c 3 $IP1
- if [[ $? != 0 ]]; then
- IPRES1=ok
- ng -c 3 $IP2
- if [[ $? != 0 ]]; then
- IPRES2=ok
- ping -c 3 $IP3
- if [[ $? != 0 ]]; then
- IPRES3=ok
- if $IPRES1=good & $IPRES2=good & $IPRES3=good
- then
- MSG=All is OK
- else
- COLOR=red
- MSG=Tunnel is down
- fi
- # Tell Xymon about it
- $BB $BBDISP "status $MACHINE.$COLUMN $COLOR `date`
- ${MSG}
- "
- exit 0
Add Comment
Please, Sign In to add comment