Monitors your EOS node process for certain conditions and sends to a logfile.
-
It will send a notification on the following conditions:
- if less than 12 blocks are produced.
- a Frok is decected
- a Unlikable block is detected
- a Dropped block is detected
- The amount of P2P connecstions to yuor node is less than 3
Current checks include:
- unlickable blocks
- number of P2P connections open
- number of produced blocks
- dropped block
- fork messages
Currently only pushover is suppported for notifications, but more can be added.
- Python3
- https://pushover.net account
pip3 install -r requirements.txt
- mkdir /etc/eosmonitor
- copy config.ini --> /etc/eoskeeper/config.ini
- copy eosmonitor.py --> /usr/local/bin/eosmonitor
- chmod +x /usr/local/bin/eosmonitor
The config file requires the following parameters:
- block_producer: Account name of your block producer to monitor for in the log files.
- eosio_log_file: Location of your eosio logfile.
- parse_log_file: Location of the eosmonitor logfile.
- http_port: Port of nodeos HTTP port
- pushover_app_key: Pushover APP key
- pushover_user_key: Pushover user key
- fork_msg = True or False (receive messages about forks)
- unlikblk = True or False (receive messages about unlinkable blocks)
- dropblk = True or False (receive messages about dropped blocks)
- produced_blocks = True or Flase (receive messages about missing blocks)
- mkdir -p /usr/lib/systemd/system
- Add the contents below to file --> /usr/lib/systemd/system/eosmonitor.service
[Unit]
Description=eosmonitor
StartLimitIntervalSec=400
StartLimitBurst=3
[Service]
User=charles
ExecStart=/bin/bash -c "/usr/local/bin/eosmonitor > /dev/null 2>&1"
Restart=always
RestartSec=90
[Install]
WantedBy=multi-user.target
- Create and start service
sudo systemctl enable eosmonitor.service
sudo systemctl start eosmonitor
Tail the parse_log_file as specified in your config.ini. The python process constiously logs to that file.
- The pushover app allows you to overide the Do Not Disturb mode on your phone.
- Within the python script you can set which alerts are considered high-priority.
- By default any missed blocks are set to high-priority
- This ensures that even when you slumper and have Do Not Disturb mode enabled you wil be alerted when your proucer misss blocks.
