Current_status_Model Class Reference
Retrieves and manipulates current status of hosts (and services?).
More...
Public Member Functions |
| program_status () |
| Fetch current host status from db for current user.
|
| host_status () |
| Fetch current host status from db for current user.
|
| service_status () |
| Fetch and calculate status for all services for current user.
|
| analyze_status_data () |
| Analyze all status data for hosts and services Calls
|
| get_available_states ($what='host') |
| List available states for host or service.
|
Static Public Member Functions |
static | instance () |
| Use this class as a singleton, as it is quite slow.
|
static | status_text ($db_status, $db_checked, $type='host') |
| Translates a given status from db to a readable string.
|
Data Fields |
const | HOST_UP = 0 |
| Nagios' host up code.
|
const | HOST_DOWN = 1 |
| Nagios' host down code.
|
const | HOST_UNREACHABLE = 2 |
| Nagios' host unreachable code.
|
const | HOST_PENDING = 6 |
| Our magical "host pending" code for unchecked hosts.
|
const | SERVICE_OK = 0 |
| Nagios' service ok code.
|
const | SERVICE_WARNING = 1 |
| Nagios' service warning code.
|
const | SERVICE_CRITICAL = 2 |
| Nagios' service critical code.
|
const | SERVICE_UNKNOWN = 3 |
| Nagios' service unknown code.
|
const | SERVICE_PENDING = 6 |
| Our magical "service pending" code for unchecked services.
|
const | HOST_CHECK_ACTIVE = 0 |
| Nagios performed the host check.
|
const | HOST_CHECK_PASSIVE = 1 |
| the host check result was submitted by an external source
|
const | SERVICE_CHECK_ACTIVE = 0 |
| Nagios performed the service check.
|
const | SERVICE_CHECK_PASSIVE = 1 |
| the service check result was submitted by an external source
|
Detailed Description
Retrieves and manipulates current status of hosts (and services?).
Member Function Documentation
Current_status_Model::analyze_status_data |
( |
|
) |
|
Analyze all status data for hosts and services Calls
- Returns:
- bool
Current_status_Model::get_available_states |
( |
$ |
what = 'host' |
) |
|
List available states for host or service.
- Parameters:
-
| $what | string 'host' (or 'service') |
- Returns:
- array
Current_status_Model::host_status |
( |
|
) |
|
Fetch current host status from db for current user.
- Returns:
- bool indicating whether query worked
static Current_status_Model::instance |
( |
|
) |
[static] |
Current_status_Model::program_status |
( |
|
) |
|
Fetch current host status from db for current user.
- Returns:
- bool indicating whether query worked
Current_status_Model::service_status |
( |
|
) |
|
Fetch and calculate status for all services for current user.
- Returns:
- bool indicating whether query worked
static Current_status_Model::status_text |
( |
$ |
db_status, |
|
|
$ |
db_checked, |
|
|
$ |
type = 'host' | |
|
) |
| | [static] |
Translates a given status from db to a readable string.
- Parameters:
-
| $db_status | int |
| $db_checked | boolean |
| $type | string = host |
- Returns:
- string
The documentation for this class was generated from the following file: