On Mon, 18 Aug 2014, [email protected] wrote:

Is it possible to make hostname-specific $IncludeConfig statements in 
rsyslog.conf?

For example, If I arrange a shared /etc/rsyslog.d directory as

        /etc/rsyslog.d
                common-app1.conf
                common-app2.conf
                ...
                common-appN.conf
                /hostname1/
                        hostname1-app1.conf
                /hostname2/
                        hostname2-app1.conf

I'd like to be able to do something equivalent to

        $IncludeConfig /etc/rsyslog.d/*.conf
        $IncludeConfig /etc/rsyslog.d/$hostname/*.conf

So that any give host includes all the 'common' configs, as well as its 
host-specific ones.

That config ^^ doesn't cause any errors on rsyslog startup.  It also doesn't 
work -- the $hostname-specific directory's files are NOT included.

Can you do this in rsyslog?  I'm running rsyslogd 8.2.2, fyi.

I don't believe so, you can't use variables everywhere, only where it's been specifically setup.

make a symlink to the file from a common name at bootup and have rsyslog include that.

David Lang


Terry
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of 
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE 
THAT.

_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of 
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE 
THAT.

Reply via email to