Hi Alexandre.

Am 13-06-2016 12:07, schrieb Alexandre DERUMIER:
Hi,

I would like to split logs by backend through rsyslog dynamicaly.

something like : /var/log/haproxy_($backend).log

I think it can be done with rsyslog $template like this tutorial
https://tehlose.wordpress.com/2011/10/10/a-log-file-for-each-virtual-host-with-haproxy-and-rsyslog/

but I don't have any idea how to create the template to get backend
name in the log.

Can somebody help me ?

Maybe the doc could help ;-)

http://cbonte.github.io/haproxy-dconv/configuration-1.6.html#8.2
http://cbonte.github.io/haproxy-dconv/configuration-1.6.html#8.2.4

%b   | backend_name

Hth

Aleks

Reply via email to