[rsyslog] How to make rsyslog create dir per host

Harry Putnam reader at newsguy.com
Tue Feb 23 16:11:18 CET 2010

Just getting started with rsyslog and finding the documentation pretty

Probably not the fault of the documentation but more my lack of

What I'd like to do is have rsyslog create a directory for incoming
foreign logs for each host that sends syslog info.

>From there, its ok if it all goes in a single log, inside the
directory for now, and I may work out some splitting scheme later.

So far, with help from posters here I've managed to get the logs
comming in from remote machines and logging to a file named after the
host. ...

I suspect I should be able to figure it out from the pages here (line
wrapped for mail): 
  http://wiki.rsyslog.com/index.php \

  $template DYNmessages,"/var/log/%HOSTNAME%/messages"

But I'd want the directory named for the host and include all logs from
that host, not just the `messages' log.

Not quite getting how to edit that line to make it happen.

More information about the rsyslog mailing list