X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FConfig%2FNix.git;a=blobdiff_plain;f=flakes%2Fprivate%2Fmonitoring%2Fplugins%2Fcheck_bandwidth;fp=modules%2Fprivate%2Fmonitoring%2Fplugins%2Fcheck_bandwidth;h=21d01f5aec193c668a6e864a16855df981a8f3e0;hp=53c5d85186d4c252df9bea0a80584dfa99bd8bea;hb=1a64deeb894dc95e2645a75771732c6cc53a79ad;hpb=fa25ffd4583cc362075cd5e1b4130f33306103f0 diff --git a/modules/private/monitoring/plugins/check_bandwidth b/flakes/private/monitoring/plugins/check_bandwidth similarity index 95% rename from modules/private/monitoring/plugins/check_bandwidth rename to flakes/private/monitoring/plugins/check_bandwidth index 53c5d85..21d01f5 100755 --- a/modules/private/monitoring/plugins/check_bandwidth +++ b/flakes/private/monitoring/plugins/check_bandwidth @@ -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;"