cmd_test Class Reference
Execute a given command with asmonitor, and return the result.
More...
Public Member Functions |
| crash ($msg) |
| Print error and die.
|
| attach_object ($object) |
| Attach an object to the sandbox.
|
| cmdline ($type, $masquerade_user=true) |
| Ask the running nagios instance of the command line for a given object.
|
| runcmd ($type, $cmd_node=false) |
| Run a command in a sandbox.
|
Static Public Attributes |
static | $status |
| Service status names.
|
static | $host_status |
| Host status names.
|
Detailed Description
Execute a given command with asmonitor, and return the result.
Member Function Documentation
cmd_test::cmdline |
( |
$ |
type, |
|
|
$ |
masquerade_user = true | |
|
) |
| | |
Ask the running nagios instance of the command line for a given object.
- Parameters:
-
| $type | the type of the object to ask for |
| $masquerade_user | if the $USERn$ vars should be masqueraded |
- Returns:
- the command line to run
cmd_test::runcmd |
( |
$ |
type, |
|
|
$ |
cmd_node = false | |
|
) |
| | |
Run a command in a sandbox.
- Parameters:
-
| $type | the type of the object to ask for |
| $cmd_node | the node on which to run the command on if different from the current/local node. |
- Returns:
- the output of the plugin
Field Documentation
cmd_test::$host_status [static] |
Initial value: array(
0 => 'OK',
1 => 'DOWN',
2 => 'UNREACHABLE'
)
Host status names.
cmd_test::$status [static] |
Initial value: array(
0 => 'OK',
1 => 'WARNING',
2 => 'CRITICAL',
3 => 'UNKNOWN'
)
Service status names.
The documentation for this class was generated from the following file: