getFreeMonitoringStatus

  • getFreeMonitoringStatus

New in version 4.0.

Returns the status of whether free Cloud monitoring is enabled for standalone orreplica sets (including shards).

The command is run against the admin database and has the form:

  1. db.adminCommand( { getFreeMonitoringStatus: 1 } )

The mongo shell provides thedb.getFreeMonitoringStatus() helper for the command.

Access Control

When running with access control, the user must have thecheckFreeMonitoringStatus privilege actions on thecluster. That is, a user must have arole that grants the following privilege:

  1. { resource: { cluster : true }, actions: [ "checkFreeMonitoringStatus" ] }

The built-in role clusterMonitor role provides thisprivilege.

Output

The command returns a document with the following fields:

FieldDescription
stateThe free monitoring enablement state. Values are either:"enabled" or "disabled".
messageAny informational message related to your state.
urlThe unique URL at which your monitoring data can be accessed.NoteAnyone with whom you share the URL can access yourmonitored data.Even when disabled, your unique URL is returned so that if youre-enable monitoring, you can access your previous metrics, ifcollected less than 24 hours ago.
userReminderAny informational message related to your state.
okoperationTime$clusterTimeFor details on these fields, see Response.

See also

freeMonitoring field returned from db.serverStatus()