Named Pipes (om_pipe)

This module allows log messages to be sent to named pipes on UNIX-like operating systems.

Configuration

The om_pipe module accepts the following directives in addition to the common module directives.

Required directives

The following directive is required for the module to start.

Pipe

This mandatory directive specifies the name of the output pipe file. The module checks if the specified pipe file exists and creates it in case it does not. If the specified pipe file is not a named pipe, the module does not start.

File permissions

The following directives are for specifying permissions for the created socket, pipe, or, file.

Group

Set this directive to specify the group who owns the created socket, pipe, or file.

The default is the group set by the global Group directive. This directive does not work on Windows.

Perms

Set this directive to specify the permissions for the created socket, pipe, or file. Enter the value as a four-digit octal number starting with zero.

The default is the operating system’s default permissions. This directive does not work on Windows.

If the path includes non-existent directories, NXLog Agent adds execute permission (allowing directory browsing) to each newly created directory along the path for the current user.

User

Set this directive to specify the user who owns the created socket, pipe, or file.

The default is the user set by the global User directive. This directive does not work on Windows.

Optional directives

OutputType

This directive specifies the input data format. The default value is LineBased. See the OutputType directive in the list of common module directives.

Examples

This example provides the NXLog Agent configuration for forwarding messages to a named pipe on a UNIX-like operating system.

Example 1. Forwarding Logs From a File to a Pipe

With this configuration, NXLog Agent reads messages from a file and forwards them to a pipe. No additional processing is done.

nxlog.conf
<Input in>
    Module    im_file
    File      "/tmp/input"
</Input>

<Output out>
    Module    om_pipe
    Pipe      "/tmp/output"
</Output>