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 | 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. |
Schedule downtime.
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.
$id | ID of the downtime to delete |
static ScheduleDate_Model::determine_downtimetype | ( | $ | report_type = false |
) | [static, protected] |
Returns appropriate nagios command.
$report_type | string |
ScheduleDate_Model::edit_schedule | ( | $ | data, | |
&$ | id = false | |||
) |
Save/update a recurring schedule.
$data | array | |
$id | int |
static ScheduleDate_Model::schedule_downtime | ( | $ | timestamp = false |
) | [static] |
Schedule a recurring downtime if tomorrow matches any saved schedules.
$timestamp | int |
ScheduleDate_Model::$valid_fields [static] |
array( 'author', 'downtime_type', 'objects', 'comment', 'start_time', 'end_time', 'duration', 'fixed', 'weekdays', 'months' )
Fields that a schedule include.
These are all valid, and all required. Mostly public for test reasons.
ScheduleDate_Model::$valid_types [static] |
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.