Monitoring and alerting to your Discord server for your RaspberryPi
You will need to set up a Discord server and webhook, see how here. After that, proceed to install the package in your raspberry:
pip install raspimonitor
# raspimonitor YOURHOOKHERE THRESHOLD_TEMP_IN_CELSIUS
# Example
python -m raspimonitor http://your.web.hook.here 45
# Example temp as float:
python -m raspimonitor http://your.web.hook.here 45.6
Add your cron job as a script from above:
# 1. Open cron file
crontab -e
# 2. Add a cron
# Example - run every minute:
* * * * * python -m raspimonitor http://your.web.hook.here 45
# Example - run every 5 minutes
*/5 * * * * python -m raspimonitor http://your.web.hook.here 45
# 3. Reload cron service
sudo service cron reload
Ref. https://superuser.com/questions/232144/how-to-stop-a-currently-running-cron-job
Pull requests and issues are welcome.