Language: Chinese
A monitoring tool for Filecoin Saturn L1 node.
Python3
- Edit mail.py:
smtp_server = 'smtp.office365.com' # smtp server
smtp_port = 587 # smtp port
sender = '[email protected]' # user
password = '********' # password
receivers = ['your_receive_email1', 'your_receive_email2']
min_interval_minutes = 30 # minimum interval between notices
max_restart_count = 5 # maximum restart count in 3 minutes
If receivers
are not set, the email address in the environment variable NODE_OPERATOR_EMAIL
is used.
- Make it executable
chmod +x ./mail.py
- Test
Send a test email:
./mail.py test
- Setup the cron to run every 3 minutes:
crontab -e
Add the following text replacing the path:
*/3 * * * * /path/to/mail.py
MIT