Last active
May 20, 2020 16:02
-
-
Save elhardoum/99e3205c1c0d7fc3bfcc40e9023e627d to your computer and use it in GitHub Desktop.
Testing your load balancer servers for downtime, ignores SSL errors assuming you're testing the core of your web service
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
host="www.example.com" | |
ips=( | |
93.184.216.34 | |
) | |
for ip in "${ips[@]}"; do | |
curl -H "Host: $host" "https://$ip/" -kIs |grep 200\ OK >/dev/null && ( | |
echo "\033[0;32m[✓] $ip\t(passed)" | |
) || ( | |
echo "\033[0;31m[×] $ip\t(failed)" | |
) | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment