A monitor class to exec a script/program on the OS. This allows you
to hook up an external script or program to the monitoring system with the flexibility to determine success/failure by return value or by comparing output with an expected (regex) pattern. The default test is to test the output of the script/program and if it is nullstring (''), then the check is deemed to be successful, otherwise not. There is also a flag, in the constructor ($publish_output) which, if true, directs the monitor to include any script output in the email or SMS messages. This can sometimes be useful for providing extra information in error reports.
Located in /monitor-defs.php (line 208)
generic_monitor | --exec_monitor
Define a new exec check object.
Make the check by executing the script/program which has been
specified. We check that this exists and is executable, and raise warnings if not. The success/failure of the check is determined by the settings, but is either done via return code or by returned output matching.
Allows you to specify a regular expression which will be applied to the output of the executed script/program and if matched will be taken to mean the check was successful. If specified, this takes the place of the default behaviour of checking the return code.
Allows you to specify a string value which, if returned as output by the called script/program, will indicate success.
The default value for success is already nullstring, so no need to specify it in that particular case.
Documentation generated by phpDocumentor 1.3.0RC3