Can you monitor the performance of MongoDB in Grafana?
I know there is this plugin https://grafana.com/grafana/plugins/grafana-mongodb-datasource/ that helps to "visualise the data"... But I'm wondering if there is a way to monitor MongoDB performance during a JMeter load test, for example, the number of connections or the number of rows written/deleted during a test? Visualisation in Grafana would be nice but I'd be happy to start with just seeing the output somewhere ...
CodePudding user response:
You could try querying the MongoDB as per this article.; https://www.blazemeter.com/blog/how-load-test-mongodb-jmeter
For monitoring connections, you could try something like db.serverStatus().connections
as per the detail in this thread;
Check the current number of connections to MongoDb
For other queries you can read the documentation here: https://docs.mongodb.com/manual/reference/method/db.collection.count/#mongodb-method-db.collection.count
As for visualising in Grafana, I have only used that app for monitoring the response time info, avg, 95th etc... Not sure how counts and queries would be displayed.
You could possibly output it to the jmeter.log file using log.info()
so that you have a record of the result...