Translations of this page:

Optionen

Aufruf

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]

-d, --tmpdir

specify directory for tmpfiles, default: /usr/tmp/check_generic A garbage collection for files 'check_generic*' removes files older than 24 hours.

-e, --execute <cmdline>

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.

--empty_output_is_ok

Normally check_generic will throw UNKNOWN if there is no output. If you want to avoid this, use the switch –empty_output_is_ok.

-f, --false [u|UNKNOWN|w|WARNING|c|CRITICAL|o|OK]

which state the plugin should become if the expression is false default: complement of state

-h, --help

print detailed help screen

--ignore_rc

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.

--match_stderr

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.

-n, --name

plugin name (shown in output), default: empty

-p, --performance <string>

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

--print_match

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.

-t, --timeout

timeout for one command, default: 10

-u|w|c|o <expression>

--unknown,warning,critical,ok <expression>

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

-v, --verbose

Defines the verbosity, can be specified multiple times. Default: 0

-V, --version

Prints the version info

-y, --type <type>

data type delta:

  1. During the first call of the plugin the value is saved in a persistent file in the temporary directory.
  2. During the second call the difference between the two values is divided by the number of the elapsed seconds:
    result = (value2 - value1) / seconds
projects/check_generic/options.txt · Last modified: 2009/09/21 00:05 by flackem
chimeric.de = chi`s home Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0