createMaintenanceWindow
A MoogDb v2 method that creates a maintenance window, by passing an object containing the information. A maintenance window filters alerts caused by a known period of maintenance.
Back to MoogDb V2 API Method Reference.
Request arguments
Method createMaintenanceWindow
takes the following request arguments:
Name |
Type |
Required |
Description |
---|---|---|---|
|
Object |
Yes |
A map containing the following information. |
The object maintenanceWindowObj
contains the following information:
Name |
Type |
Required |
Description |
---|---|---|---|
|
String |
Yes |
Name of the maintenance window. |
|
String |
Yes |
Description of the maintenance window. |
|
String |
Yes |
An SQL-like or JSON filter that alerts must match to be included in the maintenance window. See Filter Search Data for more information on creating SQL-like filters. |
|
Number (Epoch) |
Yes |
Start time of the maintenance window. This must be in Unix epoch time and may be up to 5 years in the future. |
|
Number (Epoch) |
Yes |
Duration of the maintenance window in seconds. The minimum duration is 1 second and the maximum is 157784630 seconds (5 years). |
|
Boolean |
Yes |
Whether or not alerts should be forwarded to the next Moolet in the processing chain. |
|
Number |
No |
|
|
Number |
No |
Response
Method createMaintenanceWindow
returns the following response:
Type |
Description |
---|---|
Long |
ID of the new maintenance window, or null if an error occurred. |
Examples
The following examples demonstrate typical use of method createMaintenanceWindow
:
Request example
Example request to create a new maintenance window which recurs daily:
{ "name": "Phil", "description": "A description", "filter": "custom_info.eventDetails.alertGroup = Websphere AND source = my_source12345", "start_date_time": 1497971059, "duration": 360000, "forward_alerts": true, "recurring_period": 1, "recurring_period_units": 2 }