- API >
- Public API Resources >
- Measurements and Alerts >
- Global Alert Configurations
Global Alert Configurations¶
On this page
The globalAlertConfigs
resource retrieves and updates alert
configurations for global
alerts.
Endpoints¶
Get All Global Alert Configurations¶
Get a Specific Global Alert Configuration¶
Get All Open Alerts Triggered by a Global Alert Configuration¶
Create a Global Alert Configuration¶
The following fields are required:
eventTypeName
notifications
forAllGroups
The metricThreshold
field is required if eventTypeName
is set to
OUTSIDE_METRIC_THRESHOLD
.
The threshold
field is required if eventTypeName
is set to either
of the following:
TOO_FEW_HEALTHY_MEMBERS
TOO_MANY_UNHEALTHY_MEMBERS
To enable the global alert configuration, set the enabled
field to
true
.
Important
If the enabled
field is not specified, Ops Manager sets its value to
false
by default, and the global alert configuration is not enabled.
Update a Global Alert Configuration¶
For most updates, you must use PUT
and send the entire entity. The only
exception is for updates to the enabled
field, as described in
Enable or Disable a Global Alert Configuration.
Enable or Disable a Global Alert Configuration¶
Use to enable/disable a global alert configuration by setting the enabled
field.
Delete a Global Alert Configuration¶
Sample Entity¶
The following is an example return document.
Entity Fields¶
Name | Type | Description |
---|---|---|
id |
string | A unique identifier for the global alert configuration. |
groupIds |
array of strings | The IDs of the groups the configuration applies to. This field applies
only if forAllGroups is set to false . |
created |
date | When the global alert configuration was created. |
enabled |
boolean | Specifies whether the global alert configuration is enabled. |
eventTypeName |
string | The type of event that will trigger an alert.
|
forAllGroups |
boolean | Selects whether the global alert configuration applies to all groups.
Also affects whether you can use the If you set this to If set to |
matchers |
array of objects | Rules to apply when matching an object against this global 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 |
array of objects | Notifications to send when an alert condition is detected. |
notifications.delayMin |
number | The number of minutes to wait after an alert condition is detected before sending out the first notification. |
notifications.intervalMin |
number | The number of minutes to wait between successive notifications for unacknowledged alerts that are not resolved. |
notifications.typeName |
string | The type of alert notification. Possible values are:
|
notifications.emailEnabled |
boolean | Specifies whether email notifications should be sent. Only present for
notifications of type GROUP and USER . |
notifications.smsEnabled |
boolean | Specifies whether SMS notifications should be sent. Only present for
notifications of type GROUP and USER . |
notifications.username |
string | The name of the Ops Manager user to whom to send notifications. 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 globalAlerts resource. For a list of
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 | 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:
|
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. |
tags |
array of strings | The alert configuration applies only to groups with all the specified tags. |
typeName |
string | This field is deprecated and will be ignored. |
updated |
date | When this global alert configuration was last updated. |
Links¶
Relation | Description |
---|---|
self |
Me |