Public Class Methods |
| new () |
Member Function Documentation
Statusmon::Statusmon::abort |
( |
| ) |
|
Stop this status monitor.
This method is invoked by background() in order to signal the backgrounded process that it is not performing status monitoring any more.
Reimplemented in Statusmon::bs_evgen.
Statusmon::Statusmon::add_feature_provider |
( |
scalar |
feature | ) |
|
Register as a feature provider.
- Parameters
-
feature | The name of the feature. |
int Statusmon::Statusmon::background |
( |
| ) |
|
Start a background process.
Actually, this is more or less a frontend for fork(). In the child process, abort() is called.
- Returns
- The pid of the child process, 0 in the child process, -1 if backgrounding failed
Statusmon::Statusmon::event |
( |
hashref |
cmd | ) |
|
Statusmon objects get their event() method invoked each time an event of one of the register() registered types is seen.
param cmd The event.
list Statusmon::Statusmon::get_checks |
( |
scalar |
group | ) |
|
Return a list of defined checks for a host or group.
- Parameters
-
group | A host or group name |
- Returns
- A list of check names defined for this host/group, an empty list if the host/group is not known
Reimplemented in Statusmon::grouping.
int Statusmon::Statusmon::get_current_status |
( |
scalar |
check | ) |
|
Returns the status of a check.
- Parameters
-
check | A string in the form "host.item" identifying a check. |
- Returns
- The status code, undef if no status was found for this check.
scalar Statusmon::Statusmon::get_current_text |
( |
scalar |
check | ) |
|
Returns the current text of a check.
- Parameters
-
check | A string in the form "host.item" identifying a check. |
- Returns
- The text, undef if no status was found for this check.
Get a Statusmon::Statusmon object that registered as a feature provider for a specific feature.
- Parameters
-
feature | The name of the feature. |
- Returns
- The registered object providing the feature, undef if none was found.
list Statusmon::Statusmon::get_hosts |
( |
| ) |
|
Returns a list of known hosts/groups.
- Returns
- List of hosts/groups
int Statusmon::Statusmon::get_statuscode |
( |
scalar |
text | ) |
|
For a given status text return the corresponding status code.
- Parameters
-
- Returns
- The status code that is associated with the given text.
scalar Statusmon::Statusmon::get_statustext |
( |
int |
code | ) |
|
Get the text associated with a status code.
- Parameters
-
- Returns
- The status text (such as "red", "green", ...)
Statusmon::Statusmon::getarg |
( |
scalar |
name | ) |
|
Statusmon::Statusmon::init |
( |
| ) |
|
Statusmon::Statusmon::loopback |
( |
scalar |
cmd | ) |
|
Post a raw message and treat it like it was received from bbd.
- Parameters
-
Statusmon::Statusmon::new |
( |
| ) |
|
Statusmon::Statusmon::post_event |
( |
hashref |
cmd, |
|
|
hashref |
org_event |
|
) |
| |
Post an event and forward it to all interested parties.
- Parameters
-
cmd | The event to post |
org_event | (optional) If the event is posted as a reaction to another event the original event must be passed in this argument. |
Statusmon::Statusmon::register |
( |
list |
masks | ) |
|
Register for a list of events.
- Parameters
-
masks | A list of event types to register for. If an event type is prefixed with a '-' character, then the registration for this event type is removed. |
Statusmon::Statusmon::setarg |
( |
scalar |
name, |
|
|
scalar |
val |
|
) |
| |
Statusmon::Statusmon::start |
( |
| ) |
|
Reimplemented in Statusmon::RRDi, Statusmon::RRDs, Statusmon::bs_evgen, Statusmon::DBStore, Statusmon::DisplayCFG, Statusmon::Grapher, Statusmon::Rsync, Statusmon::Display, Statusmon::grouping, Statusmon::StatusTrap, Statusmon::BBLog, Statusmon::history, Statusmon::HTMLLog, Statusmon::TrackLast, and Statusmon::test.
The documentation for this class was generated from the following file: