- API >
- Public API Resources >
- Measurements and Alerts >
- Global Alert Configurations >
- Update One Global Alert Configuration
Update One Global Alert Configuration¶
On this page
Update one global alert configuration identified by its
GLOBAL-ALERT-CONFIG-ID
.
Required Roles¶
You can successfully call this endpoint with any of the following assigned roles:
Request¶
Base URL: https://{OPSMANAGER-HOST}:{PORT}/api/public/v1.0
Request Path Parameters¶
Name | Type | Necessity | Description |
---|---|---|---|
{GLOBAL-ALERT-CONFIG-ID} |
string | Required | Unique identifier of the global alert configuration you want to update. |
Request Query Parameters¶
Name | Type | Necessity | Description | Default | ||||||
---|---|---|---|---|---|---|---|---|---|---|
pretty | boolean | Optional | Flag indicating whether the response body should be in a prettyprint format. | false |
||||||
envelope | boolean | Optional | Flag that indicates 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 envelope=true in the query. For endpoints that return one result, the response body includes:
|
false |
Request Body Parameters¶
Body Parameter | Type | Necessity | Description |
---|---|---|---|
enabled |
boolean | Optional | Toggle that specifies whether the alert configuration is enabled. |
eventTypeName |
string | Required | Type of event for which this alert configuration triggers an alert. To review the types of events that generate alerts, see Alert Types. For a complete list of events included in the Ops Manager audit log, see Audit Events. |
forAllGroups |
boolean | Required | Toggle that specifies whether the global alert configuration
applies to all groups. Also affects whether you can use the
If If |
groupIds |
array of strings | Optional | IDs of the groups to which this alert configuration applies.
This field applies only if forAllGroups is set to false . |
matchers |
array of objects | Conditional | Rules to apply when matching an object against this global alert configuration. Ops Manager only checks entities that match all these rules for an alert condition. You can filter using the |
matchers .fieldName |
string | Conditional | Name of the field in the target object on which to match.
All other types of alerts do not support matchers. |
matchers .operator |
string | Conditional | Operator to test the field’s value. Accepted values are:
|
matchers .value |
string | Conditional | Value to test with the specified operator. If
|
metricThreshold |
object | Conditional | Threshold that causes this alert configuration to trigger
an alert. Only required if eventTypeName is set to
OUTSIDE_METRIC_THRESHOLD . |
metricThreshold .metricName |
string | Conditional | Name of the metric to check. Supports the same values as the
metricName field of the globalAlerts resource. For a list
of possible values, see
Measurement Types for Global Alerts. |
metricThreshold .mode |
string | Conditional | This is set to AVERAGE and computes the current metric value
as an average. |
metricThreshold .operator |
string | Conditional | Operator to apply when checking the current metric value
against
|
metricThreshold .threshold |
number | Conditional | Threshold value outside of which this alert configuration triggers an alert. |
metricThreshold .units |
string | Conditional | Units for
|
notifications |
array of objects | Required | Notifications Ops Manager sends when it detects an alert that this alert configuration describes. |
notifications .apiToken |
string | Conditional | Slack API token or Bot token. Only accepted for SLACK
notifications. If the token later becomes invalid, Ops Manager sends an
email to the project owner and removes the token. |
notifications .channelName |
string | Conditional | Slack channel name. Only accepted for SLACK notifications. |
notifications .delayMin |
number | Conditional | Number of minutes to wait after an alert condition is detected before Ops Manager sends out the first notification. |
notifications .emailAddress |
Conditional | Optional | Email address to which to send notification. Only accepted for
EMAIL notifications. |
notifications .emailEnabled |
boolean | Conditional | Toggle specifying whether Ops Manager sends email notifications.
Only accepted for GROUP and USER notifications. |
notifications .flowdockApiToken |
string | Conditional | Flowdock personal API token. Only accepted for FLOWDOCK
notifications. If the token later becomes invalid, Ops Manager sends an
email to the project owner and removes the token. |
notifications .flowName |
string | Conditional | Flow name, in lower-case letters. Only accepted for
|
notifications .intervalMin |
number | Conditional | Number of minutes to wait between successive notifications for unacknowledged, unresolved alerts that this alert configuration triggers. |
notifications .notificationToken |
string | Conditional | HipChat API token. Only accepted for HIP_CHAT notifications.
If the token later becomes invalid, Ops Manager sends an email to the
project owner and removes the token. |
notifications .orgName |
string | Conditional | Flowdock organization name in lower-case letters. This is the
name that appears after www.flowdock.com/app/ in the URL
string. Only accepted for FLOWDOCK notifications. |
notifications .roomName |
string | Conditional | HipChat room name. Only accepted for HIP_CHAT notifications. |
notifications .serviceKey |
string | Conditional | PagerDuty integration key. Only accepted for Note PagerDuty decommissioned their REST API v1 key in October 2018. If you have a v1 key, you can continue to use that key with Ops Manager. All new PagerDuty keys use their REST API v2, but Ops Manager does not support their v2 keys. If you don’t have their REST API v1 key, use the PagerDuty Events API v1 instead. |
notifications .smsEnabled |
boolean | Conditional | Toggle specifying whether Ops Manager sends SMS notifications. Only
accepted for GROUP and USER notifications. |
notifications .snmpAddress |
string | Conditional | Hostname and port to send SNMP traps to. At this time Ops Manager can
send SNMP traps only to the standard SNMP port (162). Only
accepted for Note Ops Manager uses SNMP v2c. |
notifications .typeName |
string | Required | Type of alert notification this alert configuration triggers. Accepted values are:
|
notifications .username |
string | Conditional | Name of the Ops Manager user to whom to send notifications. Only
present for USER notifications. |
threshold |
object | Conditional | Threshold that causes this alert configuration to trigger
an alert. Only required if
|
threshold .operator |
string | Conditional | Operator to apply when checking the current metric value against
|
threshold .threshold |
number | Conditional | Threshold value outside of which this alert configuration triggers an alert. |
metricThreshold.units |
string | Conditional | Units for Example A metric that measures memory consumption has a byte measurement, while a metric that measures time has a time unit. Accepted values are:
|
tags |
array of strings | Optional | Tags associated with this alert configuration. |
typeName |
string | Optional | This field is deprecated and will be ignored. |
Response¶
Name | Type | Description |
---|---|---|
created |
string | Timestamp in ISO 8601 date and time format in UTC when the alert configuration was created. |
enabled |
boolean | Toggle that specifies whether the alert configuration is enabled. |
eventTypeName |
string | Type of event for which this alert configuration triggers an alert. To review the types of events that generate alerts, see Alert Types. For a complete list of events included in the Ops Manager audit log, see Audit Events. |
forAllGroups |
boolean | Toggle that specifies whether the global alert configuration
applies to all groups. Also affects whether you can use the
If If |
groupIds |
array of strings | IDs of the groups to which this alert configuration applies.
This field applies only if forAllGroups is set to false . |
id |
string | Unique identifier of the alert configuration. |
matchers |
array of objects | Rules to apply when matching an object against this global alert configuration. Ops Manager only checks entities that match all these rules for an alert condition. You can filter using the |
matchers.fieldName |
string | Name of the field in the target object on which to match.
All other types of alerts do not support matchers. |
matchers.operator |
string | Operator to test the field’s value. Possible values are:
|
matchers.value |
string | Value to test with the specified operator. If
|
metricThreshold |
object | Threshold that causes this alert configuration to trigger
an alert. Only present if eventTypeName is set to
OUTSIDE_METRIC_THRESHOLD . |
metricThreshold.metricName |
string | Name of the metric to check. Supports the same values as the
metricName field of the globalAlerts resource. For a list
of possible values, see
Measurement Types for Global Alerts. |
metricThreshold.mode |
string | This is set to AVERAGE and computes the current metric value
as an average. |
metricThreshold.operator |
string | Operator to apply when checking the current metric value
against
|
metricThreshold.threshold |
number | Threshold value outside of which this alert configuration triggers an alert. |
metricThreshold.units |
string | Units for Example A metric that measures memory consumption has a byte measurement, while a metric that measures time has a time unit. Possible values are:
|
notifications |
array of objects | Notifications Ops Manager sends when it detects an alert that this alert configuration describes. |
notifications.apiToken |
string | Slack API token or Bot token. Only present for SLACK
notifications. If the token later becomes invalid, Ops Manager sends an
email to the project owner and removes the token. |
notifications.channelName |
string | Slack channel name. Only present for SLACK notifications. |
notifications.delayMin |
number | Number of minutes to wait after an alert condition is detected before Ops Manager sends out the first notification. |
notifications.emailAddress |
string | Email address to which to send notification. Only present for
EMAIL notifications. |
notifications.emailEnabled |
boolean | Toggle specifying whether Ops Manager sends email notifications.
Only present for GROUP and USER notifications. |
notifications.flowdockApiToken |
string | Flowdock personal API token. Only present for FLOWDOCK
notifications. If the token later becomes invalid, Ops Manager sends an
email to the project owner and removes the token. |
notifications.flowName |
string | Flow name, in lower-case letters. Only present for
|
notifications.intervalMin |
number | Number of minutes to wait between successive notifications for unacknowledged, unresolved alerts that this alert configuration triggers. |
notifications.notificationToken |
string | HipChat API token. Only present for HIP_CHAT notifications.
If the token later becomes invalid, Ops Manager sends an email to the
project owner and removes the token. |
notifications.orgName |
string | 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.roomName |
string | HipChat room name. Only present for HIP_CHAT notifications. |
notifications.serviceKey |
string | PagerDuty integration key. Only present for PAGER_DUTY
notifications. If the key later becomes invalid, Ops Manager sends an
email to the project owner and removes the key. |
notifications.smsEnabled |
boolean | Toggle specifying whether Ops Manager sends SMS notifications. Only
present for GROUP and USER notifications. |
notifications.snmpAddress |
string | Hostname and port to send SNMP traps to. At this time Ops Manager can
send SNMP traps only to the standard SNMP port (162). Only
present for Note Ops Manager uses SNMP v2c. |
notifications.typeName |
string | Type of alert notification this alert configuration triggers. Possible values are:
|
notifications.username |
string | Name of the Ops Manager user to whom to send notifications. Only
present for USER notifications. |
threshold |
object | Threshold that causes this alert configuration to trigger
an alert. Only present if
|
threshold.operator |
string | Operator to apply when checking the current metric value against
|
threshold.threshold |
number | Threshold value outside of which this alert configuration triggers an alert. |
tags |
array of strings | Tags associated with this alert configuration. |
typeName |
string | This field is deprecated and will be ignored. |
updated |
string | Timestamp in ISO 8601 date and time format in UTC when this alert configuration was last updated. |