-
-
Save bonelifer/98b1f954c5bc1b50fdd4140f6ffb6703 to your computer and use it in GitHub Desktop.
pushover memory alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
free=$(free -mt | grep Mem | awk '{print $4}') | |
if [[ "$free" -le 100 ]]; then | |
ntfy -b pushover -o user_key YOURKEY send 'memory is less than 100MB' | |
fi | |
exit 0 | |
#run every hour as root | |
# put it to /etc/crontab | |
#0 * * * * root /opt/scripts/free-watchdog.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment