- API >
- Public API Resources >
- Measurements and Alerts >
- Alert Configurations >
- Enable/Disable Alert Configuration
Enable/Disable Alert Configuration¶
On this page
Note
Groups and projects are synonymous terms. Your {PROJECT-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¶
Note
This endpoint updates the only the enabled/disabled state for the alert configuration. To update more than just this configuration, see Update an Alert Configuration.
Request Path Parameters¶
All request path parameters are required.
Parameter | Type | Description |
---|---|---|
PROJECT-ID | string | Unique identifier for this Project. |
ALERT-CONFIG-ID | string | Unique identifier for this alert configuration. |
Request Query Parameters¶
The following query parameters are optional:
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¶
All request body parameters are required.
Parameter | Type | Description |
---|---|---|
enabled | boolean | Specify true to enable; false to disable. |
Response¶
Note
Alert configurations vary. An alert configuration may only include a subset of these elements.
Name | Type | Description |
---|---|---|
created | string | Timestamp in ISO 8601 date and time format in UTC when this alert configuration was created. |
enabled | boolean | Flag indicating this alert configuration enabled. |
eventTypeName | string | Type of event that triggers an alert. Values include: Agent
Automation Configuration Backup
BI Connector
Cluster
Data Explorer Accessed Host
Organization
Project
Replica Set
Team
User
To review the full list of events that generate alerts and their descriptions, see Alert Types. For a complete list of events included in the Ops Manager audit log, see Audit Events. |
groupId | string | Unique identifier of the Project that owns this alert configuration. |
id | string | Unique identifier for this alert configuration. |
matchers.fieldName | string | Name of the field in the target object to match on.
All other types of alerts do not support matchers. |
matchers.operator | string | Operator to test the field’s value. Accepted values are:
|
matchers.value | string | Value to test with the specified operator. If
|
matchers | object array | Rules to apply when matching an object against this alert configuration. Only entities that match all these rules are checked for an alert condition. You can filter using the |
metricThreshold.metricName | string | Name of the metric to check. Supports the same values as the metricName field of the alerts resource. |
metricThreshold.mode | string | Average value of this metric. |
metricThreshold.operator | string | Operator to apply when checking the current metric value against the threshold value. Accepted values are:
|
metricThreshold.threshold | number | Threshold value outside of which an alert is triggered. |
metricThreshold.units | string | Units for the threshold value. Depends on the type of metric. Example A metric that measures memory consumption would have a byte measurement, while a metric that measures time would have a time unit. Accepted values are:
|
metricThreshold | object | Threshold that will cause an alert to be triggered.
Populated if "eventTypeName" :
"OUTSIDE_METRIC_THRESHOLD" . |
notifications.apiToken | string | Slack API token or Bot token. Populated for SLACK
notifications. If the token later becomes invalid, Ops Manager
sends an email to the Project owner and eventually removes
the token. |
notifications.channelName | string | Slack channel name. Populated for SLACK notifications. |
notifications.datadogApiKey | string | DataDog API Key. Found in the DataDog dashboard. Populated
for DATADOG notifications. |
notifications.delayMin | number | Number of minutes to wait after an alert condition is detected before sending out the first notification. |
notifications.emailAddress | string | Email address to which to send notification. Populated for
EMAIL notifications. |
notifications.emailEnabled | boolean | Flag indicating email notifications must be sent. Populated
for ORG , GROUP , and USER notifications. |
notifications.flowdockApiToken | string | Flowdock “personal API token.” Populated for
FLOWDOCK notifications. If the token later becomes
invalid, Ops Manager sends an email to the Project owner and
eventually removes the token. |
notifications.flowName | string | Flow name, in lower-case letters. Populated for
FLOWDOCK notifications. The flow name appears after the
organization name in the URL string:
www.flowdock.com/app/<organization-name>/<flow-name> . |
notifications.intervalMin | number | Number of minutes to wait between successive notifications for unacknowledged alerts that are not resolved. |
notifications.notificationToken | string | HipChat API token. Populated for HIP_CHAT notifications.
If the token later becomes invalid, Ops Manager sends an email to
the Project owner and eventually 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. Populated for FLOWDOCK notifications. |
notifications.role | string | Ops Manager role in current Project. Populated for GROUP
notifications. |
notifications.roomName | string | HipChat room name. Populated for HIP_CHAT notifications. |
notifications.serviceKey | string | PagerDuty integration key. Populated for PAGER_DUTY
notifications. If the key later becomes invalid, Ops Manager sends
an email to the Project owner and eventually removes the key. |
notifications.smsEnabled | boolean | Flag indicating SMS notifications must be sent. Populated
for ORG , GROUP , and USER notifications. |
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). Populated for SNMP notifications.
Ops Manager uses SNMP v2c. |
notifications.typeName | string | Type of alert notification. Accepted values are:
|
notifications.username | string | Name of an Ops Manager user to which to send notifications. Only
a user in the Project that owns the alert configuration is
allowed here. Populated for USER notifications. |
notifications | object array | Notifications to send when an alert condition is detected. |
threshold.operator | string | Operator to apply when checking the current metric value against the threshold value.
|
threshold.threshold | number | Threshold value outside of which an alert is triggered. |
threshold | object | Threshold that will cause an alert to be triggered. Populated if
|
typeName | string | This field is deprecated and are ignored. |
updated | string | Timestamp in ISO 8601 date and time format in UTC when this alert configuration was last updated. |