0

I use rsyslog (8.37.0-13) on CentOS 8 (CentOS Linux release 8.1.1911) and I've type error with my configuration.

My configuration is :

template(name="template1" type="string" string="/data/%HOSTNAME%-%FROMHOST-IP%.log")
ruleset(name="ruleset1"){
                action(type="omfile" dynaFile="template1")
                action(type="omfwd" protocol="tcp" target="10.10.10.1" port="2020")
}
input(type="imtcp" port="2020" ruleset="ruleset1")

Errors are :

rsyslogd: error during parsing file /etc/rsyslog.d/conf1.conf, on or before line 6: parameter 'ruleset' not known -- typo in config file? [v8.37.0-13.el8 try http://www.rsyslog.com/e/2207 ]
rsyslogd: error during parsing file /etc/rsyslog.d/conf1.conf, on or before line 6: parameter 'port' not known -- typo in config file? [v8.37.0-13.el8 try http://www.rsyslog.com/e/2207 ]

I don't understand why I've this error.

I tried on CentOS 7 with rsyslod 8 (8.24.0-41) and I've no errors ...

Someone have any idea to fix it ?

Thanks


Update :

Now I've an error with omfile, rsyslog doesn't create new file.

When I precise "module(load="omfile")", and exec "rsyslogd -N1", I've :

rsyslogd: could not load module '/usr/lib64/rsyslog/builtint:omfile.so', dlopen: /usr/lib64/rsyslog/builtint:omfile.so: cannot open shared object file: No such file or directory  [v8.37.0-13.el8 try http://www.rsyslog.com/e/2066 ]

Someone have any idea to fix it ?

Thanks

celine
  • 13
  • 5

1 Answers1

0

Perhaps you forgot to load the imtcp module?

$ModLoad imtcp

or the newer syntax

module(load="imtcp" MaxSessions="500")
Gerard H. Pille
  • 2,569
  • 1
  • 13
  • 11