Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

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
branch: master

added correct download url

latest commit 9ef0345b7e
Frank Brandewiede authored
Failed to load latest commit information.

Nagios-MongoDB (errmsg)


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...


In your Nagios plugins directory run

git clone git://


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:


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.