syslog-ng-users July 2011 archive
Main Archive Page > Month Archives  > syslog-ng-users archives
syslog-ng-users: [syslog-ng] can syslog-ng extract part of the h

[syslog-ng] can syslog-ng extract part of the hostname and make directory on the fly?

From: fedora fedora <fedorafans_at_nospam>
Date: Fri Jul 22 2011 - 14:28:35 GMT
To: syslog-ng@lists.balabit.hu

I have few hundreds of hosts, and say

hosta has dns name groupa-hosta

hostb has dns name groupbhostb

hostc has dns name groupc.hostc

..etc..etc (note the first 6 characters defines the group)

When a log comes in, can syslog-ng extracts the first 6 character from dns
name, and drop the log file to the corresponding group? (So log from hostb
will go under /log/groupb/groupahostb )

I cannot predefine the groups though, since i don't know how many groups
will be there, the only thing i know is the first 6 character of the
hostname will be the group name

thanks

______________________________________________________________________________
Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng
Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng
FAQ: http://www.balabit.com/wiki/syslog-ng-faq