What order does rsyslog process configuration files in /etc/rsyslog.d?
Asked Answered
A

1

8

I have several configuration files in /etc/rsyslog.d, e.g., 01-templates.conf, 02-error-logs.conf, 03-system-logs.conf, and have the following line in my /etc/rsyslog.conf file

# Include all config files in /etc/rsyslog.d/
$IncludeConfig /etc/rsyslog.d/*.conf

What order do the /etc/rsyslog.d/*.conf files get loaded in? Where is this documented? I read the Rsyslog configuration page but did not see it.

Adhern answered 31/8, 2016 at 15:17 Comment(1)
Please let me know if you find out the documentation for the same. I am also curious to find the official documentation for this.Gambado
I
5

According to this and this post to the rsyslog-users mailing list, it's processed in alphabetical order.

But with the exception of some 7.2.x and 7.3.x versions where a bug caused them to be read in reverse order.

Istle answered 20/4, 2017 at 7:25 Comment(1)
This can also be found in the documentation where it says if multiple files are included, they are processed in ascending sort order of the file name. We use the “glob()” C library function for obtaining the sorted list. On most platforms, especially Linux, this means the sort order is the same as for bash.Shalondashalt

© 2022 - 2024 — McMap. All rights reserved.