I have Red Hat 9.2 with rsyslog v8.2102.0-113.el9_2.1.
I use default /etc/rsyslog.conf and a custom configuration called vums.conf located in /etc/rsyslog.d/
.
module(load="imfile")
input(type="imfile"
File="/opt/wildfly/standalone/log/server.log"
Tag="wildly")
When I restart the rsyslog I see the following error when I run systemctl status rsyslog:
[root@konor2 rsyslog.d]# systemctl status rsyslog
● rsyslog.service - System Logging Service
Loaded: loaded (/usr/lib/systemd/system/rsyslog.service; enabled; preset: enabled)
Active: active (running) since Wed 2023-12-20 07:32:55 CET; 1s ago
Docs: man:rsyslogd(8)
https://www.rsyslog.com/doc/
Main PID: 574855 (rsyslogd)
Tasks: 4 (limit: 36037)
Memory: 1.4M
CPU: 23ms
CGroup: /system.slice/rsyslog.service
└─574855 /usr/sbin/rsyslogd -n
Dec 20 07:32:55 konor2 systemd[1]: Starting System Logging Service...
Dec 20 07:32:55 konor2 rsyslogd[574855]: module 'imfile' already in this config, cannot be added [v8.2102.0-113.el9_2.1 try https://www.rsyslog.com/e/2221 ]
Dec 20 07:32:55 konor2 rsyslogd[574855]: [origin software="rsyslogd" swVersion="8.2102.0-113.el9_2.1" x-pid="574855" x-info="https://www.rsyslog.com"] start
Dec 20 07:32:55 konor2 systemd[1]: Started System Logging Service.
Dec 20 07:32:55 konor2 rsyslogd[574855]: imjournal: journal files changed, reloading... [v8.2102.0-113.el9_2.1 try https://www.rsyslog.com/e/0 ]
The error tells me that "module 'imfile' already in this config, cannot be added". In case I commented the module(load="imfile")
line I receive the following error:
[root@konor2 rsyslog.d]# systemctl status rsyslog
● rsyslog.service - System Logging Service
Loaded: loaded (/usr/lib/systemd/system/rsyslog.service; enabled; preset: enabled)
Active: active (running) since Wed 2023-12-20 07:34:54 CET; 1s ago
Docs: man:rsyslogd(8)
https://www.rsyslog.com/doc/
Main PID: 576081 (rsyslogd)
Tasks: 3 (limit: 36037)
Memory: 5.1M
CPU: 23ms
CGroup: /system.slice/rsyslog.service
└─576081 /usr/sbin/rsyslogd -n
Dec 20 07:34:54 konor2 systemd[1]: Starting System Logging Service...
Dec 20 07:34:54 konor2 rsyslogd[576081]: input module name 'imfile' is unknown [v8.2102.0-113.el9_2.1 try https://www.rsyslog.com/e/2209 ]
Dec 20 07:34:54 konor2 systemd[1]: Started System Logging Service.
Dec 20 07:34:54 konor2 rsyslogd[576081]: error during parsing file /etc/rsyslog.d/vums.conf, on or before line 13: parameter 'Tag' not known -- typo in config file? [v8.2102.0-113.el9_2.1 try https:>
Dec 20 07:34:54 konor2 rsyslogd[576081]: error during parsing file /etc/rsyslog.d/vums.conf, on or before line 13: parameter 'File' not known -- typo in config file? [v8.2102.0-113.el9_2.1 try https>
Dec 20 07:34:54 konor2 rsyslogd[576081]: input module name 'imfile' is unknown [v8.2102.0-113.el9_2.1 try https://www.rsyslog.com/e/2209 ]
Dec 20 07:34:54 konor2 rsyslogd[576081]: error during parsing file /etc/rsyslog.d/vums.conf, on or before line 13: parameter 'Tag' not known -- typo in config file? [v8.2102.0-113.el9_2.1 try https:>
Dec 20 07:34:54 konor2 rsyslogd[576081]: error during parsing file /etc/rsyslog.d/vums.conf, on or before line 13: parameter 'File' not known -- typo in config file? [v8.2102.0-113.el9_2.1 try https>
Dec 20 07:34:54 konor2 rsyslogd[576081]: [origin software="rsyslogd" swVersion="8.2102.0-113.el9_2.1" x-pid="576081" x-info="https://www.rsyslog.com"] start
Dec 20 07:34:54 konor2 rsyslogd[576081]: imjournal: journal files changed, reloading... [v8.2102.0-113.el9_2.1 try https://www.rsyslog.com/e/0 ]
The error tells that "*input module name 'imfile' is unknown*".
I checked both files mentioned above and there is no duplicate load configuration for the module. I also performed stop, checked if the process was down and start of the daemon, but the result was the same.
How to configure rsyslog to be able to use the imfile module and the input definition without the errors above?
EDIT1: There are just 2 files with config:
- /etc/rsyslog.conf
- /etc/rsyslog.d/vums.conf
In
/etc/rsyslog.conf
, there is the following line for loading of the custom configurations.
include(file="/etc/rsyslog.d/*.conf" mode="optional")
The module(load=imfile)
line is just in the vums.conf
file.
rsyslog
config files such as/etc/rsyslog.conf
?vums.conf
has themodule(load=imfile)
line.