By pulsifer on
Another installation / site management tip:
There is a free server monitoring service at http://uptime.openacs.org/uptime/
This service requires a web page that returns "success" if the server is up.
I created a module to do this, as follows:
File drupal/modules/uptime_test/uptime_test.info:
name = "uptime_test"
description = "Causes http://yoursite.com/uptime-test to returns 'success' to the uptime test at http://uptime.openacs.org"
File drupal/modules/uptime_test/uptime_test.module:
<?php
// uptime_test.module
function uptime_test_menu($may_cache) {
$items = array();
global $user;
if ($may_cache) {
$items[] = array('path' => 'uptime-test', 'title' => t('uptime test'), 'callback' => 'uptime_test_page', 'access' => TRUE, 'type' => MENU_CALLBACK);
}
return $items;
}
function uptime_test_page($args = NULL) {
drupal_set_title('Uptime Test');
print 'success';
exit();
}
?>
I then enabled the module, tested the URL http://mysite.com/uptime-test, then entered the URL into http://uptime.openacs.org. It now checks my server every 15 minutes and sends me an email if it's down.