db.getFreeMonitoringStatus
On this page本页内容
db.getFreeMonitoringStatus()
-
Returns information on free monitoring status.返回有关免费监视状态的信息。mongosh
helperdb.getFreeMonitoringStatus()
is a wrapper around thegetFreeMonitoringStatus
command.mongosh
助手db.getFreeMonitoringStatus()
是getFreeMonitoringStatus
命令的包装器。TipSee also:另请参阅:
Access Control访问控制
When running with access control, the user must have the 在使用访问控制运行时,用户必须在群集上具有checkFreeMonitoringStatus
privilege actions on the cluster. checkFreeMonitoringStatus
权限操作。That is, a user must have a role that grants the following privilege:也就是说,用户必须具有授予以下权限的角色:
{ resource: { cluster : true }, actions: [ "checkFreeMonitoringStatus" ] }
The built-in role 内置的角色clusterMonitor
role provides this privilege.clusterMonitor
角色提供了此权限。
Output输出
The method returns a document with the following fields:该方法返回一个包含以下字段的文档:
state | "enabled" or "disabled" ."enabled" 或"disabled" 。 |
message | |
url | Note |
userReminder | |
ok | getFreeMonitoringStatus operation itself. Values are either: getFreeMonitoringStatus 操作本身的状态。值为:
|
Example实例
You can use 您可以使用db.getFreeMonitoringStatus()
to check your free monitoring statusdb.getFreeMonitoringStatus()
检查您的免费监控状态
db.getFreeMonitoringStatus()
The method returns information on your free monitoring status.该方法返回有关您的免费监控状态的信息。
{
"state" : "enabled",
"message" : "To see your monitoring data, navigate to the unique URL below.\nAnyone you share the URL with will also be able to view this page.\n\nhttps://cloud.mongodb.com/freemonitoring/mongo/MSBjZTZhNTJmOS0yODg1\n\nYou can disable monitoring at any time by running db.disableFreeMonitoring().",
"url" : "https://cloud.mongodb.com/freemonitoring/mongo/MSBjZTZhNTJmOS0yODg1",
"userReminder" : "",
"ok" : 1
}
See also: 另请参阅:
从freeMonitoring
field returned from db.serverStatus()
db.serverStatus()
返回的freeMonitoring
字段