From 00aa64ad9170caba52c237391a6c32cf26276ee3 Mon Sep 17 00:00:00 2001 From: bjoerrrn <91031217+bjoerrrn@users.noreply.github.com> Date: Tue, 9 May 2023 20:56:07 +0200 Subject: [PATCH] Update storj-system-health.sh minor tweaks to onlineScore and download/upload warnings --- storj-system-health.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/storj-system-health.sh b/storj-system-health.sh index eee3cc1..2c55047 100644 --- a/storj-system-health.sh +++ b/storj-system-health.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# v1.10.2 +# v1.10.3 # # storj-system-health.sh - storagenode health checks and notifications to discord / by email # by dusselmann, https://github.com/dusselmann/storj-system-health.sh @@ -355,7 +355,7 @@ satellite_scores=$(echo -E $(curl -s "$node_url/api/sno/satellites" | jq -r \ --argjson auditScore 0.98 \ --argjson suspensionScore 0.95 \ - --argjson onlineScore 0.95 \ + --argjson onlineScore 0.90 \ '.audits[] as $a | ($a.satelliteName | sub(":.*";"")) as $name | reduce ($ARGS.named|keys[]) as $key ( []; @@ -1022,7 +1022,7 @@ if [[ $gets_recent_hour -eq 0 ]] && [[ $puts_recent_hour -eq 0 ]]; then DLOG="$DLOG \n.. warning !! no get/put in last $LOGMINm" fi -if [[ $get_ratio_int -lt 60 ]] || [[ $put_ratio_int -lt 90 ]]; then +if [[ $get_ratio_int -lt 60 ]] || [[ $put_ratio_int -lt 60 ]]; then DLOG="$DLOG \n.. warning !! ↓ $get_ratio_int / ↑ $put_ratio_int low" fi @@ -1059,7 +1059,7 @@ if [[ "$DISCORDON" == "true" ]]; then if [ $tmp_fatal_errors -ne 0 -o $tmp_io_errors -ne $tmp_rest_of_errors -o \ $tmp_audits_failed -ne 0 -o $temp_severe_errors -ne 0 -o \ \( $get_repair_started -ne 0 -a $get_repair_ratio_int -lt 95 \) -o \ - $tmp_reps_failed -ne 0 -o $get_ratio_int -lt 60 -o $put_ratio_int -lt 90 -o \ + $tmp_reps_failed -ne 0 -o $get_ratio_int -lt 60 -o $put_ratio_int -lt 60 -o \ "$tmp_no_getput_1h" == "true" -o "$SENDPUSH" == "true" -o "$tmp_auditTimeLagsFilled" == "true" ]; then { ./discord.sh --webhook-url="$DISCORDURL" --username "health check" --text "$DLOG"; } 2>/dev/null