Skip to content

Commit

Permalink
feat(alerts): add network to alerts messages (#1782)
Browse files Browse the repository at this point in the history
  • Loading branch information
JuArce authored Feb 7, 2025
1 parent 101388a commit 214b579
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion alerts/balance_alerts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ do
fi
balance_alert=true
else
message="🟩 INFO: Wallet $WALLET_ADDRESS balance ($balance_eth ETH) is above $BALANCE_THRESHOLD ETH"
message="🟩 INFO: $WALLET_NAME ($NETWORK) Wallet $WALLET_ADDRESS balance ($balance_eth ETH) is above $BALANCE_THRESHOLD ETH"
printf "$message\n"
if [ "$balance_alert" = true ]; then
send_slack_message "$message"
Expand Down
12 changes: 8 additions & 4 deletions alerts/contract_alerts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ do
if [ -z "$new_batch_logs" ]; then
printf "No new batches logs found\n"
if [ "$no_new_batches_alert" = false ]; then
message="🚨 ALERT: No new batches in Service Manager since block $from_block"
message="🚨 $NETWORK ALERT: No new batches in Service Manager since block $from_block"
printf "$message\n"
send_slack_message "$message"
send_telegram_message "$message"
send_pagerduty_alert "$message"
Expand All @@ -50,7 +51,8 @@ do
else
printf "New batches logs found\n"
if [ "$no_new_batches_alert" = true ]; then
message="🟩 INFO: Batches creation resumed in Service Manager since block $from_block"
message="🟩 $NETWORK INFO: Batches creation resumed in Service Manager since block $from_block"
printf "$message\n"
send_slack_message "$message"
send_telegram_message "$message"
fi
Expand All @@ -61,7 +63,8 @@ do
if [ -z "$verified_batch_logs" ]; then
printf "No verified batches logs found\n"
if [ "$no_verified_batches_alert" = false ]; then
message="🚨 ALERT: No verified batches in Service Manager since block $from_block"
message="🚨 $NETWORK ALERT: No verified batches in Service Manager since block $from_block"
printf "$message\n"
send_slack_message "$message"
send_telegram_message "$message"
send_pagerduty_alert "$message"
Expand All @@ -70,7 +73,8 @@ do
else
printf "Verified batches logs found\n"
if [ "$no_verified_batches_alert" = true ]; then
message="🟩 INFO: Batches verification resumed in Service Manager since block $from_block"
message="🟩 $NETWORK INFO: Batches verification resumed in Service Manager since block $from_block"
printf "$message\n"
send_slack_message "$message"
send_telegram_message "$message"
fi
Expand Down

0 comments on commit 214b579

Please sign in to comment.