Skip to content

ebruAkagunduz/nagios-plugin-couchbase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nagios-plugin-couchbase

A simple nagios plugin to monitor Couchbase 2.x servers/cluster.

alt tag

###Requirements

# apt-get install nagios3 
# pip install requests

Installation

 git clone https://github.com/YakindanEgitim/nagios-plugin-couchbase.git

Usage

Summary Statistics

Following commands show information based on the currently selected bucket:


define command{
  command_name  cb_item_count
  command_line  $USER1$/check_couchbase.py -u $USER2$ -p $USER3$ -I $HOSTADDRESS$  -P $ARG1$ -b $ARG2$ --item-count -W $ARG3$ -C $ARG4$
}

define command{
  command_name  cb_low_watermark
  command_line  $USER1$/check_couchbase.py -u $USER2$ -p $USER3$ -I $HOSTADDRESS$  -P $ARG1$ -b $ARG2$ --low-watermark -W $ARG3$ -C $ARG4$
}

define command{
  command_name  cb_mem_used
  command_line  $USER1$/check_couchbase.py -u $USER2$ -p $USER3$ -I $HOSTADDRESS$  -P $ARG1$ -b $ARG2$ --memory-used -W $ARG3$ -C $ARG4$
}

vBucket Resources Statistics

You should '--vbucket' parameter for checking vBucket resources. vBucket resources states are pending, total, replica and active. For example if you want to check ejections total state of vbucket, you must specify '--vbucket --total --ejections'. You can see below some examples for vbucket resources checks.


define command{
  command_name  cb_vb_active_new_items
  command_line  $USER1$/check_couchbase.py -u $USER2$ -p $USER3$ -I $HOSTADDRESS$  -P $ARG1$ -b $ARG2$ --vbucket --active --new-items -W $ARG3$ -C $ARG4$
}

define command{
  command_name  cb_vb_pending_new_items
  command_line  $USER1$/check_couchbase.py -u $USER2$ -p $USER3$ -I $HOSTADDRESS$  -P $ARG1$ -b $ARG2$ --vbucket --pending --new-items -W $ARG3$ -C $ARG4$
}

define command{
  command_name  cb_vb_total_new_items
  command_line  $USER1$/check_couchbase.py -u $USER2$ -p $USER3$ -I $HOSTADDRESS$  -P $ARG1$ -b $ARG2$ --vbucket --total --new_items -W $ARG3$ -C $ARG4$
}

define command{
  command_name  cb_vb_replica_new_items
  command_line  $USER1$/check_couchbase.py -u $USER2$ -p $USER3$ -I $HOSTADDRESS$  -P $ARG1$ -b $ARG2$ --vbucket --replica --new-items -W $ARG3$ -C $ARG4$
}

Disk Queue Statistics

You should use '--disk-queues' parameter. Disk queues states are pending, total, replica and active.


define command{
  command_name  cb_vb_disk_queues_pending_fill_rate
  command_line  $USER1$/check_couchbase.py -u $USER2$ -p $USER3$ -I $HOSTADDRESS$  -P $ARG1$ -b $ARG2$  --disk-queues --pending --fill-rate -W $ARG3$ -C $ARG4$
}

define command{
  command_name  cb_vb_disk_queues_pending_drain_rate
  command_line  $USER1$/check_couchbase.py -u $USER2$ -p $USER3$ -I $HOSTADDRESS$  -P $ARG1$ -b $ARG2$  --disk-queues --pending --drain-rate -W $ARG3$ -C $ARG4$
}

Note1 : We used above commands for cluster level. If you want to query in node level for statistic, you add '--node' parameter and you can remove some parameters. So you can edit following:


define command{
  command_name  cb_vb_disk_queues_pending_drain_rate
  command_line  $USER1$/check_couchbase.py -I $HOSTADDRESS$ -b $ARG2$  --disk-queues --pending --drain-rate --node -W $ARG3$ -C $ARG4$
}

In addition, if your CouchBase 'cbstats' command path different from default (/opt/bin/couchbase/cbstats), you should add '--cbstats' option. In this case, you must define full path for '--cbstats' parameter.


define command{
  command_name  cb_mem_used
  command_line  $USER1$/check_couchbase.py -I $HOSTADDRESS$ -b $ARG2$ --memory-used --node --cbstats /full_path/ -W $ARG3$ -C $ARG4$
}

You should use '--cbstats' parameter only in node level.

Note2 : If you want to use more options (--disk-reads-per-sec, --high-watermark, --cache-miss-ratio .. etc.), you can see using
'--help' parameter.


$/usr/lib/nagios/plugins/check_couchbase.py --help

Author

Ebru Akagündüz ebru.akagunduz@gmail.com

##License Nagios Plugin Couchbase is available under the GPLv3

Nagios Exchange

It is also available in nagios-exchange: https://exchange.nagios.org/directory/Plugins/Databases/nagios-2Dplugin-2Dcouchbase/details

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •