Skip to content

ankh2054/eosmonitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

EOS monitor

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.

Requirements

Setup instructions

1) Install python packages

pip3 install -r requirements.txt

2) Create folder and files

  • mkdir /etc/eosmonitor
  • copy config.ini --> /etc/eoskeeper/config.ini
  • copy eosmonitor.py --> /usr/local/bin/eosmonitor
  • chmod +x /usr/local/bin/eosmonitor

3) Update config.ini

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)

4) Create and register as service.

  • 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 

5) To test your service is running

Tail the parse_log_file as specified in your config.ini. The python process constiously logs to that file.

Additional config to think about

1) Configuring high-priority alerts

  • 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.

IMG_62E0230DB425-1

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages