Quick post : installing a mongo server is good, monitoring it is better. I wrote a very basic check that ensure your mongo DB is healthy. Grab it on my github.
Archive for » August, 2010 «
In my last post I’ve been talking about mcollective (check the new website) and mongo and how awesome it is.
I’ve mentioned the docs available in the wiki but I’ve been too fast on this point; it’s not yet in the wiki (only some parts) so here is a little “guide” about setting the pieces work together. All comments are welcome.
- Deploy meta.rb on all your nodes. It will make the metadata available to other nodes.
- Add the following lines to your server.cfg file :
registration = Meta registerinterval = 300
- Install a mongoDB server (debian ships it in squeeze)
- Deploy the mongo registration agent on one node (don’t be like me, do not start deploying it on all nodes !). It will “suck” metadata from nodes, and insert it to the mongo database.
- Add the following lines to your server.cfg on the host with the registration agent :
plugin.registration.mongohost = mongo.mycorp.net plugin.registration.mongodb = puppet plugin.registration.collection = nodes
- Connect to your mongoDB and enjoy :
$ mongo mongo.mycorp.net/puppet MongoDB shell version: 1.6.0 connecting to: mongo.mycorp.net/puppet > db.nodes.find().count() 59
- You’re done !
I run a bunch of box under OpenBSD at $WORK and I wanted to be able to run mcollective on these too. Unfortunately, there were no package available for this OS. So I took time and with some help from landry@ I was able to build a port. It has been integrated into the github repo quickly. But to be able to use mcollective you also need to have the ruby stomp connector. As I don’t like using gems and prefer them packages, I also built a port for it. You can grab it in my github repository here.
These packages have been tested under OpenBSD 4.7 (i386, but they are no_arch ones, ruby related), let me know if they work for you.