Prerequisite:
Git installation on Ubuntu remote server.
- $which git
- $sudo apt-get install git-core
- $which git
- /usr/bin/git
- $git –version
- git version 1.7.0.4
- git clone git://github.com/mzupan/nagios-plugin-mongodb.git
Python dependencies installation on remote server.
- sudo pip install pymongo
- sudo apt-get install python-pip
- sudo pip install pymongo
- service mongodb status
default mongo db port:
27017
check_nrpe uses tcp port 5666
netstat -aunt | grep 5666
netstat -napt | grep -i Listen
- Add command[check_mongo]=/etc/nagios-plugins/config/nagios-plugin-mongodb/check_mongodb.py on remote server file /etc/nagios/nrpe.cfg
Configuration on Nagios-server
- Define host
- Define Services