This URL is used to specify the parameters like start time, maximum alerts to store, etc. for scheduling alert pruning.
Resource URL
PUT /Maintenance/prunealerts
Request Parameters
Payload Request Parameters:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| Containing details required to schedule alert pruning | Object | Yes |
Details of AlertPruningForm:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| Whether alert pruning should be enabled | Boolean | Yes |
| Start time for alert pruning process | String | Yes |
| Maximum number of alerts that will be stored for dashboards | Number | Yes |
| Maximum number of alerts that will be stored for reports | Number | Yes |
| Maximum number of days for which the alert details will be stored | Number | Yes |
Response Parameters
Following fields are returned if the request parameters are correct, otherwise error details are returned.
Field Name | Description | Data Type |
|---|---|---|
| Set to 1 if the operation was successful | Number |
Example
Request
PUT https://<NSM_IP>/sdkapi/Maintenance/prunealerts
Payload
{
"enableAlertPruning":"true",
"pruningStartTime":"12:40",
"maxAlertsToStoreForDashboard":"10000",
"maxAlertsToStoreForReport":"10000",
"maxALertAgeForReport":"20"
}Response
{
"status": 1
}Error Information
Following error codes are returned by this URL:
No | HTTP Error Code | SDK API errorId | SDK API errorMessage |
|---|---|---|---|
1 | 400 | 9509 | Time should be in HH:MM (24 Hrs format), minutes should be multiple of 5 |
2 | 400 | 9510 | Number of alerts to store must be greater than or equal to 10000 |
3 | 400 | 9511 | Number of alerts to store for dashboard should not be greater than number of alerts to store for reports. |
4 | 400 | 9512 | Maximum alert age can't be greater than 999 days |