3 // check if database is workign - used by nagios checking - to see if server is really up.
5 require_once 'Pman.php';
7 class Pman_Core_Heartbeat extends Pman
14 function get($req, $opts = array())
22 $this->initErrorHandling();
24 if ($this->database_is_locked()) {
29 $cd = DB_DataObject::Factory('core_enum');
31 'etype' => 'heartbeat',
32 'name' => 'last_update'
35 $cd->display_name = date("Y-m-d H:i:s");
37 die("OK - HEARTBEAT WORKING");
41 if ( (time() - strtotime($cc->display_name)) < 30) {
42 die("OK - HEARTBEAT WORKING");
45 $cd->display_name = date("Y-m-d H:i:s");
47 die("OK - HEARTBEAT WORKING");
51 function onPearError($err)
56 function onException($err)