Home » NoSQL » Ganglia monitoring mongoDB

Ganglia monitoring mongoDB

must have ganglia and mongodb, there are a lot of ganglia and mongodb installation and configuration process online, this is not about.

1, in the following URL to download mongodb.py and mongodb.conf, respectively in python_modules and conf.d directory


2, find the gmond installation directory, I was /etc/ganglia, the /conf.d/modpython.conf file below and find, which configuration is as follows:

Name= "python_module"
Path= "/usr/local/ganglia/lib64/ganglia/modpython.so"
Params= "usr/local/ganglia/lib64/ganglia/python_modules" (py script place)
Incude ("/etc/ganglia/conf.d/*.pyconf")

3, according to the above path in the configuration, the mongodb.py into the corresponding directory, then the mongodb.conf file name is mongodb.pyconf, in the conf.d directory, open the mongodb.pyconf file, modify the parameters as follows. Note that the path after value mongodb according to the actual installation position to rewrite

Name= "mongodb"
Language= "python"
Param server_status{
Value= "/home/mongodb-linux-3.2.1/bin/mongo --quiet --eval ' printjson (db.serverStatus) (');"
Param rs_status{
Value= "/home/mongodb-linux-3.2.1/bin/mongo --quiet --eval ' printjson (rs.status) (');"
4, run ganglia and mongoDB, will be monitoring the running state of mongDB.