We are looking for a way to monitor and improve MongoDB performance by trying to analyze slow queries and see if by adding indexes will provide improvements. I know the LEAF provides some metrics for the Mongo pods but what we are trying to do is more than that. What we are looking is for something similar to what MongoDB Ops manager provides: manage deployments, monitor, backup and restore, etc. Right now I’m more interested in the analysis of slow queries and index recommendations (Monitor and Improve Slow Queries - Ops Manager - MongoDB Docs) Does LEAF provides something like this performance advisor? Did anybody try to see if the backup/restore of Ops Manager works with the Mongo deployment of the LEAF provided chart? Does LEAF provides any best practices or recommendations on queries and indexes? Are we allowed to use MongoDB Ops Manager and if that is the case does Leidos have licenses that cover development and testing (it seem that we need a license for testing)?
Hello @jmartin, I’ve categorized this question under @platformservices, as the Tools team does not currently offer a tool for this. The Platform team may have a recommendation.
Hey @jmartin,
There’s a lot of questions here, but I’ll try to answer a couple and perhaps tag some others that I think could provide further information.
Q) Does LEAF provide something like the MongoDB Ops Manager.
A) I’m not exactly familiar with the tool myself, but based on your description I would say our Grafana dashboards are about as close as we have:
We have guides for timed and metered calls, but it sounds like you’re looking for something a little lower level than that. The closest thing we have would be the MongoDB metrics dashboard, but it looks like it’s only as granular as capturing interactions against a specific collection.
Q) Did anybody try to see if the backup/restore of Ops Manager works with the Mongo deployment of the LEAF provided chart?
A) The LEAF provided chart is really just a logical default deployment of the open source Bitnami helm chart. We only use it to streamline local development and typically recommend the use of a managed service like DocumentDB or Atlas in production. You may be able to submit this question to the Bitnami chart maintainers, but we don’t use MongoDB Ops Manager as far as I know. If someone else has more information on this point, please don’t hesitate to correct me.
Q) Does LEAF provide any best practices of recommendations on queries and indexes?
A) @mark.a.alvaro might be able to help with this one, but it looks like there are a few articles in the knowledge base about this:
Q) Are we allowed to use MongoDB Ops Manager and if that is the case does Leidos have licenses that cover the development and testing?
A) I’m not sure LEAF would be the team to answer that necessarily, but I’ll drop a message to our PM and see if I can get you additional details.
UPDATE:
LEAF hasn’t looked into getting licenses for MongoDB Ops Manager and we aren’t really sure what Leidos might offer in that regard. You may be able to pose the question to CIO.
Hello @jmartin
I am not an expert on MongoDB so can’t say I have used these tools before but it seems to have similar tools to other databases.
Looks like it has a profiler so you can get information on which queries are taking longer. Note, I don’t think this is available if you are using DocumentDB, they have other method to profile. See Profiling Guide
Once you have determined the queries to investigate you should be able to use the explain command. I tried a simple example on my DocumentDB instance shows that the query is doing a column scan without any indexes which would indicate an issue if this were a large query.
db.dataObjects.explain().find({“type”: “Stan2”})
rs0:PRIMARY> db.dataObjects.explain().find({“type”: “Stan2”})
{
“queryPlanner” : {
“plannerVersion” : 1,
“namespace” : “red-oak-data-service.dataObjects”,
“winningPlan” : {
“stage” : “COLLSCAN”
}
},
“serverInfo” : {
“host” : “latt-stan-dev-documentdb-0”,
“port” : 27017,
“version” : “4.0.0”
},
“ok” : 1,
“operationTime” : Timestamp(1649431027, 1)
}
Hope this is helpful.
Thanks Howard. Yes something that is missing is a tool to analyze the performance similar to what is available in other DBs. I just spent a short time looking at open source tools available for Mongo and only found this one which requires a license for testing so I was wondering what LEAF or other projects are doing to analyze the DB performance.