ListenPortFileName

Writes the listener’s port number into the given file.

This parameter applies to imtcp: TCP Syslog Input Module.

Name:

ListenPortFileName

Scope:

input

Type:

string (see String Constants)

Default:

input=none

Required?:

no

Introduced:

8.38.0

Description

Specifies a file name into which the port number this input listens on is written. It is primarily intended for cases when port is set to 0 to let the OS assign a free port number. This parameter was introduced for testbench scenarios that use dynamic ports.

Note

If this parameter is set, port="0" is permitted. Otherwise, the port defaults to 514.

Input usage

input(type="imtcp" port="0" listenPortFileName="/tmp/imtcp.port")

See also

See also imtcp: TCP Syslog Input Module.


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.