This module initiates a TCP connection to a remote host and transfers log messages. Or, in Listen mode, this module accepts client connections and multiplexes data to all connected clients. The TCP transfer protocol provides more reliable log transmission than UDP. If security is a concern, consider using the om_ssl module instead.
The module will connect to this IP address or DNS hostname. Or, if Listen is set to TRUE, the module will listen for connections on this address.
The module will connect to this port number on the remote host. Or, if Listen is set to TRUE, the module will listen for connections on this port. The default is port 514.
This optional directive specifies the local port number of the connection. This directive only applies if Listen is set to FALSE. If this is not specified a random high port number will be used, which is not always ideal in firewalled network environments.
If set to TRUE, this boolean directive specifies that events should be queued if no client is connected. If this module’s buffer becomes full, the preceding module in the route will be paused or events will be dropped, depending on whether FlowControl is enabled. This directive only applies if Listen is set to TRUE. The default is FALSE: om_tcp will discard events if no client is connected.
This directive has been deprecated as of version 2.4. The module will try to reconnect automatically at increasing intervals on all errors.
The following procedures are exported by om_tcp.
Force a reconnection. This can be used from a Schedule block to periodically reconnect to the server.