Search This Blog

Sunday, November 27, 2016

Query NodeChef MongoDB

Query NodeChef DB

Get the connection string from chef
E.g.
mongodb://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/xxxx-xx


Download mongo client

E.g. for windows

Install it
In the connection copy the url to this windows in the application


Save your changes.
Click connect to this url after.
Edit the settings in case you need to - e.g. for max fetch size the default is 3 M - i changed it to 10M.


Save your changes.

In the left pane double click on the installation table.
A list of query type.
E.g. find --- to find rows
Count - to get the total.

To use query , you need to use special syntax - you can read on the syntax here


E.g to get count of codeVersion greater than 253
Selector = {codeVersion:{$gt:253}}