简体   繁体   中英

MongoDB monitoring service on local host

Is there a MongoDB server performance monitoring tool which I can run on a local host or a local machine? I am concerned about privacy issues while using third-party hosting tools like MongoDB Monitoring Service.

The MongoDB documentation has information on Monitoring MongoDB including monitoring strategies, relevant database commands , and some self-hosted monitoring options .

If you are concerned about the information collected by MongoDB Cloud Manager (née MMS) or would like to collect this information yourself, you can see a list of database commands used by the monitoring agent .

MongoBird is best monitoring tool for MongoDB. It can be installed on all platforms. because it is developed in Java. So, you can install mongobird on the local host.

MongoDB has created a free monitoring tool in version 4.0 which works on localhost. To use it just connect to the database and run db.enableFreeMonitoring()

For Example:

mongo test
MongoDB shell version v4.0.4
connecting to: mongodb://127.0.0.1:27017/test

Once you've connected you can enable monitoring like so:

test> db.enableFreeMonitoring()
{
 "state": "enabled",
 "message": "To see your monitoring data, navigate to the unique URL below. Anyone you share the URL with will also be able to view this page. You can disable monitoring at any time by running db.disableFreeMonitoring().",
 "url": "https://cloud.mongodb.com/freemonitoring/cluster/HZL3ISL73QLWSNEAYMER2FGR3BINAEGJ",
 "userReminder": "",
 "ok": 1
}

Then go to the url provided ( https://cloud.mongodb.com/freemonitoring/... ).

Finally, to disable monitoring:

test> db.disableFreeMonitoring()

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM