Skip to content

Instantly share code, notes, and snippets.

@Validatrium
Last active August 22, 2022 06:01
Show Gist options
  • Save Validatrium/008ceb5b63d4d70e2c2cf3ae50d1700e to your computer and use it in GitHub Desktop.
Save Validatrium/008ceb5b63d4d70e2c2cf3ae50d1700e to your computer and use it in GitHub Desktop.
Setup monitoring for BitSong

BITSONG MONITORING

Links:

Notifications you will recieve with this config

  • free disk space is less than 20% and 10% - (low disk space notification)
  • height is not changing - (network connection error notification)
  • node proccess is not running - (node has been turned off)
  • node hasn't peers - (no peers - no sync. It's important)
  • validator isn't in active set - (to know if you're in jail)
  • RPC server is not running - (important to monitor parameters listed above)
  • API service is not running - (For future updates, by default it's not working. But you can turn it on)

Required:

  1. root account on server
  2. telegram bot token .You can follow this instruction
  3. Reciever chat_id. Follow this guide to get your telegram
# prerequires
apt install monit jq -y

# clone our repository: 
cd /root
git clone https://github.com/Validatrium/valmonit.git

# set your telegram.conf
cd $HOME/valmonit
cp telegram.conf.example telegram.conf
# enter your "telegram-id" and "bot-token"
nano telegram.conf

# verify that you can get notifications: 
./bin/sendtelegram -m "hi there!" -c ./telegram.conf

# by default it's monitor rpc-port/26657 and api-port/1317
# if you run on other ports you have to change it in: 
nano sh/cosmos-rpc.sh


# configure monit: 
# add bitsong configs to monit conf: 
echo "
include /root/valmonit/conf/bitsong-mainnet/*
include /root/valmonit/conf/system
include /root/valmonit/conf/default-cosmos-monitoring
" >> /etc/monit/monitrc

# if you need a web interface for your monitoring tool:
# but it's not actually required
cat <<EOF >> /etc/monit/monitrc
set httpd port 2812 and     # run on port 2812
  use      address 0.0.0.0  # run on internet interface 
  allow    * 		  	    # allow everyone connetc
  allow    admin:monit 	    # user:password pair
EOF

# restart monitoring tool 
systemctl restart monit

Tutorial created by Validatrium (more info on our projects at validatrium.com)

If you have any additional questions regarding this tutorial, please join BitSong Official Discord Channell and tag Validatrium members.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment