]> git.immae.eu Git - perso/Immae/Config/Nix.git/commitdiff
Fix monitoring script
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Fri, 11 Mar 2022 00:08:18 +0000 (01:08 +0100)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Sun, 9 Apr 2023 15:16:18 +0000 (17:16 +0200)
modules/private/monitoring/plugins/check_bandwidth

index 53c5d85186d4c252df9bea0a80584dfa99bd8bea..21d01f5aec193c668a6e864a16855df981a8f3e0 100755 (executable)
@@ -110,8 +110,7 @@ avg_tx=$(bc <<< "scale=2;$sum_tx/$counter")
 
 
 if [ $(bc <<< "$avg_rx > $critical || $avg_tx > $critical") -eq 1 ]; then
-       echo "$interface CRITICAL - AVG_RX: $avg_rx kb/s,  AVG_TX:
-        $avg_tx kb/s | RX="$avg_rx"kbps;0;0;0; TX="$avg_tx"kbps;0;0;0;"
+       echo "$interface CRITICAL - AVG_RX: $avg_rx kb/s,  AVG_TX: $avg_tx kb/s | RX="$avg_rx"kbps;0;0;0; TX="$avg_tx"kbps;0;0;0;"
        exit $STATE_CRITICAL
 elif [ $(bc <<< "$avg_rx > $warning || $avg_tx > $warning") -eq 1 ]; then
        echo "$interface WARNING - AVG_RX: $avg_rx kb/s,  AVG_TX: $avg_tx kb/s | RX="$avg_rx"kbps;0;0;0; TX="$avg_tx"kbps;0;0;0;"