Monitoring MongoDB 3 using StackDriver in GCE

Solution 1:

I suspect that the Stack Driver does not (yet) support the new SCRAM-SHA-1 Authentication mechanism. This new mechanism was added in 3.0 to replace MONGODB-CR and is the default in 3.0+, however it requires that the driver support the new mechanism.

To get MongoDB 3.0 to use the older mechanism, you can either start with 2.6 and create your users there, then upgrade or you can do the following (based on this comment):

  • Start MongoDB 3.0 with auth disabled (make sure no users have been added yet)
  • Connect to the instance and run the following:

    var schema = db.system.version.findOne({"_id" : "authSchema"}); schema.currentVersion = 3; db.system.version.save(schema);

  • Start MongoDB with auth enabled and create your users

These uses should now be created with MONGODB-CR. The StackDriver is using libmongoc which supports SCRAM-SHA-1 as of version 1.1 but their version looks a lot older based on some Github browsing. Once they update their driver, this issue should go away - for now you will have to work around it.

Solution 2:

I work at Google on the Stackdriver agent. Adam C's answer is correct. I've been working on this lately, and now we have a version of this in beta that has been working well in our own testing. This new version addresses not only the SCRAM-SHA-1 issue but also has some performance improvements as well. Before releasing it more broadly, we would love the opportunity to test it in a couple of customer environments.

If anyone is willing to be a beta tester for the new version of our agent, I could arrange to deliver a .deb or .rpm file to you appropriate to your platform. As always there is a small risk that something can go wrong, so I think this only makes sense if you have a non-production environment you can try it in.

EDIT: As of July 12, 2016, this change is now available in production!