This combination of scripts monitors the services on an linux system, if a service is down it writes a log and sends a push notification via pushover (http://pushover.net). After all tests it flushes the mailq.
monitor_services.sh - Monitors the services and writes the log entry if one is down
bo.sh - small api implementation for pushover push notification service
monitor_services.cron - setup line for crontab
- Place both .sh files in the home directory of the root user
- allow root to execute them
- Also copy the content of the .cron file into your crontab
Now all is setup and the system will check every 10 minutes if the services are still up.
The log file is locate in /var/log/monitor_services.log