- API >
- Public API Resources >
- Measurements and Alerts >
- Global Alerts
Global Alerts¶
On this page
The globalAlerts
resource allows you to retrieve and acknowledge alerts
that have been triggered by a global alert configuration. You must have the
Global Monitoring Admin to use this
resource.
Alert Status¶
When Ops Manager detects an alert condition, it opens an alert. If the global alert
configuration contains no notification delay, the alert status goes
immediately to OPEN
. If the configuration contains a delay, Ops Manager sets
the alert to TRACKING
until the delay period ends, after which Ops Manager
sets the alert to OPEN
if the condition persists.
If the global alert configuration has multiple notifications, each with its own
notification delay, Ops Manager uses the smallest delay value to determine when to
move an alert from TRACKING
to OPEN
.
Endpoints¶
Get All Global Alerts¶
To specify alert status, use the status
query parameter with one of the
following values:
TRACKING
OPEN
CLOSED
The status
parameter cannot retrieve CANCELLED
global alerts.
Get a Specific Global Alert¶
Acknowledge an Alert¶
To acknowledge a global alert, use PATCH
to update the alert’s acknowledgedUntil
field. You can optionally update the acknowledgementComment
field with a
comment. Do not include any other field in the PATCH
request.
To acknowledge an alert “forever”, set the field value to 100 years in the future. To unacknowledge a previously acknowledged alert, set the field value to the past.
If you add a comment in the acknowledgementComment
field, Ops Manager
displays the comment next to the message that the alert has been acknowledged.
Sample Entity¶
The following is an example return document. The fields in a return document depend on the alert type.
Entity Fields¶
Name | Type | Description |
---|---|---|
id |
string | Unique identifier. |
groupId |
string | ID of the group that this alert was opened for. |
alertConfigId |
string | ID of the global alert configuration that triggered this alert. |
created |
date | When the alert was opened. |
eventTypeName |
string | The name of the event that triggered the alert.
|
lastNotified |
date | When the last notification was sent for this alert. Only present if notifications have been sent. |
replicaSetName |
string | Name of the replica set. Only present for global alerts of type
HOST , HOST_METRIC , BACKUP , and REPLICA_SET . |
resolved |
date | When the alert was closed. Only present if the status is CLOSED . |
sourceTypeName |
string | For global alerts of the type
|
status |
string | The current state of the alert. Possible values are:
|
tags |
array of strings | The tags associated with the alert. |
typeName |
string | This field is deprecated and will be ignored. |
updated |
date | When the alert was last updated. |
acknowledgedUntil |
date | The date through which the alert has been acknowledged. Only present if the alert has been acknowledged. |
acknowledgementComment |
string | The comment left by the user who acknowledged the alert. Only present if the alert has been acknowledged. |
acknowledgingUsername |
string | The username of the user who acknowledged the alert. Only present if the alert has been acknowledged. |
hostnameAndPort |
string | The hostname and port of each host to which the alert applies. Only
present for alerts of type HOST , HOST_METRIC , and
REPLICA_SET . |
hostId |
string | ID of the host to which the metric pertains. Only present for
alerts of type HOST , HOST_METRIC , and REPLICA_SET . |
metricName |
string | The name of the measurement whose value went outside the threshold. Only
present if For possible values, see Measurement Types for Global Alerts on this page. |
currentValue |
object | The current value of the metric that triggered the alert. Only present for
alerts of type HOST_METRIC . |
currentValue.number |
number | The value of the metric. |
currentValue.units |
string | The units for the 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:
|
clusterId |
string | The ID of the cluster to which this alert applies. Only present for
alerts of type BACKUP , REPLICA_SET , and CLUSTER . |
clusterName |
string | The name the cluster to which this alert applies. Only present for
alerts of type BACKUP , REPLICA_SET , and CLUSTER . |
Measurement Types for Global Alerts¶
The globalAlerts
resource returns measurement types in the metricName
field.
The field is present only if eventTypeName
is set to
OUTSIDE_METRIC_THRESHOLD
.
Host Measurements¶
|
Measure the rate of asserts for a MongoDB process, as collected from
the MongoDB serverStatus
command’s asserts document. |
|
Measurement found on the host’s background flush avg chart. To view the
chart, see View Metrics. |
|
Apply to a MongoDB process’s WiredTiger
storage engine, as collected from the MongoDB serverStatus command’s
wiredTiger.cache and
wiredTiger.concurrentTransactions documents. |
|
Measures connections to a MongoDB process, as collected from the
MongoDB serverStatus
command’s connections document. |
|
Measure the number of cursors for a MongoDB
process, as collected from the MongoDB serverStatus command’s
metrics.cursor document. |
|
Measurements found on the host’s Record Stats and Page Faults
charts. To view the charts, see View Metrics. |
|
Measure operations waiting on locks, as collected from the MongoDB serverStatus command. Ops Manager computes these values based on the type of storage engine. |
|
Applicable only to hosts running MongoDB 2.0 and earlier. Measures operations waiting on the global lock, as collected from the MongoDB serverStatus command. |
|
Measurements found on the host’s btree chart. To view the chart, see
View Metrics. |
|
Measurements found on the host’s journal - commits in write lock chart
and journal stats chart. To view the charts, see
View Metrics. |
|
Measure memory for a MongoDB process, as collected from the MongoDB
serverStatus command’s
mem document. |
|
Measure throughput for MongoDB process, as collected from the MongoDB
serverStatus command’s
network document. |
|
Measurements that apply to the MongoDB process’s oplog. |
|
Measurements displayed on the host’s db storage chart. To view the
chart, see View Metrics. |
|
Measure the rate of database operations on a MongoDB process since the
process last started, as collected from the MongoDB
serverStatus command’s
opcounters document. |
|
Measure the rate of database operations on MongoDB secondaries, as collected from the MongoDB serverStatus command’s
opcountersRepl document. |
|
The average rate per second of documents returned, inserted, updated,
or deleted for a selected time period. These measurements are found on
the host’s Document Metrics chart. To view the chart, see
View Metrics. |
|
For a selected time period, the average rate per second for operations
that perform a sort but cannot perform the sort using an index. This
measurement is found on the host’s Scan and Order chart. To view
the chart, see View Metrics. |
|
Available to hosts running MongoDB v3.4+. The average execution
time in milliseconds per read, write, or command operation
over the selected time period. These measurements are found
on the host’s Operation Execution Times chart. To view the chart,
see View Metrics. |
|
The average rate per second to scan index items during
queries and query-plan evaluations. This rate is driven by
the same value as totalKeysExamined in the output of
explain. This
measurement is found on the host’s Query Executor
chart, accessed when viewing metrics. |
|
The average rate per second to scan documents during queries
and query-plan evaluations. Ops Manager derives the rate using the
explain output’s
totalDocsExamined value. This measurement is found on the
host’s Query Executor chart, accessed when viewing
metrics. |
|
The ratio of the number of index items scanned to the number of
documents returned. This measurement is found on the host’s
Query Targeting chart, accessed when viewing metrics. |
|
The ratio of the number of documents scanned to the number of
documents returned. This measurement is found on the host’s
Query Targeting chart, accessed when viewing metrics. |
Links¶
Relation |
Description |
---|---|
self |
Me |