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

Get All Project Events

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

Your API Key must have the Project Read Only role to successfully call this resource.

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

GET /groups/{groupId}/events
Name
Type
Description
groupId
string
Unique identifier of the project associated with the desired event.

This endpoint accepts the following query parameters to filter returned events:

Name
Type
Description
Default
eventType
string

Return only events of the specified types.

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.

includeRaw
boolean

Specifies whether to include the raw document in the output. The raw document contains additional meta information about the event.

Important

The values in the raw document are subject to change. Do not rely on raw values for formal monitoring.

false
minDate
string
Return only events for which the created date is greater than or equal to the specified Timestamp in ISO 8601 date and time format in UTC.
maxDate
string
Return only events for which the created date is less than or equal to the specified Timestamp in ISO 8601 date and time format in UTC.

This endpoint also accepts the query parameters common to all endpoints that return lists of values:

Name
Type
Description
Default
pageNum
integer
Page number (1-index based).
1
itemsPerPage
integer
Number of items to return per page, up to a maximum of 500.
100
pretty
boolean
Indicates whether the response body should be in a prettyprint format.
false
envelope
boolean

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, response body includes:

status
HTTP response code
envelope
Expected response body

For endpoints that return a list of results, the results object is an envelope. Ops Manager adds the status field to the response body.

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 event.

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 alertId.
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 userId field.

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 eventTypeName is either DATA_EXPLORER or DATA_EXPLORER_CRUD.
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
number
Value of the metric.
currentValue
.units
string

Relevant units for the value.

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:

  • RAW

  • BITS

  • BYTES

  • KILOBITS

  • KILOBYTES

  • MEGABITS

  • MEGABYTES

  • GIGABITS

  • GIGABYTES

  • TERABYTES

  • PETABYTES

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

database
string
Name of the database on which the event occurred. This field can be present when the eventTypeName is either DATA_EXPLORER or DATA_EXPLORER_CRUD.
diffs
array of objects

Changes made to the deployment during this event.

Note

Ops Manager returns different elements depending upon what was changed: user privileges or roles, restore jobs, automation modules, and so on. The list of this array and its objects is not exhaustive.

diffs
.id
string
Unique identifier for the differences executed in this event.
diffs
.params
array of objects
Collection of changes made to the given resource.
diffs
.params
.display
string
Label displayed in the console in the Activity Feed when the change was made.
diffs
.params
.new
string
New state of the parameter that was changed.
diffs
.params
.old
string
Initial state of the parameter that was changed.
diffs
.params
.param
string
Name of the parameter that was changed.
diffs
.status
string

Nature of the change made to this resource.

  • NEW

  • MODIFIED

  • REMOVED

  • SHUTDOWN

  • STARTUP

  • RESTORE

  • RESTART

diffs
.type
string

Resource to which the change was made.

  • AUTH

  • AUTOMATION_AGENT

  • BACKUP_AGENT

  • BI_CONNECTOR

  • MONITORING_AGENT

  • PROCESS

  • REPLICA_SET

  • ROLES

  • USERS

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 Global Monitoring Administrator role.
links
object array

One or more links to sub-resources and/or related resources. All links arrays in responses include at least one link called self. The relationships between URLs are explained in the Web Linking Specification.

metricName
string
Name of the measurement whose value went outside the threshold.
opType
string
Type of operation that generated the event. This field is present when the eventTypeName is either DATA_EXPLORER or DATA_EXPLORER_CRUD.
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 username field.

raw
document

Additional meta information about the event. This field only appears when the includeRaw query parameter is true.

Important

The values in the raw document are subject to change. Do not rely on raw values for formal monitoring.

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 apiKeyId field.

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 publicKey field.

