If you enable the MongoDB monitoring on Windows, you may see this error.
MongoDB.Driver.MongoCommandException: Command 'serverStatus' failed: need to login (response: { "errmsg" : "need to login", "ok" : 0.0 })
at MongoDB.Driver.MongoDatabase.RunCommandAs(Type commandResultType, IMongoCommand command)
at MongoDB.Driver.MongoDatabase.RunCommandAs[TCommandResult](String commandName)
at MongoDB.Driver.MongoDatabase.RunCommand(String commandName)
at BoxedIce.ServerDensity.Agent.Checks.ExtendedMongoDBCheck.DoCheck()
at BoxedIce.ServerDensity.Agent.Agent.DoChecks()
This will happen if you have not appended (admin)
to your username in your connection string. For example, if your connection was is:
mongodb://user:pass@127.0.0.1:27017
you should replace it to be:
mongodb://user(admin):pass@127.0.0.1:27017
Comments