Skip to content

Advanced CouchDB check script for Nagios / Centreon written in NodeJS

License

Notifications You must be signed in to change notification settings

networkhell/check_couchdb

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 

Repository files navigation

check_couchdb

NodeJS Version of check_couchdb by FreshX.

Supports :

  • IPv6
  • Authentication
  • Performance Data
  • SSL connects

Install

$ npm -g install FreshXOpenSource/check_couchdb
.... npm output ...
check_couchdb@0.3.0 /usr/lib/node_modules/check_couchdb

Now link the check_couchdb binary into your nagios/centreon installation :

ln -s <path from your npm installation above>/bin/check_couchdb <path to your nagios plugins>

i.e. on RedHat Systems this would look like :

ln -s /usr/lib/node_modules/check_couchdb/bin/check_couchdb /usr/lib64/nagios/plugins/check_couchdb

Usage

Now you can use it in Nagios as a command.

Usage: check_couchdb   < -H HOSTNAME | --host >  host to connect to
                       [ -h | --help ]           show help ]
                       [ -s | --ssl  ]           enable SSL, default NO ]
                       [ -u | --user USERNAME ]  username to connect with ]
                       [ -p | --pass PASSWORD ]  password to connect with ]
                       [ -P | --port PORT ]      port to connect to, default 5984 (nonssl), 6984 (ssl) ]
                       [ -d | --debug ]          enable debug mode ]
                       [ -l | --less ]           dump less permformance data

Icinga2 command definition example

object CheckCommand "couchdb" {
    command = [ PluginDir + "/check_couchdb" ]
    timeout = 1m
    arguments = {
        "-H" = {
            "order" = 1
            "repeat_key" = false
            "value" = "$couch_address$"
        }
	"-p" = {
            "description" = "password (if required)"
            "value" = "$couch_pass$"
        }
        "-u" = {
            "description" = "username (if required)"
            "value" = "$couch_user$"
        }
	"-s" = {
	     "set_if" = "$couch_ssl$"
        }
	"-l" = {
             "set_if" = "$set_less$"
        }
        "-V" = {
             "description" = "couchDB Version - default is 1.x; 1 or 2"
             "value" = "$couchdb_version$"
        }
	"-P" = "$couch_port$"
    }
    vars.couch_address = "$host.address$"
    vars.couch_ssl = false
    vars.set_less = true
}

About

Advanced CouchDB check script for Nagios / Centreon written in NodeJS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%