Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Plugin for Nagios which checks the errmsg of all nodes in a replication set. Can also be used with nrpe or directly out of the shell
tree: 9ef0345b7e

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
README.md
check_mongo_errmsg

README.md

Nagios-MongoDB (errmsg)

Overview

This is a simple Nagios check script to monitor your MongoDB servers errmsg specially if your setup is a replication setup (replset) . It checks the output of rs.status command and reports the status of each errmsg field corresponding to the node to which it belongs...

Installation

In your Nagios plugins directory run

git clone git://github.com/traveliq/nagios_plugin_mongodb_errmsg.git

Usage

Install in Nagios

Edit your commands.cfg and add the following


define command {
           command_name    check_mongo_errmsg
           command_line    /usr/local/nagios/libexec/check_mongo_errmsg $HOSTADDRESS$ $ARG1$ $ARG2$ 
}

Where ARG1 is for warning and ARG2 for critical. Both are optional values - defaults are:

WARNING = 1 CRITICAL = 2

Then you can reference it like the following. This is is my services.cfg

Check Connection

This will check each host that is listed in the Mongo Servers group. It will issue a warning if one of the nodes reports a error message and a critical error there are 2 or more reported errors.


define service {
              use                     generic-service
              host_name               Mongo Server
              service_description     MongoDB errmsg
              check_command           check_mongo_errmsg!1!2
}
Something went wrong with that request. Please try again.