The external module performs checks via external processes like more traditional monitoring systems. While this approach is far less efficient and does not scale well on a single system, it provides easier transition from existing monitoring systems. Checks should exit normally with an exit status of 0 for success, 1 or 2 for failure and 3 for unknown. Exiting with a status of 3 is highly discouraged. The standard output is provided as the status of the check.
The user under which the external checks should be executed.
The group under which the external checks should be executed.
The path under which all external commands to be executed will be located. Commands outside of this path will not be executed.
The default regular expression with which to parse Nagios data. Named values are "key", "value", and "uom" (unit of measurement)
The path to the command to be executed. This is the first argument to the execve system call.
The program name. If not specified, it is derived from the command argument. Normal interpolation rules apply.
The arguments to the program. The external module will start with arg1 and increment collecting arguments until argN is not found. Normal interpolation rules apply.
These parameters allow the setting of environment variables for the command execution. The text following env_ is the key and the parameter value is the value of the environment variable to be set via execve.
This is a regular expression that is globally applied to the stdout of the command. Each match is turned into a metric. It is a requirement to used named capturing in the regular expression where "key" is the named match of the metric name and "value" is the named match for the matric value. A sample for extracting performance data from Nagios commands would be: \S+)=(?[^;\s]+)(?=[;\s])]]>. "NAGIOS" may also be specified as a value, which will configure the external check to do Nagios parsing based on the nagios_regex module configuration parameter.
Checking a service via the /path/to/check_foo command.
The hypothetical check_foo command takes a target host with the -H parameter, runs a check and returns its health via exit code and stdout. We set the environment variable QUUX to the value BAZ. The check is against host 10.10.2.2.