Skip to content

Commit

Permalink
Update storj-system-health.sh
Browse files Browse the repository at this point in the history
minor tweaks to onlineScore and download/upload warnings
  • Loading branch information
bjoerrrn authored May 9, 2023
1 parent d3e65f1 commit 00aa64a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions storj-system-health.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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 (
[];
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 00aa64a

Please sign in to comment.