Today I got notified by @pfunk and @clayop (thanks!) that my pricefeed had not been updated in a while. This was the second time in a short period that the pricefeed update script had crashed and it had slipped my mind. Not good.
Learning more Python I wanted to give it a shot to create a basic monitor script which notifies me whenever I had not updated my pricefeed in a while (configurable - and therefore most probably there must be some error).
Additionally as @gtg recently also noticed, quite some public seednodes had been down and it seemed some witnesses had not noticed that, so I also added basic seednode timeout check too, by utilising Telnet lib inside python.
By using the Telegram API the basic monitor script notifies whenever:
- Your pricefeed has not been updated in a X period of hours
- Your public seednode is unresponsive / timeout or another error
Setup is pretty straightforward:
- Copy witnesshealthcheck.py over to a server with interwebs and Piston.steem
- Fill out the
telegram_idvariables as well as your
- Test the script for example with a very low value for
pricefeed_updatetreshold(it should notify immediately if you put it to
- Put the script inside a regular called (e.g. every 2/4 hours) cronjob.
* image source: http://medicalfuturist.com
- Open for pull requests!
- Any additional vital signs this witness script should check for? Leave your comments!