check_cluster
Posted by tonvoon on 19 June 2013 - 11:50am
check_cluster v1.4.16-84-g1fd50 (nagios-plugins 1.4.16) Copyright (c) 2000-2004 Ethan Galstad (nagios@nagios.org) Copyright (c) 2000-2007 Nagios Plugin Development Team <nagiosplug-devel@lists.sourceforge.net> Host/Service Cluster Plugin for Nagios 2 Usage: check_cluster (-s | -h) -d val1[,val2,...,valn] [-l label] [-w threshold] [-c threshold] [-v] [--help] Options: -s, --service Check service cluster status -h, --host Check host cluster status -l, --label=STRING Optional prepended text output (i.e. "Host cluster") -w, --warning=THRESHOLD Specifies the range of hosts or services in cluster that must be in a non-OK state in order to return a WARNING status level -c, --critical=THRESHOLD Specifies the range of hosts or services in cluster that must be in a non-OK state in order to return a CRITICAL status level -d, --data=LIST The status codes of the hosts or services in the cluster, separated by commas -v, --verbose Show details for command-line debugging (Nagios may truncate output) Notes: See: http://nagiosplug.sourceforge.net/developer-guidelines.html#THRESHOLDFOR... for THRESHOLD format and examples. Examples: check_cluster -s -d 2,0,2,0 -c @3: Will alert critical if there are 3 or more service data points in a non-OK state. Send email to nagios-users@lists.sourceforge.net if you have questions regarding use of this software. To submit patches or suggest improvements, send email to nagiosplug-devel@lists.sourceforge.net
- Printer-friendly version
- Login or register to post comments
The best way to use this plugin, is with on-demand macros.
Example:
check_cluster -s -w @1: -c @2: -d tsedano$SERVICESTATEDID:webserver1:tcp_http$,$SERVICESTATEDID:webserver2:tcp_http$This will take the service states of the tcp_http check on hosts webserver1 and webserver2, return warning if at least 1 of the states is not ok and critical if at least 2 are not ok.
More info on on-demand macros can be found at http://nagios.sourceforge.net/docs/3_0/macros.html