I am using mongo-ruby-driver, I want to get stats/query graphs to show for Mongo. But don’t how can I get Mongostats/Graphs via mongo-ruby-driver.
Any help is highly appreciated.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Rather than righting your own, you can just set up MMS and use that instead.
But, if you do want to pull the data directly, you can do that too – anything that can be run from the shell can be run from the driver. So, for example, to run the stats() command, which translates on the command line to:
And so, just follow the guidelines at the top of the ruby driver FAQ – the first one includes how to run any of the commands via the driver.