Hello Michael,
you have to define a template and use the correct syntax for dynafiles.
Example (old syntax):
$template DynafileTemplate,"/var/log/%HOSTNAME%/mm_messages"
.info;mail.none ?DynafileTemplate
Example (new, preferred syntax):
template (name="DynafileTemplate" type="string"
string="/var/log/%HOSTNAME%/mm_messages")
.info;mail.none action(type="omfile" dynafile="DynafileTemplate"
sync="on" ioBufferSize="64k" Template="RSYSLOG_TraditionalFileFormat")
Regards
und freundlicher Gruß
Ansgar
Am 21.11.2020 um 16:07 schrieb Michael Musiol via rsyslog:
Im using in rsyslog.conf the simplest possible change:
##### RULES #####
*.info;mail.none; ....... /var/log/%HOSTNAME%/mm_messages
with "ls /var/log/"
i find the directory %Hostname%, witihn there the logfile.
screenshots attached
Mit freundlichem Gruß,
Michael
------ Originalnachricht ------
Von: "Rainer Gerhards" <[email protected]>
An: "Michael Musiol" <[email protected]>; "rsyslog-users"
<[email protected]>
Gesendet: 21.11.2020 11:51:42
Betreff: Re: [rsyslog] noob problen configuring rsyslog
I guess I know what you mean, but can you post a config snippet with
this configuration?
Rainer
El sáb., 21 nov. 2020 a las 11:41, Michael Musiol via rsyslog
(<[email protected]>) escribió:
Hi all,
sadly .... im facing a problem to very basic configuration in rsyslog.
im using the well known message and path formats, so special stuff ....
but:
when im changing any path for logs, such as /var/log/messages to one
with variables such as /var/log/%HOSTNAME%/messages the logs will
occur
under a path '%HOSTNAME%' not the exceted "localhost.localdomain"
Sorry ascing this, but in did not find any hint on such error while
googling.
thanks a lot for helping (hopefully)
Michael
_______________________________________________
rsyslog mailing list
https://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
https://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
https://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.