- Reference >
mongoshMethods >- Free Monitoring Methods >
- db.disableFreeMonitoring()
db.disableFreeMonitoring()¶
On this page
-
db.disableFreeMonitoring()¶ New in version 4.0.
Disables free Cloud monitoring.
Important
To run
db.disableFreeMonitoring(), you must have specified--enableFreeMonitoringcommand-line option orcloud.monitoring.free.stateconfiguration file set toruntime.Otherwise, you can only enable or disable at startup. See
--enableFreeMonitoringcommand-line option orcloud.monitoring.free.statefor details.The
db.disableFreeMonitoring()method is a wrapper around thesetFreeMonitoringcommand.
Access Control¶
When running with access control, the user must have the
setFreeMonitoring privilege actions on the cluster. That is, a user must have a role
that grants the following privilege:
The built-in role clusterMonitor role provides this
privilege.
Example¶
To disable free monitoring, run the following in mongosh:
You can use db.getFreeMonitoringStatus() to check your of
free monitoring status:
If free monitoring is disabled, the method returns a document similar to:
Even when disabled, your unique URL is returned so that if you re-enable monitoring at a later time, you can access your previous metrics that has not expired within the past 24 hours.
See also