Created
June 23, 2020 19:13
-
-
Save jdowning/759b9c0522f0f34efe7d6acec3c27fde to your computer and use it in GitHub Desktop.
Check Heroku Kafka PrivateLink ports
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 bash | |
set -euo pipefail | |
HOST=$1 | |
while true | |
do | |
echo -n "$(date)" | |
for p in 10001 10002 10003 | |
do | |
echo -n " $p " | |
if nc -z -w 1 $HOST $p | |
then | |
echo -en " \e[92mok\e[0m " | |
else | |
echo -en " \e[91mbad\e[0m " | |
fi | |
done | |
echo | |
sleep 1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment