I have recently begun the process of updating our rather extensive
rsyslog infrastructure from v5.8.13 to v7.4.3; while so far it has been
mostly smooth, I am running into an issue with a template we have to
create dynamically-named log files. This is the template we created with
our old v5 configs:

$template EventArchive, "/logs/events/%$year%_%$month%/%$day%/event-%
$now%-%$hour%-%$qhour%.gz"

Then later it is called with:

$OMFileZipLevel 6
*.* -?EventArchive

This would put all the files from 1215-1230 on 3 Sept 2013 in a file
named:

/logs/events/2013_09/03/event-2013-09-03-01.gz

However, I'm running into an issue now where the $qhour variable is
always resolving to 00 ever since upgrading to v7.4.3. As far as I can
tell from the docs, $qhour should still resolve properly in v7; I don't
see any complaints about this from rsyslog when I run the configs
through debug mode. Any idea why this is happening?

If I'm going to rewrite these in the v7 syntax, is this what I want to
do?

template(name="EventArchive" type="string" string="/logs/events/%$year%_
%$month%/%$day%/event-%$now%-%$hour%-%$qhour%.gz")

$OMFileZipLevel 6
*.* -?EventArchive



_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of 
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE 
THAT.

Reply via email to