MongoDB is a free and open-source, cross-platform document-oriented database program that provides high performance, high availability, and automatic scaling. Classified as a NoSQL database program, MongoDB uses JSON-like documents with schemas. Nodelizer helps you to monitor following metric about MongoDB installed on your server.
rptmonitor uses PyMongo module working with MongoDB.
-
Check if you have PyMongo installed :
- To open the python prompt in terminal, just type :
python
- Inside python prompt :
import pymongo
-
If PyMongo isn’t installed, you will get this error :
ImportError: No module named pymongo
- Note : If is installed, make sure that installed version is at least 2.1 as older version do not support some features. Try :
pymongo.version
- To open the python prompt in terminal, just type :
-
Installing Pymongo :
- Using pip :
pip install pymongo
(python2) &pip3 install pymongo
(python3) - Using easy_install :
easy_install pymongo
-
From source :
git clone git://github.com/mongodb/mongo-python-driver.git pymongo
cd pymongo/
python setup.py install
-
‘pip’ is preferred installer program.
- Using pip :
-
Edit the Agent’s config.cfg :
- Fill in values for variables & uncomment the lines containing these variables (remove # symbol) –
- mongodb_server
- mongodb_dbnm, if not configured, default will be ‘admin‘.
- mongodb_usrnm
- mongodb_pswd
- You can also customize port if not running the default, through mongodb_port config variable.
-
Restart the Monitor :
-
For (deb/rpm)package supported Linux distros :
sudo /etc/init.d/rptmonitor restart
-
For openSUSE(11.4+) with systemd :
sudo systemctl restart rptmonitor.service
-
For other Linux distro, FreeBSD8+, Mac OS X+ :
sudo python /usr/local/bin/rptmonitor/monitor.py restart
-