- API >
- Public API Resources >
- Measurements and Alerts >
- Alert Configurations >
- Get All Alert Configurations for a Project
Get All Alert Configurations for a Project¶
On this page
Note
Groups and projects are synonymous terms. Your {GROUP-ID}
is the
same as your project id. For existing groups, your group/project id
remains the same. This page uses the more familiar term group when
referring to descriptions. The endpoint remains as stated in the
document.
Base URL: https://{OPSMANAGER-HOST}:{PORT}/api/public/v1.0
Resource¶
Request Path Parameters¶
Parameter | Type | Description |
---|---|---|
GROUP-ID | string | (Required.) Unique identifier for the project. |
Request Query Parameters¶
This endpoint may use any of the HTTP request query parameters available to all Ops Manager API resources. These are all optional.
Name | Type | Description | Default |
---|---|---|---|
pageNum | integer | Page number (1-based). | 1 |
itemsPerPage | integer | Maximum number of items to return, up to a maximum of 100. | 100 |
pretty | boolean | Flag indicating whether the response body should be in a prettyprint format. | false |
envelope | boolean | Flag indicating whether or not to wrap the response in an envelope. Some API clients cannot access the HTTP response headers or
status code. To remediate this, set For endpoints that return a list of results, the |
false |
Request Body Parameters¶
This endpoint does not use HTTP request body parameters.
Response¶
Response Document¶
The response JSON document includes an array of result objects, an array of link objects and a count of the total number of result objects retrieved.
Name | Type | Description |
---|---|---|
results | object array | This array includes one object for each item detailed in the results Embedded Document section. |
links | object array | This array includes one or more links to sub-resources and/or related resources. The relations between URLs are explained in the Web Linking Specification. |
totalCount | number | The count of the total number of items in the result set. It may be greater than the number of objects in the results array if the entire result set is paginated. |
results Embedded Document¶
Each result is one alert configuration.
Note
Alert configurations vary. An alert configuration may only include a subset of these elements.
Name | Type | Description |
---|---|---|
id |
string | Unique identifier. |
groupId |
string | ID of the group that owns this alert configuration. |
eventTypeName |
string | The type of event that will trigger an alert.
|
typeName |
string | This field is deprecated and will be ignored. |
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. You can filter using the |
matchers.fieldName |
string | The name of the field in the target object to match on.
All other types of alerts do not support matchers. |
matchers.operator |
string | The operator to test the field’s value. Possible values are:
|
matchers.value |
string | The value to test with the specified operator. If
|
notifications |
object array | Notifications to send when an alert condition is detected. |
notifications.typeName |
string | The type of alert notification. Possible values are:
|
notifications.intervalMin |
number | The number of minutes to wait between successive notifications for unacknowledged alerts that are not resolved. |
notifications.delayMin |
number | The number of minutes to wait after an alert condition is detected before sending out the first notification. |
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 (162). Only present for SNMP notifications. Ops Manager
uses SNMP v2c. |
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 .
If the token later becomes invalid, Ops Manager sends an email to the group
owner and eventually removes the token. |
notifications.roomName |
string | HipChat room name. Only present for notifications of type HIP_CHAT . |
notifications.channelName |
string | The Slack channel name. Only present for SLACK notifications. |
notifications.apiToken |
string | The Slack API token or Bot token. Only present for SLACK notifications.
If the token later becomes invalid, Ops Manager sends an email to the group
owner and eventually removes the token. |
notifications.orgName |
string | The Flowdock organization name in lower-case letters. This is the
name that appears after www.flowdock.com/app/ in the URL
string. Only present for FLOWDOCK notifications. |
notifications.flowName |
string | The flow name, in lower-case letters. Only present for
|
notifications.flowdockApiToken |
string | The Flowdock “personal API token.” Only present for FLOWDOCK
notifications. If the token later becomes invalid, Ops Manager sends an email
to the group owner and eventually removes the token. |
notifications.serviceKey |
string | PagerDuty service key. Only present for PAGER_DUTY notifications.
If the key later becomes invalid, Ops Manager sends an email to the group
owner and eventually removes the key. |
metricThreshold |
object | The threshold that will cause an alert to be triggered. Only present
if eventTypeName is set to OUTSIDE_METRIC_THRESHOLD . |
metricThreshold.metricName |
string | The name of the metric to check. Supports the same values as the
metricName field of the alerts resource. |
metricThreshold.operator |
string | The operator to apply when checking the current metric value against the threshold value. Possible values are:
|
metricThreshold.threshold |
number | The threshold value outside of which an alert will be triggered. |
metricThreshold.units |
string | The units for the threshold value. Depends on the type of metric. For example, a metric that measures memory consumption would have a byte measurement, while a metric that measures time would have a time unit. Possible values are:
|
metricThreshold.mode |
string | This is set to AVERAGE and computes the current metric value as an average. |
threshold |
object | The threshold that will cause an alert to be triggered. Only present
if
|
threshold.operator |
string | The operator to apply when checking the current metric value against the threshold value.
|
threshold.threshold |
number | The threshold value outside of which an alert will be triggered. |