Named Pipes (im_pipe)

This module can be used to read log messages from named pipes on UNIX-like operating systems.

Configuration

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

CreateDir

If set to TRUE, this optional boolean directive instructs the module to create the directory where the Pipe pipe file is located, if it does not already exist. The default is FALSE.

Pipe

This mandatory directive specifies the name of the input 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.


InputType

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

Group

Use this directive to set the group ownership for the created socket or pipe or file. By default, this is the group NXLog is running as, (which may be specified by the global Group directive). This directive is not currently supported on Windows.

Perms

This directive specifies the permissions to use for the created socket or pipe or file. This must be a four-digit octal value beginning with a zero. By default, OS default permissions will be set. This directive is not currently supported on Windows.

User

Use this directive to set the user ownership for the created socket or pipe or file. By default, this is the user NXLog is running as (which may be specified by the global User directive). This directive is not currently supported on Windows.

Examples

This example provides the NXLog configuration for processing messages from a named pipe on a UNIX-like operating system.

Example 1. Forwarding Logs From a Pipe to a Remote Host

With this configuration, NXLog reads messages from a named pipe and forwards them via TCP. No additional processing is done.

nxlog.conf
<Input in>
    Module    im_pipe
    Pipe      "tmp/pipe"
</Input>

<Output out>
    Module    om_tcp
    Host      192.168.1.2
    Port      514
</Output>