imptcp: Plain TCP Syslog¶
Module Name: |
imptcp |
Author: |
Purpose¶
Provides the ability to receive syslog messages via plain TCP syslog. This is a specialized input plugin tailored for high performance on Linux. It will probably not run on any other platform. Also, it does not provide TLS services. Encryption can be provided by using stunnel.
This module has no limit on the number of listeners and sessions that can be used.
Note
Reverse DNS lookups for remote senders are cached. Set the TTL via Reverse DNS caching.
Notable Features¶
Configuration Parameters¶
Note
Parameter names are case-insensitive; camelCase is recommended for readability.
Module Parameters¶
Parameter |
Summary |
---|---|
Sets the number of helper threads that pull data off the network. |
|
Limits the number of open sessions. |
|
Processes messages on the poller thread when feasible to reduce resource use. |
Input Parameters¶
These parameters can be used with the “input()” statement. They apply to the input they are specified with.
Parameter |
Summary |
---|---|
Selects the TCP port on which to listen. |
|
Specifies a Unix-domain socket path for the listener. |
|
Discards the remaining part of a message after truncation. |
|
Sets the owner of the Unix-domain socket by user name. |
|
Sets the owner of the Unix-domain socket by numeric UID. |
|
Sets the group of the Unix-domain socket by group name. |
|
Sets the group of the Unix-domain socket by numeric GID. |
|
Sets access permissions for the Unix-domain socket. |
|
Controls startup failure if changing socket owner, group, or mode fails. |
|
Unlinks a Unix-domain socket before listening and after closing. |
|
Sets the inputname property used for tagging messages and statistics. |
|
Binds the specified ruleset to this input. |
|
Sets the maximum frame size when using octet counted mode. |
|
Limits the number of open sessions. |
|
Specifies the local address to bind the listener to. |
|
Defines an additional ASCII frame delimiter for non-standard senders. |
|
Enables legacy octet-counted framing similar to RFC5425. |
|
Emits a message when a remote peer closes the connection. |
|
Emits a message when a remote peer opens a connection. |
|
Enables TCP keep-alive packets on the socket. |
|
Sets the number of unacknowledged keepalive probes before the connection is considered dead. |
|
Sets the interval between keepalive probes. |
|
Sets idle time before the first keepalive probe is sent. |
|
Specifies the rate-limiting interval in seconds. |
|
Sets the rate-limiting burst size in number of messages. |
|
Selects decompression mode matching compression used by omfwd. |
|
Throttles the sender when the receiver queue is nearly full. |
|
Detects a new message only when LF is followed by ‘<’ or end of input. |
|
Uses a regular expression to identify the start of the next message. |
|
Sets the listen() backlog for pending TCP connections. |
|
Sets a default time zone string. |
|
Ignores a leading space after a line feed to work around Cisco ASA framing issues. |
|
Writes the port number being listened on into the specified file. |
Statistic Counter¶
This plugin maintains statistics for each listener. The statistic is named “imtcp” , followed by the bound address, listener port and IP version in parenthesis. For example, the counter for a listener on port 514, bound to all interfaces and listening on IPv6 is called “imptcp(*/514/IPv6)”.
The following properties are maintained for each listener:
submitted - total number of messages submitted for processing since startup
Error Messages¶
When a message is to long it will be truncated and an error will show the remaining length of the message and the beginning of it. It will be easier to comprehend the truncation.
Caveats/Known Bugs¶
module always binds to all interfaces
Examples¶
Example 1¶
This sets up a TCP server on port 514:
module(load="imptcp") # needs to be done just once
input(type="imptcp" port="514")
Example 2¶
This creates a listener that listens on the local loopback interface, only.
module(load="imptcp") # needs to be done just once
input(type="imptcp" port="514" address="127.0.0.1")
Example 3¶
Create a unix domain socket:
module(load="imptcp") # needs to be done just once
input(type="imptcp" path="/tmp/unix.sock" unlink="on")
Support: rsyslog Assistant | GitHub Discussions | GitHub Issues: rsyslog source project
Contributing: Source & docs: rsyslog source project
© 2008–2025 Rainer Gerhards and others. Licensed under the Apache License 2.0.