check_generic -e <Kommandozeile> -o|u|w|c <Ausdruck> [-f Falschstatus] [-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.
Ein String der die auszufuehrenden Befehle enthaelt. Dies kann eine komplette Kommandozeile mit Unix-Filtern sein.
Die Kommandozeile wird per 'sh' ausgefuehrt, so dass jedes gueltige Shell-Kommando bzw. jede gueltige Kommando-Verkettung verwendet werden kann.
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
Dieser Ausdruck ist ein ganz normaler PERL-Ausdruck, z.B.
| Operator | Bedeutung |
|---|---|
| '= n' | numerisch gleich |
| '< n' | numerisch kleiner als |
| '> n' | numerisch groesser als |
| 'eq s' | Zeichenkette gleich |
| 'ne s' | Zeichenkette ungleich |
| '=~/s/' | Mustervergleich stimmt |
| '!~/s/' | Mustervergleich stimmt nicht |
Bestimmt die Gespraechigkeit des Programms (kann mehrfach angegeben werden). Standardwert: 0
Ausgabe der Versionsinfo
Datentyp delta:
ERGEBNIS = (WERT2 - WERT1) / SEKUNDEN