From 3009f24910516dcf87a2f6ae1b7bfd8d8e425149 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Fri, 17 Feb 2023 16:17:46 -0500 Subject: [PATCH] Fix typo in var and flip conditional --- node-daemon/monitoring/munin/pvc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/node-daemon/monitoring/munin/pvc b/node-daemon/monitoring/munin/pvc index a8be5ccc..59c277e9 100755 --- a/node-daemon/monitoring/munin/pvc +++ b/node-daemon/monitoring/munin/pvc @@ -123,7 +123,7 @@ output_values() { PVC_OUTPUT="$( $PVC_CMD )" HOST="$( hostname --short )" - in_maintenance="$( $JQ_CMD ".maintenance" <<<"${PVC_OUTPUT}" | tr -d '"' )" + is_maintenance="$( $JQ_CMD ".maintenance" <<<"${PVC_OUTPUT}" | tr -d '"' )" cluster_health="$( $JQ_CMD ".cluster_health.health" <<<"${PVC_OUTPUT}" | tr -d '"' )" cluster_health_messages="$( $JQ_CMD -r ".cluster_health.messages | @csv" <<<"${PVC_OUTPUT}" | tr -d '"' | sed 's/,/, /g' )" @@ -147,9 +147,9 @@ output_values() { echo "pvc_node_health.value ${node_health}" echo "pvc_node_health.extinfo ${node_health_messages}" - if [[ ${node_health} -le 50 && ${is_maintenance} == "false" ]]; then + if [[ ${node_health} -le 50 && ${is_maintenance} != "true" ]]; then node_health_alert=2 - elif [[ ${node_health} -le 90 && ${is_maintenance} == "false" ]]; then + elif [[ ${node_health} -le 90 && ${is_maintenance} != "true" ]]; then node_health_alert=1 else node_health_alert=0