Skip to content
This repository has been archived by the owner on Jul 10, 2024. It is now read-only.

Commit

Permalink
fixed minor bug
Browse files Browse the repository at this point in the history
  • Loading branch information
LobbyLobster committed Apr 29, 2024
1 parent f94727a commit e24647e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions monocloud/monocloud-health.sh
Original file line number Diff line number Diff line change
Expand Up @@ -391,19 +391,19 @@ report_status() {
[[ "$overthreshold_disk" == "1" ]] && curl -fsSL -X POST -H "Content-Type: application/json" -d "$message" "$WEBHOOK_URL" || { echo "There's no alarm for Overthreshold (DISK) today..."; }
fi

if [[ -n $(echo "$systemstatus" | jq -r ". | select(.load | tonumber < $LOAD_LIMIT)") ]]; then
message="System load limit went below $LOAD_LIMIT Current: $(echo "$systemstatus" | jq -r '.load')%)"
if [[ -n $(echo $systemstatus | jq -r ". | select(.load | tonumber < $LOAD_LIMIT)") ]]; then
message="System load limit went below $LOAD_LIMIT (Current: $(echo $systemstatus | jq -r '.load')%)"
alarm_check_up "load" "$message" "system"
else
message="The system load limit has exceeded $LOAD_LIMIT Current: $(echo "$systemstatus" | jq -r '.load')%)"
message="The system load limit has exceeded $LOAD_LIMIT (Current: $(echo $systemstatus | jq -r '.load')%)"
alarm_check_down "load" "$message" "system"
fi

if [[ -n $(echo "$systemstatus" | jq -r ". | select(.ram | tonumber < $RAM_LIMIT)") ]]; then
message="RAM usage limit went below $RAM_LIMIT (Current: $(echo "$systemstatus" | jq -r '.ram')%)"
if [[ -n $(echo $systemstatus | jq -r ". | select(.ram | tonumber < $RAM_LIMIT)") ]]; then
message="RAM usage limit went below $RAM_LIMIT (Current: $(echo $systemstatus | jq -r '.ram')%)"
alarm_check_up "ram" "$message" "system"
else
message="RAM usage limit has exceeded $RAM_LIMIT (Current: $(echo "$systemstatus" | jq -r '.ram')%)"
message="RAM usage limit has exceeded $RAM_LIMIT (Current: $(echo $systemstatus | jq -r '.ram')%)"
alarm_check_down "ram" "$message" "system"
fi

Expand Down

0 comments on commit e24647e

Please sign in to comment.