There are two places syslog-ng gets host names from -- firstly there is a macro (FROM_HOST ??) which is the name of the machine that syslog-ng received the record from and then there is the HOST macro with contains the the name that was in the hostname field of the syslog record. So, as I see it there are two possible ways to map all the different names to one. Firstly you could relay the syslog records through another machine so they all get the same hostname or secondly you may be able to tweak syslog on the source machine to write the records with a the name server0 in them. I know this isn't exactly what you asked but I don't think there is any way of directly fiddling with the hostname, I'm sure Balasz will correct me if I'm wrong. mobidyc wrote:
Hello,
i want to use syslog-ng to receive and log messages, the goal is to write log messages to: /appli/syslog-ng/logs/server0/messages
but server0 can have multiples names: server0 server0e1 server0e2 server0g1 server0g2 server0gt1 etc...
how can retrieve the name "server0" only ?
Regards, Mobidyc
_______________________________________________ syslog-ng maillist - syslog-ng@lists.balabit.hu https://lists.balabit.hu/mailman/listinfo/syslog-ng Frequently asked questions at http://www.campin.net/syslog-ng/faq.html