how to use variables or tags in the fluentd config?

Viewed 134

the config on the host server, I need some way with the two servers to put the logs in /tmp/task/<hostname/<file_name> , for example /tmp/task/app1/auth.log or /tmp/task/app2/auth.log on servers app1 and app2 all messages are marked with the tag .var.log.*, where * is the file name, and - hostname of the source of logs

<source>
    @type forward
</source>

<match *.localfile>
   @type copy
   <store>
     @type file
     path /tmp/task/*
     <buffer>
        timekey 1m
     </buffer>
   </store>
</match>
0 Answers
Related