Skip to content

Simple script to send email to Node Operator, when the node have issues

Notifications You must be signed in to change notification settings

tachyontec/storjMailAlert

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

storjMailAlert

Simple script to send email alert to node operator, when the node exceed the specified error percentage limit.

Requirements

  1. Configured ssmtp server
  2. Crontab installed

Permissions

When running the setup you need to have permission to:

  1. docker logs
  2. crontab

Installation and setup

First you need to clone the repository and move into the folder.

$ git clone https://github.com/tachyontec/storjMailAlert
$ cd storjMailAlert

Then we will need to make the setup script excecutable and run it

$ chmod +x setup.sh
$ sudo ./setup.sh

Scripts to be used

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

  2. addCron

    Takes update interval as $1

    It creates a crontab task to excecute storjMailAlert every $1 minutes

  3. storjMailAlert

    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)

About

Simple script to send email to Node Operator, when the node have issues

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages