Docs Menu
Docs Home
/
MongoDB Ops Manager
/ / / /

Get All Global Alerts

On this page

  • Required Roles
  • Request
  • Request Path Parameters
  • Request Query Parameters
  • Request Body Parameters
  • Response
  • Response Document
  • results Embedded Document
  • Example Request
  • Example Response
  • Response Header
  • Response Body

Retrieve all global alerts.

You can successfully call this endpoint with any of the following assigned roles:

Base URL: https://{OPSMANAGER-HOST}:{PORT}/api/public/v1.0

GET /globalAlerts

This endpoint doesn't use HTTP request path parameters.

Name
Type
Necessity
Description
Default

pageNum

number

Optional

One-based integer that returns a subsection of results.

1

itemsPerPage

number

Optional

Number of items to return per page, up to a maximum of 500.

100

pretty

boolean

Optional

Flag that indicates 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 a list of results, the content object is an envelope. Ops Manager adds the status field to the response body.

false

status

string

Optional

Status of alerts you want to return. Ops Manager returns alerts that match the status you indicate. Accepted values include:

TRACKING

Alert conditions exist, but the condition hasn't persisted for long enough to trigger an alert.

OPEN

Alert is open.

CLOSED

Alert is closed.

None

createdOnOrAfter

date field

Optional

Creation date of alerts you want to return. Ops Manager returns alerts created on or after the date you indicate.

None

createdOnOrBefore

date field

Optional

Creation date of alerts you want to return. Ops Manager returns alerts created on or before the date you indicate.

None

This endpoint doesn't use HTTP request body parameters.

The response JSON document includes an array of result objects, an array of link objects and a count of the total number of result objects retrieved.

Name
Type
Description

results

array

Array includes one object for each item detailed in the results Embedded Document section.

links

array

Array includes one or more links to sub-resources and/or related resources. The relations between URLs are explained in the Web Linking Specification.

totalCount

number

Integer count of the total number of items in the result set. It may be greater than the number of objects in the results array if the entire result set is paginated.

Each result is one alert.

Name
Type
Description

acknowledgedUntil

string

Timestamp in ISO 8601 date and time format in UTC through which the alert has been acknowledged. Ops Manager presents this field if a user acknowledged this alert.

acknowledgementComment

string

Comment that the user who acknowledged this alert left. Ops Manager presents this field if a user acknowledged this alert.

acknowledgingUsername

string

Ops Manager username of the user who acknowledged the alert. Ops Manager presents this field if a user acknowledged this alert.

alertConfigId

string

Unique identifier of the global alert configuration that triggered this alert.

clusterId

string

Unique identifier of the cluster to which this alert applies. Ops Manager returns this field for global alerts in the categories of:

clusterName

string

Name the cluster to which this alert applies. Ops Manager returns this field for global alerts in the categories of:

created

string

Timestamp in ISO 8601 date and time format in UTC when the alert was created.

currentValue

object

Current value of the metric that triggered the alert. Ops Manager returns this field for global alerts in the category of host.

currentValue.number

number

Current value of the metric.

currentValue.units

string

Units for currentValue.number. The units depend on the type of metric.

Accepted values are:

  • RAW

  • BITS

  • BYTES

  • KILOBITS

  • KILOBYTES

  • MEGABITS

  • MEGABYTES

  • GIGABITS

  • GIGABYTES

  • TERABYTES

  • PETABYTES

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

For example, a metric that measures memory consumption can use BYTES, while a metric that measures time can use HOURS.

eventTypeName

string

Name of the event that triggered the 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.

groupId

string

Unique identifier of the project for which this alert was opened.

hostId

string

Unique identifier of the host to which the metric pertains. Ops Manager returns this field for global alerts in the categories of:

hostnameAndPort

string

Hostname and port of each host to which the alert applies. The hostname can be only a hostname, an FQDN, an IPv4 address, or an IPv6 address. Ops Manager returns this field for global alerts in the categories of:

