I'm new to mongo and am messing around with the admin serverStatus. For me, it always returns false when I am expecting an object. I'm running mongod with auth enabled. Are there specific user privs that are required? I can't find much documentation other than what is supplied by the API docs from the nodejs drivers or the mongodb manual.
MonogDB 3.4 NodeJS drivers 2.2
var MongoClient = require('mongodb').MongoClient;
MongoClient.connect('mongodb://user:pass@localhost:27017/test?authMechanism=DEFAULT&authSource=test', function(err, db) {
var adminDB = db.admin();
adminDB.serverStatus(function(err, status) {
console.log(status);
db.close();
});
});
Thanks!