check_generic -e <cmdline> -o|u|w|c <expression> [-f false state] [-n name] [-t timeout] [-r
check_generic [-h | –help]
check_generic [-V | –version]
specify directory for tmpfiles, default: /usr/tmp/check_generic A garbage collection for files 'check_generic*' removes files older than 24 hours.
A string which contains the commands to execute. This can be a complete command line including Unix filters.
The command string is executed via 'sh', this allows to use every valid shell command or every valid command chain.
Normally check_generic will throw UNKNOWN if there is no output. If you want to avoid this, use the switch –empty_output_is_ok.
which state the plugin should become if the expression is false default: complement of state
print detailed help screen
If the executed program throws a RC other than 0 (OK), it will influence the overall result. If you want to avoid to include the RC into the result, use this switch.
Use this switch, if also the STDERR output should be included in the input stream. The STDERR output will be appended to STDOUT before the regex matching.
plugin name (shown in output), default: empty
This is the performance tag which should describe the data.
Example: ./check_generic -n nagios_services_latency -e “$USER1$/nagiostats -m -d AVGACTSVCLAT” -w ”>30000” -c ”>60000” -p “ms_average”
nagios_services_latency OK - result:67 match:none |ms_average=67
If you specify a pattern match like -c '=~/foo (bar)/' you can enclose parts of the pattern with brackets. These parts will be used as output lateron.
timeout for one command, default: 10
This expression is just a normal PERL expression, e.g.
| Operator | Meaning |
|---|---|
| '= n' | numerically equal |
| '< n' | numerically smaller than |
| '> n' | numerically larger than |
| 'eq s' | string equal |
| 'ne s' | string not equal |
| '=~/s/' | regular expression matching |
| '!~/s/' | regular expression not matching |
Defines the verbosity, can be specified multiple times. Default: 0
Prints the version info
data type delta:
result = (value2 - value1) / seconds