[syslog-ng] Using Regex information for destination

James Whitt phikapjames at gmail.com
Mon Jan 28 20:55:45 CET 2008


I had asked this question about a year ago, but was told to wait for the new
2.0 version.  I'm currently running the latest syslog-ng 2.0.7.

What I would like to do is put the line in a specific file based on part of
the hostname.  For example:

Hostname: subdomain.domain.tld

destination customer_firewall_logs {
file("/logs/$TLD/$DOMAIN/$SUBDOMAIN/$R_YEAR-$R_MONTH-$R_DAY.log"); };

WHERE $TLD is the tld of the hostname, $DOMAIN is the domain from the
hostname, and $SUBDOMAIN is teh subdomain from the hostname.  I would like
to be able to regex this information out of the hostname to use in the
destination.  Is this possible and any tips on getting it to work correctly
would be greatly appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.balabit.hu/pipermail/syslog-ng/attachments/20080128/f3ce994e/attachment.htm 


More information about the syslog-ng mailing list