a quick and dirty way to monitor your xDai validator using a bash script and a telegram bot.

!/bin/bash
TELEGRAM_AUTH_TOKEN=auth_token
TELEGRAM_CHAT_ID=chat_id
curl_w() {
curl \
--retry 10 \
--retry-delay 0 \
--retry-max-time 120 \
--connect-timeout 0.5 \
--retry-connrefused \
-sf "$@"
}
send_message() {
curl_w -w "\n" -X POST "https://api.telegram.org/bot${TELEGRAM_AUTH_TOKEN}/sendMessage" \
-H 'Content-Type: application/json' \
-d "{\"chat_id\": \"${TELEGRAM_CHAT_ID}\", \"text\": \"${*}\", \"disable_notification\": false}"
}
while :; do
output=$(docker logs --since 3m openethereum 2>&1 | grep "New block")
if [ "${output}" == "" ]; then
send_message "No New block for the last 3m - check xdai Node"
sleep 60 & wait
fi
done

save the above as blocks.sh and chmod +x blocks.sh and than you run it ./blocks.sh [you can run it in screen ]

Don t forget to add your details for the telegram bot, or create one if you don t already have one, there are plenty of guides online for this.

ex: telegram-bot

TADA! you now have alerts if your node does not sign a block in 5 minutes.

shoutout to stakesystems for the help with the script.

quick and dirty way to monitor your xDai validator #2 for nethermind

July 8, 2021 | By claw |

a quick and dirty way to monitor your xDai nethermind validator using a bash script and a telegram bot. !/bin/bash TELEGRAM_AUTH_TOKEN=auth_token TELEGRAM_CHAT_ID=chat_id curl_w() { curl \ --retry 10 \ ...

Read more

How to easily delegate NEAR [ NEAR PROTOCOL ]! Works from web browser/mobile and ledger

December 27, 2020 | By claw |

The official wallet has built in staking capabilities. If you want to create a new account go to : https://wallet.near.org/create Choose a username, setup a recovery phrase, fund your wallet with...

Read more