[rsyslog] case sensitivity in templates

Joe Williams joe at joetify.com
Thu Sep 3 18:02:58 CEST 2009


BTW, if anyone else has this problem or something similar the doc is at:

http://www.rsyslog.com/module-Static_Docs-view-f-property_replacer.html.phtml

The fix was changing the template to be:

$template
PerHostDebug,"/srv/rsyslog/%$YEAR%/%$MONTH%/%$DAY%/%HOSTNAME:::lowercase%/debug"

Thanks again.

-Joe


On Thu, 3 Sep 2009 08:51:23 -0700
Joe Williams <joe at joetify.com> wrote:

> Thanks, that worked perfectly.
> 
> -Joe
> 
> 
> On Thu, 3 Sep 2009 07:47:14 +0200
> "Rainer Gerhards" <rgerhards at hq.adiscon.com> wrote:
> 
> > You need to check the property replacer documentation. There are
> > options for case conversion. I don't know the exact syntax out of my
> > head, but it is along the lines of %field:::ucase%.
> > 
> > Hth
> > rainer
> > 
> > ----- Ursprüngliche Nachricht -----
> > Von: "Joe Williams" <joe at joetify.com>
> > An: "rsyslog at lists.adiscon.com" <rsyslog at lists.adiscon.com>
> > Gesendet: 03.09.09 05:19
> > Betreff: [rsyslog] case sensitivity in templates
> > 
> > 
> > Hello, I am new to the list sorry if this has been covered already.
> > I am logging using a per-host template like:
> > 
> > $template
> > PerHostDebug,"/srv/rsyslog/%$YEAR%/%$MONTH%/%$DAY%/%HOSTNAME%/debug"
> > 
> > The services that log directly to the rsyslog server (haproxy, etc)
> > are using all lower case hostname directories where as the logs that
> > use the rsyslog client daemon to log to the server are using the
> > case specified in the hostname which in my case have capital
> > letters in them.
> > 
> > Is there any way to specify which to use? I would like to have a
> > single directory for each host regardless of the case used in the
> > hostname. It doesn't matter to me which case is used as long as it's
> > the same for all logs.
> > 
> > Thanks.
> > 
> > -Joe
> > 
> > 
> 
> 


-- 
Name: Joseph A. Williams
Email: joe at joetify.com
Blog: http://www.joeandmotorboat.com/



More information about the rsyslog mailing list