declare -A ELB_REGION=(
["AAAA-ELB"]="us-east-1"
["BBBB-ELB"]="us-west-1"
["CCCC-ELB"]="us-east-1"
)
declare -A ELB_CRITIALLIMIT=(
["AAAA-ELB"]="-1"
["BBBB-ELB"]="0"
["CCCC-ELB"]="0"
)
# Test for each ELB
for ELB in "${!ELB_REGION[@]}"
do
# echo $ELB ${ELB_REGION[$ELB]} ${ELB_CRITIALLIMIT[$ELB]}
RESULTS=`/usr/local/bin/check_elb_health.sh -r ${ELB_REGION[$ELB]} -c ${ELB_CRITIALLIMIT[$ELB]} $ELB`
RETURNCODE=$?
# RETURNCODE=2 # set for debugging
track_worst_result $RETURNCODE # External function
# Capture the results for any bad checks
if [[ "$RETURNCODE" -gt "0" ]]; then
FINALRESULTS="$RESULTS $FINALRESULTS"
fi
done
Using associative arrays in bash (Example)
-
The "too privileged to wear a mask" girl
I can't post this on Facebook because it has too many words in it that would trigger FB's censorship bots. Tonight, before going to the gym, I…
-
Apparently you can not say "dirty woman" on Facebook either
Taken from a friends FB violation, apparently you can not say "dirty woman" either or that will trigger the FB Censorship bots.
-
On Cancel Culture: Why hasn't Disney been canceled?
(( I'm writing this over here on LJ because it has too many "keywords" that could trigger the Censorship Bots over on Facebook. ))…
- Post a new comment
- 0 comments
- Post a new comment
- 0 comments