Last active
October 9, 2023 16:47
-
-
Save anakuron/4db38a0bd63d77e6414896d06b92e5e5 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