- API >
- Public API Resources >
- Alert Configurations
Alert Configurations¶
On this page
An alert configuration defines the conditions that trigger an alert and the methods of notification.
Endpoints¶
Get All Alert Configurations in a Group¶
Get all alert configurations for a group.
Get an Alert Configuration¶
Get a single alert configuration by its ID.
Get All Open Alerts Triggered by an Alert Configuration¶
Get all open alerts that were triggered by an alert configuration.
Create an Alert Configuration¶
All fields are required except created
and updated
.
Update an 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 an Alert Configuration.
Enable or Disable an Alert Configuration¶
Use to enable/disable an alert configuration by setting the enabled
field.
Delete 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 |
string | The type of this alert configuration. Supports the same values as the
|
eventTypeName |
string | The type of event that will trigger an alert. The possible
values depend on the
|
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 |
string | 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 |
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.groupID |
string | ID of the group to which to send the notification. |
notifications.groupName |
string | Name of the group to which to send the 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 (161).
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 . |
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. |
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 as it appears in the “flow email address” setting in
Flowdock. For example: flowname@example.flowdock.com . |
notifications.flowdockApiToken |
string | The Flowdock “personal API token.” Only present for FLOWDOCK
notifications. |
notifications.serviceKey |
string | PagerDuty service key. Only present for PAGER_DUTY notifications. |
metricThreshold |
object | The threshold that will cause an alert to be triggered. Only present for
alerts of the HOST_METRIC . |
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 | The mode to use when computing the current metric value. Possible values are:
|
Links¶
Relation | Description |
---|---|
self |
Me |
http://mms.mongodb.com/group |
The group that owns this alert configuration. |
http://mms.mongodb.com/alerts |
Open alerts triggered by this alert configuration. |