id

string

Unique identifier of the alert.

lastNotified

string

Timestamp in ISO 8601 date and time format in UTC when the last notification was sent for this alert. Ops Manager displays this if Ops Manager sent notifications.

metricName

string

Name of the measurement whose value went outside the threshold. Ops Manager returns this field if "eventTypeName" : "OUTSIDE_METRIC_THRESHOLD".

For possible values, see Measurement Types for Global Alerts.

replicaSetName

string

Name of the replica set. Ops Manager returns this field for global alerts in the categories of:

resolved

string

Timestamp in ISO 8601 date and time format in UTC when the alert was closed. Ops Manager returns this field for global alerts when "status" : "CLOSED".

sourceTypeName

string

Type of host being backed up. Ops Manager returns this field for global alerts in the category of backup. Possible values that can be returned include:

  • REPLICA_SET

  • SHARDED_CLUSTER

  • CONFIG_SERVER

status

string

Current state of the alert. Possible values that can be returned include:

TRACKING

Alert conditions exist, but the condition hasn't persisted for long enough to trigger an alert.

OPEN

Alert is open.

CLOSED

Alert is closed.

CANCELLED

Alert is cancelled.

tags

array of strings

Tags associated with this alert.

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 was last updated.

curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest \
--header "Accept: application/json" \
--include \
--request GET "https://<OpsManagerHost>:<Port>/api/public/v1.0/globalAlerts"
HTTP/1.1 401 Unauthorized
Content-Type: application/json;charset=ISO-8859-1
Date: {dateInUnixFormat}
WWW-Authenticate: Digest realm="MMS Public API", domain="", nonce="{nonce}", algorithm=MD5, op="auth", stale=false
Content-Length: {requestLengthInBytes}
Connection: keep-alive
HTTP/1.1 200 OK
Vary: Accept-Encoding
Content-Type: application/json
Strict-Transport-Security: max-age=300
Date: {dateInUnixFormat}
Connection: keep-alive
Content-Length: {requestLengthInBytes}
X-MongoDB-Service-Version: gitHash={gitHash}; versionString={ApplicationVersion}
1{
2 "links": [],
3 "results": [{
4 "alertConfigId": "{ALERT-CONFIG-ID}",
5 "created": "2019-11-29T20:26:30Z",
6 "eventTypeName": "BACKUP_AGENT_DOWN",
7 "groupId": "{PROJECT-ID}",
8 "id": "{ALERT-ID}",
9 "lastNotified": "2020-04-09T20:21:00Z",
10 "links": [],
11 "status": "OPEN",
12 "tags": [],
13 "typeName": "AGENT",
14 "updated": "2019-11-29T20:26:30Z"
15 },
16 {
17 "alertConfigId": "{ALERT-CONFIG-ID}",
18 "created": "2019-11-29T20:43:00Z",
19 "eventTypeName": "BACKUP_AGENT_DOWN",
20 "groupId": "{PROJECT-ID}",
21 "id": "{ALERT-ID}",
22 "lastNotified": "2020-04-09T20:21:54Z",
23 "links": [],
24 "status": "OPEN",
25 "tags": [],
26 "typeName": "AGENT",
27 "updated": "2019-11-29T20:43:00Z"
28 },
29 {
30 "alertConfigId": "{ALERT-CONFIG-ID}",
31 "created": "2019-11-30T12:27:07Z",
32 "eventTypeName": "BACKUP_AGENT_DOWN",
33 "groupId": "{PROJECT-ID}",
34 "id": "{ALERT-ID}",
35 "lastNotified": "2020-04-09T20:20:33Z",
36 "links": [],
37 "status": "OPEN",
38 "tags": [],
39 "typeName": "AGENT",
40 "updated": "2019-11-30T12:27:07Z"
41 }
42 ],
43 "totalCount": 3
44}

Back

Global Alerts