MongoDB Questions and Answers – Monitoring for MongoDB

This set of MongoDB Multiple Choice Questions & Answers (MCQs) focuses on “Monitoring for MongoDB”.

1. ___________ captures and returns the counts of database operations by type.
a) mongostat
b) mongod
c) mms
d) all of the mentioned
View Answer

Answer: a
Explanation: Use mongostat to understand the distribution of operation types and to inform capacity planning.

2. Point out the correct statement.
a) Database commands cannot return statistics regarding the current database state with greater fidelity
b) Monitoring is a critical component of all database administration
c) The MongoDB distribution does not include utilities that quickly return statistics about instances’ performance and activity
d) All of the mentioned
View Answer

Answer: a
Explanation: This is useful for diagnosing issues and assessing normal operation.

3. _________ tracks and reports the current read and write activity of a MongoDB instance, and reports these statistics on a per collection basis.
a) mongostat
b) mongod
c) mongotop
d) all of the mentioned
View Answer

Answer: c
Explanation: Use mongotop to check if your database activity and use match your expectations.

4. _______ method is useful tool for identifying the database instance’s in-progress operations.
a) db.current
b) db.currentOp
c) db.Op
d) none of the mentioned
View Answer

Answer: b
Explanation: MongoDB includes a number of commands that report on the state of the database.

advertisement
advertisement

5. Point out the correct statement.
a) MMS offers point in time recovery of MongoDB replica sets
b) MongoDB provides a web interface that exposes diagnostic and monitoring information in a simple web page
c) db.Status() outputs an account of the state of a MongoDB instance
d) None of the mentioned
View Answer

Answer: b
Explanation: The web interface is accessible at localhost:<port>, where the <port> number is 1000 more than the mongod port.

6. ___________ returns a general overview of the status of the database, detailing disk usage, memory use, connection, journaling, and index access.
a) dbStats
b) db.serverStatus()
c) db.stats()
d) none of the mentioned
View Answer

Answer: b
Explanation: This command is rarely run directly.

Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

7. The ________ reflect the amount of storage used, the quantity of data contained in the database, and object, collection, and index counters.
a) dbStats
b) db.serverStatus()
c) db.statserver()
d) none of the mentioned
View Answer

Answer: a
Explanation: The dbStats command, or db.stats() from the shell, returns a document that addresses storage use and data volumes.

8. ________ provides statistics that resemble dbStats on the collection level.
a) dbStats
b) db.serverStatus()
c) db.statserver()
d) collstats
View Answer

Answer: d
Explanation: It also includes count of the objects in the collection, the size of the collection, the amount of disk space used by the collection, and information about its indexes.

advertisement

Sanfoundry Global Education & Learning Series – MongoDB.

Here’s the list of Best Books in MongoDB.

advertisement

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.