An extensible and configurable script to send some alerts (email and/or slack ATM) when a measurement in your InfluxDB database is reaching or falling below a defined threshold.
Tested on Python 2.7
and 3.6
.
This project uses Pipenv.
pipenv install
Alternatively, you can extract the dependencies from Pipfile
and install them via pip.
cp settings-example.cfg settings.cfg
Then edit this file to configure the script.
By default, the script will send email and slack alerts for load (> 1.5 on long term for 10min on average), RAM (< 500 Mb free for 10min on average) and disk space measurements (< 2 Gb free for 10min on average).
This tool is meant to be run via cron quite frequently (eg 10 min).
python monitor.py run
Specify a config file path.
python monitor.py run -c other-settings.cfg
Run with measurement output.
python monitor.py run --verbose
Send a test email.
python monitor.py test_email
Send a test slack message.
python monitor.py test_slack