There are currently 2 add-ons that work with Pushover and XenForo, but Pushover itself supports various different languages.
Pushover: Simple Notifications for Android, iOS, and Desktop
So, I wrote my own little bash script to use their API to monitor the key services on my server, and alert me if they go down.
First, create a list of the processes running
Then, the bash script:
This then sends the alert out to my phone, makes it RED, and bypass the "quiet time" settings.
Pushover: Simple Notifications for Android, iOS, and Desktop
So, I wrote my own little bash script to use their API to monitor the key services on my server, and alert me if they go down.
First, create a list of the processes running
Code:
/usr/local/sbin/nginx
/usr/sbin/mysqld
/usr/local/etc/php-fpm.conf
/usr/local/bin/memcached
/usr/bin/java
Then, the bash script:
Bash:
#!/bin/bash
echo "Checking all processes are running....";
for i in `/bin/cat /root/scripts/process_list.txt`
do
if
[ $(ps aux | grep -e "$i" | grep -v grep | wc -l | tr -s "\n") -eq 0 ];
then
printf "$i is down.....oh dear!!!\n";
curl -s \
-F "token=YOURAPITOKEN" \
-F "user=YOURDEVICEID" \
-F "message=$i is down.....oh dear!!!" \
-F "priority=1"\
https://api.pushover.net/1/messages.json
else
printf "$i running\n";
fi
done
- Requirements
- Pushover Account along with the Pushover App