From dc63fecbbdaa175f94fc4aa818df11c256c5d0bb Mon Sep 17 00:00:00 2001 From: alarig Date: Thu, 31 Jan 2019 18:46:42 +0100 Subject: [PATCH] Use a clearer protocol name --- check_bird2_oneshot | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/check_bird2_oneshot b/check_bird2_oneshot index 5489e96..f303e39 100755 --- a/check_bird2_oneshot +++ b/check_bird2_oneshot @@ -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