Simple script to send email alert to node operator, when the node exceed the specified error percentage limit.
- Configured ssmtp server
- Crontab installed
When running the setup you need to have permission to:
- docker logs
- crontab
$ git clone https://github.com/tachyontec/storjMailAlert
$ cd storjMailAlert
$ chmod +x setup.sh
$ sudo ./setup.sh
-
Only needs to be run first time downloading the repo but it can also be run to update our parameteres
Creates the command storjMailAlert and
Runs addCron
-
Takes update interval as $1
It creates a crontab task to excecute storjMailAlert every $1 minutes
-
aka main script
Creates a directory in which it runs the checks and saves output in a logs file
By default it doesn't delete logs but you can uncomment the last line
OR manually find and delete them at ~/storjAlerts
+Note that this script will be using the directory ~storjAlerts where it will be saving outputs
If you don't want to save any output uncomment last line on the main script (storjMailAlert)