ScheduleDate_Model Class Reference
Schedule downtime.
More...
Public Member Functions |
| edit_schedule ($data, &$id=false) |
| Save/update a recurring schedule.
|
| delete_schedule ($id) |
| Delete a scheduled recurring downtime.
|
Static Public Member Functions |
static | schedule_downtime ($timestamp=false) |
| Schedule a recurring downtime if tomorrow matches any saved schedules.
|
static | insert_downtimes ($objects, $object_type, $start_time, $end_time, $start_date, $end_date, $fixed, $duration, $comment) |
| Schedule a downtime by submitting it to nagios.
|
static | time_to_seconds ($time) |
| Given a time-like string (hh[:mm[:ss]]), return the number of seconds involved.
|
Static Public Attributes |
static | $valid_fields |
| Fields that a schedule include.
|
static | $valid_types |
| A list of valid schedule types - same format (no underscore, trailing s) as in report options.
|
Static Protected Member Functions |
static | check_if_scheduled ($type, $name, $start_time, $end_time, $is_fixed) |
| Use a reasonable amount of indicators to determine whether there's already a matching downtime.
|
static | determine_downtimetype ($report_type=false) |
| Returns appropriate nagios command.
|
Detailed Description
Schedule downtime.
Member Function Documentation
static ScheduleDate_Model::check_if_scheduled |
( |
$ |
type, |
|
|
$ |
name, |
|
|
$ |
start_time, |
|
|
$ |
end_time, |
|
|
$ |
is_fixed | |
|
) |
| | [static, protected] |
Use a reasonable amount of indicators to determine whether there's already a matching downtime.
This prevents downtimes from being scheduled more than once.
ScheduleDate_Model::delete_schedule |
( |
$ |
id |
) |
|
Delete a scheduled recurring downtime.
- Parameters:
-
| $id | ID of the downtime to delete |
- Returns:
- true on success, false otherwise
static ScheduleDate_Model::determine_downtimetype |
( |
$ |
report_type = false |
) |
[static, protected] |
Returns appropriate nagios command.
- Parameters:
-
- Returns:
- string
ScheduleDate_Model::edit_schedule |
( |
$ |
data, |
|
|
&$ |
id = false | |
|
) |
| | |
Save/update a recurring schedule.
- Parameters:
-
- Exceptions:
-
static ScheduleDate_Model::insert_downtimes |
( |
$ |
objects, |
|
|
$ |
object_type, |
|
|
$ |
start_time, |
|
|
$ |
end_time, |
|
|
$ |
start_date, |
|
|
$ |
end_date, |
|
|
$ |
fixed, |
|
|
$ |
duration, |
|
|
$ |
comment | |
|
) |
| | [static] |
Schedule a downtime by submitting it to nagios.
- Parameters:
-
| $objects | array |
| $object_type | string |
| $start_time | string |
| $end_time | string |
| $start_date | string |
| $end_date | string |
| $fixed | string |
| $duration | string |
| $comment | string |
- Returns:
- boolean
static ScheduleDate_Model::schedule_downtime |
( |
$ |
timestamp = false |
) |
[static] |
Schedule a recurring downtime if tomorrow matches any saved schedules.
- Parameters:
-
- Returns:
- boolean
Field Documentation
ScheduleDate_Model::$valid_fields [static] |
Initial value: array(
'author',
'downtime_type',
'objects',
'comment',
'start_time',
'end_time',
'duration',
'fixed',
'weekdays',
'months',
'start_date',
'end_date',
'recurrence',
'recurrence_on',
'recurrence_ends',
'exclude_days'
)
Fields that a schedule include.
These are all valid, and all required. Mostly public for test reasons.
ScheduleDate_Model::$valid_types [static] |
Initial value: array(
'hosts',
'services',
'hostgroups',
'servicegroups'
)
A list of valid schedule types - same format (no underscore, trailing s) as in report options.
Mostly public for test reasons.
The documentation for this class was generated from the following file: