111.6. Program (om_exec)
This module will execute a program or script on startup and write
(pipe) log data to its standard input. Unless
OutputType is set to something else,
only the contents of the $raw_event
field are sent over the
pipe. The execution of the program or script will terminate when the
module is stopped, which usually happens when NXLog exits and
the pipe is closed.
Note
|
The program or script is started when NXLog starts and must not exit until the module is stopped. To invoke a program or script for each log message, use xm_exec instead. |
111.6.1. Configuration
The om_exec module accepts the following directives in addition to the common module directives. The Command directive is required.
- Command
-
This mandatory directive specifies the name of the program or script to be executed.
- Restart
-
Restart the process if it exits. There is a one second delay before it is restarted to avoid a denial-of-service when a process is not behaving. Looping should be implemented in the script itself. This directive is only to provide some safety against malfunctioning scripts and programs. This boolean directive defaults to FALSE: the Command will not be restarted if it exits.