imdiag: Diagnostic instrumentation¶
- Module Name:
imdiag
- Author:
Rainer Gerhards
- Available since:
at least 5.x
Purpose¶
The imdiag input module exposes a TCP-based diagnostics and control channel that can inject messages into the main queue, wait for queues to drain, coordinate statistics reporting, and exercise other helper functions used by the rsyslog testbench. While imdiag is primarily intended for automated testing, it can also be used to diagnose production systems. Because the interface permits queue control and message injection, it must only be exposed to trusted hosts.
Configuration Parameters¶
Note
Parameter names are case-insensitive; camelCase is recommended for readability.
Module Parameters¶
Parameter |
Summary |
---|---|
Starts a watchdog thread that aborts rsyslog if it runs longer than the configured time limit. |
|
Sets the flow-control classification applied to messages injected by imdiag. |
|
Limits the number of concurrent diagnostic control connections accepted. |
Input Parameters¶
Parameter |
Summary |
---|---|
Writes the port chosen for the diagnostic listener to the named file. |
|
Creates the imdiag TCP listener on the specified port ( |
|
Accepts a numeric stream driver mode value, but imdiag forces the plain TCP driver so the setting is ignored. |
|
Accepts a stream driver authentication mode string, but imdiag always uses the plain TCP driver so the value has no effect. |
|
Accepts permitted peer identifiers for compatibility, but the plain TCP driver used by imdiag does not enforce them. |
|
Overrides the |
Examples¶
Minimal configuration for testbench integration¶
This example loads imdiag
, starts the diagnostic listener on an
ephemeral port, and records the chosen port for the testbench to read.
module(load="imdiag")
input(type="imdiag"
listenPortFileName="/var/run/rsyslog/imdiag.port"
serverRun="0")
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.