Downtime Class Reference
Class Downtime.
More...
Detailed Description
Class Downtime.
Constructor & Destructor Documentation
Downtime::__construct |
( |
$ |
model |
) |
|
Provides helpers for working with scheduled downtime.
Downtime constructor.
- Parameters:
-
- Exceptions:
-
Reimplemented in RecurringDowntime.
Member Function Documentation
Downtime::dow_to_string |
( |
$ |
day_number |
) |
|
Converts day of week number to string, starting with sunday.
- Parameters:
-
- Returns:
- string day of week name
- Exceptions:
-
| Exception | UnexpectedValueException |
Downtime::get_command |
( |
$ |
obj_name, |
|
|
$ |
downtime_window, |
|
|
$ |
comment_prefix = 'AUTO: ' | |
|
) |
| | |
Converts command mappings to a Nagios-interpretable string format.
- Parameters:
-
| $obj_name | string |
| $downtime_window | array |
| $comment_prefix | string comment prefix |
- Returns:
- string Nagios external command
Downtime::get_command_mappings |
( |
$ |
obj_name, |
|
|
$ |
downtime_window, |
|
|
$ |
comment_prefix = '' | |
|
) |
| | |
Returns a formatted downtime command.
- Parameters:
-
| $obj_name | string |
| $downtime_window | array |
| $comment_prefix | string comment prefix |
- Returns:
- array command map
Downtime::get_month_occurrence |
( |
$ |
number |
) |
|
Returns the ordinal (or occurrence) for the given number.
- Parameters:
-
- Returns:
- string monthly occurrence (e.g. third)
- Exceptions:
-
| Exception | UnexpectedValueException |
Downtime::get_scheduled_end |
( |
|
) |
|
Downtime::get_scheduled_start |
( |
|
) |
|
Downtime::get_window |
( |
$ |
target_date |
) |
|
Create downtime window using the given $target_date, with the scheduled start and end time.
- Parameters:
-
- Returns:
- array
Field Documentation
Initial value: array(
'hosts' => 'SCHEDULE_HOST_DOWNTIME',
'services' => 'SCHEDULE_SVC_DOWNTIME',
'hostgroups' => 'SCHEDULE_HOSTGROUP_HOST_DOWNTIME',
'servicegroups' => 'SCHEDULE_SERVICEGROUP_SVC_DOWNTIME'
)
array
The documentation for this class was generated from the following file: