The original examples were provided as pieces of a working configuration...

template(name="dynaName" type="string" string="/soft/rsyslog/%hostname%.log")

*.debug {
  action(
    type="omfile"
    name="debugActionName"
    template="templateName"
    dynafile="dynaName"
  )
}

*.info {
  action(
    type="omfile"
    name="infoActionName"
    template="templateName"
    file="/soft/rsyslog/everything.info.log"
  )
}

It was corrupted somewhere to...

*.info {
  action(
    type="omfile"
    name="debugActionName"
    template="dynaName"
    dynafile="dynaName"
  )
}

...and as noted by others, using "dynaName" as the specification for both template and dynafile is causing the behavior you see.

The original example does not provide the code for template="templateName".  In fact, if you remove the template specifications entirely from the original examples perhaps it is easier to understand the difference.  As such, perhaps this is a better example...

template(name="dynaName" type="string" string="/soft/rsyslog/%hostname%.debug.log")

*.debug {
  action(
    type="omfile"
    name="debugActionName"
    dynafile="dynaName"
  )
}

*.info {
  action(
    type="omfile"
    name="infoActionName"
    file="/soft/rsyslog/everything.info.log"
  )
}

Regards,



On 10/31/18 11:22 AM, David Lang wrote:
On Wed, 31 Oct 2018, sophie.loewenthal--- via rsyslog wrote:

#2 ----------------------------
*.info {
  action(
    type="omfile"
    name="debugActionName"
    template="dynaName"
    dynafile="dynaName"
  )
}
This above part does not work well ;)  The log files per host are filled with this, where sysl2 is the name of %hostname%  and the template is : template(name="dynaName" type="string" string="/soft/rsyslog/%hostname%.log") /soft/rsyslog/sysl2.log/soft/rsyslog/sysl2.log/soft/rsyslog/sysl2.log/soft/rsyslog/sysl2.log/soft/rsyslog/sysl2.log/soft/rsyslog/sysl2.log/soft/rsyslog/sysl2.log/soft/rsyslog/sysl2.log/soft/rsyslog/sysl2.log/soft/rsyslog/sysl2.log/soft/rsyslog/sysl2.log/soft/rsyslog/sysl2.log/soft/rsyslog/sysl2.log/soft/rsyslog/sysl2.log/soft/rsyslog/sysl2.log/soft/rsyslog/sysl2.log/soft/rsyslog/sysl2.log/soft/rsyslog/sysl2.log/soft/rsyslog/sysl2.log/soft/rsyslog/sysl2.log/soft/rsyslog/sysl2.log/soft/rsyslog/sysl2.log/soft/rsyslog/sysl2.log/soft/rsyslog/sysl2.log/soft/rsyslog/sysl2.log/soft/rsyslog/sysl2.log/soft/rsyslog/sysl2.log/soft/rsyslog/sysl2.logbe-s

template is what to write in the file
dynafile is the path to write to

you are saing to write the path into the file (and with no newline, you get just one long line with the path repeating)

David Lang
_______________________________________________
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