accessListEntry
string
Access List entry of the API Key targeted by the event.
curl --user "{publicKey}:{privateKey}" --digest \
--header "Accept: application/json" \
--include \
--request GET "https://{OPSMANAGER-HOST}:{PORT}/api/public/v1.0/groups/{groupId}/events?pretty=true"
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 "href" : "https://<OpsManagerHost>:<Port>/api/public/v1.0/groups/{groupId}/events?pretty=true&pageNum=1&itemsPerPage=100",
4 "rel" : "self"
5 }, {
6 "href" : "https://<OpsManagerHost>:<Port>/api/public/v1.0/groups/{groupId}/events?pretty=true&itemsPerPage=100&pageNum=2",
7 "rel" : "next"
8 } ],
9 "results" : [ {
10 "created" : "2020-07-13T21:28:37Z",
11 "diffs" : [ {
12 "id" : "admin@admin",
13 "name" : null,
14 "params" : [ {
15 "display" : "Added Privilege",
16 "new" : "config.system.sessions: moveChunk",
17 "old" : null,
18 "param" : "config.system.sessions: moveChunk"
19 }, {
20 "display" : "Added Privilege",
21 "new" : "config.system.sessions: splitChunk",
22 "old" : null,
23 "param" : "config.system.sessions: splitChunk"
24 }, {
25 "display" : "Added Privilege",
26 "new" : "config.system.sessions: splitVector",
27 "old" : null,
28 "param" : "config.system.sessions: splitVector"
29 } ],
30 "priviileges" : [ {
31 "actions" : [ "moveChunk" ],
32 "resource" : {
33 "collection" : "system.sessions",
34 "db" : "config"
35 }
36 }, {
37 "actions" : [ "moveChunk" ],
38 "resource" : {
39 "collection" : "",
40 "db" : ""
41 }
42 }, {
43 "actions" : [ "enableSharding" ],
44 "resource" : {
45 "cluster" : true
46 }
47 }, {
48 "actions" : [ "cleanupOrphaned" ],
49 "resource" : {
50 "cluster" : true
51 }
52 }, {
53 "actions" : [ "flushRouterConfig" ],
54 "resource" : {
55 "cluster" : true
56 }
57 }, {
58 "actions" : [ "splitChunk" ],
59 "resource" : {
60 "collection" : "system.sessions",
61 "db" : "config"
62 }
63 }, {
64 "actions" : [ "splitChunk" ],
65 "resource" : {
66 "collection" : "",
67 "db" : ""
68 }
69 }, {
70 "actions" : [ "splitVector" ],
71 "resource" : {
72 "collection" : "system.sessions",
73 "db" : "config"
74 }
75 }, {
76 "actions" : [ "viewRole" ],
77 "resource" : {
78 "collection" : "",
79 "db" : ""
80 }
81 } ],
82 "roles" : [ {
83 "db" : "admin",
84 "role" : "readWriteAnyDatabase"
85 }, {
86 "db" : "admin",
87 "role" : "dbAdminAnyDatabase"
88 }, {
89 "db" : "admin",
90 "role" : "enableSharding"
91 }, {
92 "db" : "admin",
93 "role" : "backup"
94 }, {
95 "db" : "admin",
96 "role" : "clusterMonitor"
97 } ],
98 "status" : "MODIFIED",
99 "type" : "ROLES"
100 }, {
101 "id" : "sample-dataset-load@admin",
102 "name" : null,
103 "params" : [ ],
104 "priviileges" : null,
105 "roles" : [ {
106 "db" : "admin",
107 "role" : "readWriteAnyDatabase"
108 } ],
109 "status" : "NEW",
110 "type" : "USERS"
111 }, {
112 "id" : "10.16.0.6482-1",
113 "name" : null,
114 "params" : [ {
115 "display" : "Version",
116 "new" : "10.16.0.6482-1",
117 "old" : "10.12.0.6179-1",
118 "param" : "version"
119 } ],
120 "status" : "MODIFIED",
121 "type" : "AUTOMATION_AGENT"
122 } ],
123 "eventTypeName" : "AUTOMATION_CONFIG_PUBLISHED_AUDIT",
124 "groupId" : "{groupId}",
125 "id" : "{eventId}",
126 "isGlobalAdmin" : false,
127 "links" : [ {
128 "href" : "https://<OpsManagerHost>:<Port>/api/public/v1.0/groups/{groupId}/events/{eventId}",
129 "rel" : "self"
130 } ]
131 }],
132 "totalCount" : 1
133}

Back

Get One Organization Event