negate
Posted by tonvoon on 8 December 2007 - 1:26am
negate v1793 (nagios-plugins 1.4.10)
Copyright (c) 2002-2007 Nagios Plugin Development Team
<nagiosplug-devel@lists.sourceforge.net>
Negates the status of a plugin (returns OK for CRITICAL and vice-versa).
Additional switches can be used to control which state becomes what.
Usage:negate [-t timeout] [-owcu STATE] <definition of wrapped plugin>
Options:
-h, --help
Print detailed help screen
-V, --version
Print version information
-t, --timeout=INTEGER
Seconds before connection times out (default: 9)
Keep timeout lower than the plugin timeout to retain CRITICAL status.
-o,--ok=STATUS
-w,--warning=STATUS
-c,--critical=STATUS
-u,--unknown=STATUS
STATUS can be 'OK', 'WARNING', 'CRITICAL' or 'UNKNOWN' without single
quotes. Numeric values are accepted. If nothing is specified, permutes
OK and CRITICAL.
Examples:
negate /usr/local/nagios/libexec/check_ping -H host
Run check_ping and invert result. Must use full path to plugin
negate -w OK -c UNKNOWN /usr/local/nagios/libexec/check_procs -a 'vi negate.c'
This will return OK instead of WARNING and UNKNOWN instead of CRITICAL
Notes:
This plugin is a wrapper to take the output of another plugin and invert it.
The full path of the plugin must be provided.
If the wrapped plugin returns STATE_OK, the wrapper will return STATE_CRITICAL.
If the wrapped plugin returns STATE_CRITICAL, the wrapper will return STATE_OK.
Otherwise, the output state of the wrapped plugin is unchanged.
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