Use a clearer protocol name

This commit is contained in:
Alarig Le Lay 2019-01-31 18:46:42 +01:00
parent de74f6b6e3
commit dc63fecbbd

View file

@ -69,15 +69,15 @@ done
test_route_limit() {
if [ "${ROUTE_HIT_IN}" != "" ]; then
printf "${protocol} has hit import route " >> \
printf "${protocol_name} has hit import route " >> \
${DIR}/CRITICAL.txt
printf "limit\n" >> ${DIR}/CRITICAL.txt
elif [ "${ROUTE_HIT_OUT}" != "" ]; then
printf "${protocol} has hit export route " >> \
printf "${protocol_name} has hit export route " >> \
${DIR}/CRITICAL.txt
printf "limit\n" >> ${DIR}/CRITICAL.txt
elif [ ${RATIO_IN} -gt 92 ]; then
printf "${protocol} import route limit is " >> \
printf "${protocol_name} import route limit is " >> \
${DIR}/WARNING.txt
printf "over threshold\n" >> ${DIR}/WARNING.txt
fi
@ -127,11 +127,11 @@ for protocol in $(find ${DIR} -type f); do
test_route_limit
;;
OpenSent | OpenConfirm)
printf "${protocol} is in ${STATE} state\n" >> \
printf "${protocol_name} is in ${STATE} state\n" >> \
${DIR}/WARNING.txt
;;
Idle | Connect | Active)
printf "CRITICAL: ${protocol} is in ${STATE} state\n" \
printf "${protocol_name} is in ${STATE} state\n" \
>> ${DIR}/CRITICAL.txt
;;
@ -141,7 +141,7 @@ for protocol in $(find ${DIR} -type f); do
test_route_limit
;;
Alone)
printf "${protocol} is in ${STATE} state\n" >> \
printf "${protocol_name} is in ${STATE} state\n" >> \
${DIR}/WARNING.txt
exit 1
;;
@ -154,7 +154,7 @@ for protocol in $(find ${DIR} -type f); do
else
printf "Unknown state ${STATE} for " >> \
${DIR}/UNKNOWN.txt
printf "${protocol}\n" >> ${DIR}/UNKNOWN.txt
printf "${protocol_name}\n" >> ${DIR}/UNKNOWN.txt
fi
;;
esac