El sáb., 21 nov. 2020 a las 16:07, Michael Musiol (<m...@mdmm.de>) escribió: > > > > Im using in rsyslog.conf the simplest possible change: > > ##### RULES ##### > *.info;mail.none; ....... /var/log/%HOSTNAME%/mm_messages
That's what I thought. This is a bit wrong. You need to define a template to be used for the file name - because the above could actually mean the path literally. Out of my head, I do not remember the old syntax, but you can copy&paste the following in your config instead of that line: template(name="filename" type="string" string="/var/log/%HOSTNAME%/mm_messages") *.info;mail.none; ....... action(type="omfile" dynafile="filename") HTH, Rainer > > with "ls /var/log/" > i find the directory %Hostname%, witihn there the logfile. > > screenshots attached > > > > > > > Mit freundlichem Gruß, > Michael > > > > ------ Originalnachricht ------ > Von: "Rainer Gerhards" <rgerha...@hq.adiscon.com> > An: "Michael Musiol" <m...@mdmm.de>; "rsyslog-users" > <rsyslog@lists.adiscon.com> > 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 > >(<rsyslog@lists.adiscon.com>) 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.