Unix Domain Sockets (om_uds)
This module allows log messages to be sent to a Unix domain socket. Unix systems traditionally have a /dev/log or similar socket used by the system logger to accept messages. Applications use the syslog(3) system call to send messages to the system logger. NXLog Agent can use this module to send logs to another syslog daemon via the socket.
Configuration
The om_uds module accepts the following directives in addition to the common module directives.
File permissions
The following directives are for specifying permissions for the created socket, pipe, or, file.
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. |
|||
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.
|
|||
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
See the OutputType directive in the list of common module directives.
If UDSType is set to |
|
This specifies the path of the Unix domain socket.
The default is |
|
This directive specifies the domain socket type.
Supported values are |
Examples
This configuration reads log messages from a file, adds BSD Syslog headers with default fields, and writes the messages to socket.
<Extension syslog>
Module xm_syslog
</Extension>
<Input file>
Module im_file
File "/var/log/custom_app.log"
</Input>
<Output uds>
Module om_uds
# Defaulting Syslog fields and creating Syslog output
Exec parse_syslog_bsd(); to_syslog_bsd();
UDS /dev/log
</Output>
<Route file_to_uds>
Path file => uds
</Route>