- API >
- Public API Resources >
- Alert Configurations
Alert Configurations¶
On this page
Operations¶
- Get a single alert configuration by ID.
- Get all alert configurations for a group.
- Get all open alerts that were triggered by an alert configuration.
- Create a new alert configuration. All fields are required except
created
andupdated
.
- Update an existing alert configuration. Partial updates are not
supported except for one field (see
PATCH
below), so you must send the entire entity.
- Use to enable/disable an alert configuration by setting the
enabled
field.
- Remove an alert configuration.
Sample Entity¶
Entity Fields¶
Name | Type | Description |
---|---|---|
id | string | Unique identifier. |
groupId | string | ID of the group that owns this alert configuration. |
typeName | enum | The type of this alert configuration. Supports the same values as the
typeName field of the alerts resource. |
eventTypeName | enum | The type of event that will trigger an alert. Supports the same values as
the eventTypeName field of the alerts resource. |
created | date | When this alert configuration was created. |
updated | date | When this alert configuration was last updated. |
enabled | boolean | Is this alert configuration enabled? |
matchers | object array | Rules to apply when matching an object against this alert configuration. Only entities that match all these rules will be checked for an alert condition. |
matchers.fieldName | string | The name of the field in the target object to match on. The available
fields depend on the
|
matchers.operator | enum | The operator to test the field’s value. Possible values are:
|
matchers.value | string | The value to test with the specified operator. When matching on the
|
notifications | object array | Notifications to send when an alert condition is detected. |
notifications.typeName | enum | The type of alert notification. Possible values are:
|
notifications.delayMin | integer | The number of minutes to wait after an alert condition is detected before sending out the first notification. |
notifications.intervalMin | integer | The number of minutes to wait between successive notifications for unacknowledged alerts that are not resolved. |
notifications.emailAddress | string | The email address to which to send notification. Only present for
notifications of type EMAIL . |
notifications.notificationToken | string | A HipChat API token. Only present for notifications of type HIP_CHAT . |
notifications.roomName | string | HipChat room name. Only present for notifications of type HIP_CHAT . |
notifications.emailEnabled | boolean | Should email notifications be sent? Only present for notifications of type
GROUP and USER . |
notifications.smsEnabled | boolean | Should SMS notifications be sent? Only present for notifications of type
GROUP and USER . |
notifications.username | string | The name of an Ops Manager user to which to send notifications. Only a user in the
group that owns the alert configuration is allowed here. Only present for
notifications of type USER . |
notifications.snmpAddress | string | Hostname and port to send SNMP traps to. At this time Ops Manager is
only able to send SNMP traps to the standard SNMP port (161).
Only present for SNMP notifications. Ops Manager uses SNMP v2c. |
notifications.emailAddress | string | Mobile number to send SMS messages to. Only present for notifications of
type SMS . |
notifications.snmpAddress | string | Hostname and port to send SNMP traps to. Note that SNMP is only supported for Ops Manager; also, at this time Ops Manager is only able to send SNMP traps to the standard SNMP port (161). |
notifications.serviceKey | string | PagerDuty service key. |
metricThreshold | object | The threshold that will cause an alert to be triggered. Only present for
alerts of the HOST_METRIC . |
metricThreshold.metricName | enum | The name of the metric to check. Supports the same values as the
metricName field of the alerts resource. |
metricThreshold.operator | enum | The operator to apply when checking the current metric value against the threshold value. Possible values are:
|
metricThreshold.threshold | integer | The threshold value outside of which an alert will be triggered. |
metricThreshold.units | enum | The units for the threshold value. Supports the same values as the
currentValue.units field of the alerts resource. |
metricThreshold.mode | enum | The mode to use when computing the current metric value. Possible values are:
|
Links¶
Relation | Description |
---|---|
self | Me |
group | The group that owns this alert configuration. |
alerts | Open alerts triggered by this alert configuration. |