Skip to content

Instantly share code, notes, and snippets.

@Aricg
Created June 7, 2013 14:43
Show Gist options
  • Select an option

  • Save Aricg/5729759 to your computer and use it in GitHub Desktop.

Select an option

Save Aricg/5729759 to your computer and use it in GitHub Desktop.
simple nagios ping gateway check
#!/bin/bash.
host=172.10.10.1
if ! [[ $(ping -c4 $host &> /dev/null;) ]];
then
echo "OK - VPN is up"
else
echo "CRITICAL - Cannot ping VPN gateway"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment