Skip to content

Latest commit

 

History

History
174 lines (125 loc) · 5.11 KB

manual.md

File metadata and controls

174 lines (125 loc) · 5.11 KB

Tenderduty monitoring and alerting system guide for Regen validator + Telegram alert bot setup.

Please notice! This is just additional notification service which can NOT be taken as a main source of the Validator control!

In this guide Tenderduty run as a "build from source" binaries via systemd service. Also docker container and docker-compose available as an options. U can find original docs HERE for docker options.

If any commnets or issues U can contact me at Discord - AlexeyM#5409

Create new user (from root)

adduser tenderduty
usermod -aG sudo tenderduty
ssh tenderduty@localhost

Install dependencies

sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y && sudo apt install make clang pkg-config libssl-dev build-essential git jq llvm libudev-dev -y

Install GO

wget https://go.dev/dl/go1.19.linux-amd64.tar.gz \
&& sudo tar -xvf go1.19.linux-amd64.tar.gz \
&& sudo mv go /usr/local \
&& echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> ~/.bash_profile \
&& source ~/.bash_profile \
&& go version
rm go1.19.linux-amd64.tar.gz

Install binaries and setup config file

git clone https://github.com/blockpane/tenderduty.git
cd tenderduty
go install

Download config sample

wget -qO $HOME/config.yml https://github.com/AlexToTheMoon/AM-Solutions/raw/main/Tenderduty/regen/config.yml

Set your valoper address

Open file $HOME/config.yml find chains: paragraph, set your valoper address here : valoper_address: and save file.

valoper

Create system file and run Tenderduty

sudo tee /etc/systemd/system/tenderduty.service << EOF
[Unit]
Description=Tenderduty
After=network.target
ConditionPathExists=$(which tenderduty)

[Service]
Type=simple
Restart=always
RestartSec=5
TimeoutSec=180

User=$USER
WorkingDirectory=$HOME
ExecStart=$(which tenderduty)

# there may be a large number of network connections if a lot of chains
LimitNOFILE=infinity

# extra process isolation
NoNewPrivileges=true
ProtectSystem=strict
RestrictSUIDSGID=true
LockPersonality=true
PrivateUsers=true
PrivateDevices=true
PrivateTmp=true

[Install]
WantedBy=multi-user.target
EOF

Run service

sudo systemctl daemon-reload
sudo systemctl enable tenderduty
sudo systemctl start tenderduty

Check logs

sudo journalctl -u tenderduty -f -o cat

This is how the right logs supposed to look like

logs

Check dashboard

By default Tenderduty dashboard run at port 8888. Just open your browser and open dashboard by typing http://<SERVER_IP_HERE>:8888

Sample of right working dashboard
dsh


Telegram alert bot setup

Create your own group at Telegram where your bot will be sending alert notifications
Find @BotFather user at telegram and create your own Bot (use any available name) Use /newbot command

>>> PLEASE COPY HTTP API KEY AND SAVE <<<

bot

Add bot to your group and find out group ID

Find your bot by TG @username and add to your group

bot-gr1

Find out group ID

Find bot named @JsonViewBot and add to your group
Bot should join group, show your group ID and leave the group.

>>> PLEASE COPY GROUP ID AND SAVE <<<

gr-ad

id

Activate Telegram bot

Open file $HOME/config.yml find #telegram settings: paragraph, set some params we saved above:
enabled: yes
api_key: <YOUR_BOT_API_KEY>
channel: <YOUR_GROUP_ID>
Save changes.

tg-api-id

Last steps...

Restart tenderduty service

sudo systemctl restart tenderduty

NOTE : If after restart U will find logs like :
REGEN is configured for telegram alerts, but it is not enabled never mind, it doesn`t mean Telegram notification is not working.

Set up Your Telegram notification settings to receive notifications from created group!

Test service

Now we can stop Regen validator to miss >=5 blocks, and this what we expect to see when missing blocks and then when node back to normal state:

AT DASHBOARD

dash-miss

AT TELEGRAM

tg-alarm

Discord alert bot setup

Coming soon...

GOOD LUCK