Did you try to simply add %$hour% ?

E.g. "/var/log/NIPFW/MX480/CGNAT_PL_%$year%.%$month%.%$day%.%$hour%"

https://www.rsyslog.com/doc/v8-stable/configuration/properties.html

Flo

On Tue, Mar 5, 2019 at 2:04 PM sarjit yadav via rsyslog <
[email protected]> wrote:

> Hello All,
>
> I have implemented syslog server on CentOS and using below *Template *to
> generate output file names -
>
>
> *$template TmplNationalIP_PL,
> "/var/log/NIPFW/MX480/CGNAT_PL_%$year%.%$month%.%$day%"*
> *if ($msg contains 'OR_NAT' and $msg contains '55.91.165.') then
> ?TmplNationalIP_PL*
> *& ~*
>
>
> Similar to above (*daily*), I am looking to have syslog splitted output
> file names *HOURLY *(instead of daily).
>
> Can you please suggest how I can split syslog messages on HOURLY basis  as
> I couldn't find any variables to be used to have HOURLY in output file
> names ?
>
> Many thanks in advance.
>
>
> --
>
> Regards
>
> Sarjit Singh
>
> *(**:  +91-8806664923*
> _______________________________________________
> 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.
>
_______________________________________________
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