Reputation: 25733
Are there any possibilities / options to set the notification when apache is down.
When apache is down, .htaccess file will work?
When the script running on the background in mid night, in the mid of the execution apache server is down / crash, can we set any notification.
Adding few steps for better understanding
step 1 program started step 2 variables initialized step 3 Read load file, get records from file step 4 insert above file contents into into table-x. step 5 close db connection
CRON doing above action every one hour.
After above step 3, APACHE crash / down, now i want to send notification to system admin through email. let me know step by step action plan.
Upvotes: 0
Views: 2671
Reputation: 37049
You can certainly whip up a script to check if Apache is down. However, I recommend using another server - perhaps a micro instance on AWS or something like that - that tries to wget your site. If it is able to access the site, great. Otherwise, it can send notification to you. Or you could use some services that can monitor whether your site appears up or not.
You could also use services such as AWS Route 53 to switch traffic to another standby server or a maintenance page hosted on another server indicating to users that your site is temporarily offline or something like that.
Upvotes: 3