Required Roles
Your API Key must have the Global Read Only role to successfully call this resource.
Request
Base URL: https://{OPSMANAGER-HOST}:{PORT}/api/public/v1.0
GET /globalEvents/{eventId}Request Path Parameters
Name | Type | Description |
|---|---|---|
eventId | string | Unique identifier of the desired event. |
Request Query Parameters
The following query parameters are optional:
Name | Type | Necessity | Description | Default |
|---|---|---|---|---|
pretty | boolean | Optional | Flag indicating whether the response body is in a prettyprint format. |
|
envelope | boolean | Optional | Flag that indicates whether 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:
|
|
Request Body Parameters
This endpoint doesn't use HTTP request body parameters.
Response
Name | Type | Description |
|---|---|---|
alertId | string | Unique identifier for the alert associated with this event. |
alertConfigId | string | Unique identifier for the alert configuration associated with the |
apiKeyId | string | Unique identifier for the API Key that triggered this event. If this field is present in the response, Ops Manager does not return the |
clusterId | string | Unique identifier of the cluster to which this event applies. |
clusterName | string | Name of the cluster to which this event applies. |
collection | string | Name of the collection on which the event occurred. This field can be present when the |
created | string | Timestamp in ISO 8601 date and time format in UTC when this event was triggered. |
currentValue | object | Current value of the metric that triggered this event. |
currentValue | number | Value of the metric. |
currentValue | string | Units for Accepted values are:
For example, a metric that measures memory consumption can use |
database | string | Name of the database on which the event occurred. This field can be present when the |
eventTypeName | string | Name of the circumstance that triggered this event. 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 in which this event occurred. |
hostId | string | Unique identifier of the host on which this event occurred. |
hostname | string | Hostname, FQDN, IPv4 address, or IPv6 address of the host on which this event occurred. |
id | string | Unique identifier for this event. |
isGlobalAdmin | boolean | Flag indicating whether the user who triggered this event has the |
links | object array | One or more links to sub-resources or related resources. All |
metricName | string | Name of the measurement whose value went outside the threshold. For possible values, see below. |
opType | string | Type of operation that generated the event. This field is present when the |
port | integer | Port of the host associated with this event. |
publicKey | string | Public key associated with the API Key that triggered this event. If this field is present in the response, Ops Manager does not return the |
remoteAddress | string | IP address associated with the Ops Manager user (userId) who triggered the event. |
replicaSetName | string | Name of the replica set. |
shardName | string | Name of the shard associated with the event. |
targetPublicKey | string | Public key of the API Key targeted by the event. |
targetUsername | string | Username for the Ops Manager user targeted by this event. |
teamId | string | Unique identifier for the Ops Manager team associated with this event. |
userId | string | Unique identifier for the Ops Manager user who triggered this event. If this field is present in the response, Ops Manager does not return the |
username | string | Username for the Ops Manager user who triggered this event. If this field is present in the response, Ops Manager does not return |
accessListEntry | string | Access list entry of the API Key targeted by the event. |
Example Request
curl --user "{publicKey}:{privateKey}" --digest \ --header "Accept: application/json" \ --include \ --request GET "https://{OPSMANAGER-HOST}:{PORT}/api/public/v1.0/globalEvents/{eventId}?pretty=true" \Example Response
Response Header
HTTP/1.1 401 UnauthorizedContent-Type: application/json;charset=ISO-8859-1Date: {dateInUnixFormat}WWW-Authenticate: Digest realm="MMS Public API", domain="", nonce="{nonce}", algorithm=MD5, op="auth", stale=falseContent-Length: {requestLengthInBytes}Connection: keep-aliveHTTP/1.1 200 OKVary: Accept-EncodingContent-Type: application/jsonStrict-Transport-Security: max-age=300Date: {dateInUnixFormat}Connection: keep-aliveContent-Length: {requestLengthInBytes}X-MongoDB-Service-Version: gitHash={gitHash}; versionString={ApplicationVersion}Response Body
{ "alertConfigId": "{alertConfigId}", "alertId": "{alertId}", "clusterId": "{clusterId}", "clusterName": "Test Cluster", "created": "2018-06-11T12:34:56Z", "currentValue": { "number": 50, "units": "RAW" }, "eventTypeName": "OUTSIDE_METRIC_THRESHOLD", "groupId": "{groupId}", "hostId": "{hostId}", "hostname": "db.example.com", "id": "{globalAlertId}", "isGlobalAdmin": false, "maintenanceWindowId": "{maintenanceWindowId}", "metricName": "OPCOUNTER_CMD", "orgId": "{orgId}", "port": 27017, "remoteAddress": "192.168.1.1", "replicaSetName": "rs1", "shardName": "sh1", "userId": "{userId}", "username": "john.doe@example.com", "targetUsername": "jane.doe@example.com", "teamId": "{teamId}"}