Custom Alerts
A custom alert is an alert action for a custom event. Specify custom
for the value of category
.
The custom event is defined in a workflow. Instead of selecting from predefined events, specify the following properties the describe the event defined in the workflow.
Table 4-4 Custom Alert Properties
Property | Type | Description |
---|---|---|
|
String |
Optional. The severity of the event that precipitated the alert. Valid values are: Minor, Major, or Critical. |
|
String |
Required. A description of the event that precipitated the alert. |
|
String |
Optional. A description of the actions that will be performed by the system to mitigate the effects of this event. |
|
String |
Optional. A description of the effect that this event has on the appliance. |
|
String |
Optional. A description of the actions that the administrator should take to mitigate the effects of this event. |
Configure Authorizations to Create and Post Custom Alerts
To create custom alerts, the user must have the allow_configure
authorization in the alert
scope. To post custom alerts, the user must have the allow_post
authorization in the alert
scope. See table "Authorizations Required to Use Custom Alerts" in section Creating and Posting Custom Alerts from Within a Workflow in Oracle ZFS Storage Appliance Administration Guide, Release OS8.8.x.
Create a Custom Alert
Specify custom
for the value of category
, and set a value for at least the description
property from the properties table in Custom Alerts.
Example Request:
POST /api/alert/v1/actions Accept: application/json Content-Type: application/json {"category": "custom", "severity": "Minor", "description": "Custom alert description", "response": "What the system will do", "impact": "What happened to the appliance", "recommended_action": "What the administrator should do"}
Example Result:
Note the uuid
of the alert in the output. You will need this to
post the alert.
{
"actions": {
"href": "/api/alert/v1/actions/actions-004",
"category": "custom",
"severity": "Minor",
"description": "Custom alert description",
"response": "What the system will do",
"impact": "What happened to the appliance",
"recommended_action": "What the administrator should do",
"uuid": "custom-alert-uuid"
}
}
Modify this custom alert the same way you modify any other alert, as described in
Modify an Alert Action, adding or changing the
values of the severity
, description
,
response
, impact
, or
recommended_action
properties.
Specify a response to this custom alert the same way you specify a response to any other alert, as described in Specify a Response for an Event and Modify a Response for an Event.
Delete an alert response or a custom alert in the same way as for any other alert, as described in Delete a Response for an Event and Delete an Alert Action.
Post a Custom Alert
You must provide the UUID of the custom alert to post. The UUID is shown when you create the alert and when you list the alert. See Create a Custom Alert and List a Single Alert Action.
You can only post an alert that has a category
value of
custom
.
In addition to the UUID of the alert, you must specify any of the properties that are not specified in the alert and are listed in the properties table in Custom Alerts. Properties that are specified in the alert can be given new values when the alert is posted.
Example Request:
POST /api/alert/v1/postalert
Accept: application/json
Content-Type: application/json
{"uuid": "custom-alert-uuid"}
Example Result:
{
"uuid": "posted-alert-uuid"
}