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
1 changed files with 7 additions and 7 deletions

View File

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