[ Index ] |
PHP Cross Reference of Yamoon 0.9.0 |
[Source view] [Print]
(no description)
File Size: | 232 lines (8 kb) |
Included or required: | 1 time |
Referenced: | 0 times |
Includes or requires: | 4 files Yamoon/Service.php Yamoon/Company.php Yamoon/Config.php Yamoon/Host.php |
Probe($config, $id="") X-Ref |
Probe Constructor $probe = new Probe($config, $id); param $config Configuration class param $id When provided, grab all info for that probe |
create($company_id, $service, $host, $active='Y') X-Ref |
Create a new probe. Construct object first. $host->create($company->id, $service->id, $host->id, 'Y'); param $company_id The company this host is part param $service The service ID that will run on the host param $host The host ID param $active An active probe will run every time poller.php is called return $id Newly created host's ID |
run() X-Ref |
Run the probe, this is the main execution entry point. This method will call the execute() method, measuring the elapsed time and update the status of the probe, logging the last result for MRTG graphics construction. print $probe->run() see execute() see updateStatus() return $results A log line for integration with other tools or just debug |
execute() X-Ref |
Execute the probe. Set environment variables YM_HOST and YM_IP and call for "command code". Than, use the regular expressions to get the status (result, for up or down) and the current quality (quality). No example (do not use this function directly, call method run() instead) |
updateStatus() X-Ref |
Backup and update the current probe on the database using the current parameters. This function is used to keep the logs for MRTG graphics used on $probe->run() method. No example (do not use this function directly, call method run() instead) |
update() X-Ref |
Update the current probe on the database using the current parameters. $probe->active = "N"; $probe->update() |
delete() X-Ref |
Delete the current probe. $probe->delete(); |
clearLogs() X-Ref |
Clear all logs $probe->clearLogs(); |
getStats() X-Ref |
Get uptime status for this probe: last year, last month and last day. $data = $probe->getStatus(); return $data A hash with three fields: year, month and day status |
dump() X-Ref |
Dumper. $probe->dump(); |
Generated: Sat Feb 19 17:29:53 2005 | Cross-referenced by PHPXref 0.6 |