I am wondering if I am able to check that if mongoDB is running from a Cxx driver. The version I am using is 3.0.1.
I tired to dig into mongocxx::client
and mongocxx::v_noabi::collection
, but I could not find a function/method that seems to do the job.
If the DB is not running, querying will fail and throws an exception. However, it will be better my application could tell me right away whether mongoDB is running or not, rather than throwing an exception when performing a query.
Thanks.