title: How to tail multiple files in fluentd
body: <p>I have setup fluentd logger and I am able to monitor a file by using fluentd <code>tail input</code> plugin. All the data is received by fluentd is later published to <code>elasticsearch</code> cluster. Below is the configuration file for fluentd:</p>
  
  <pre><code>&lt;source&gt;
    @type tail
    path /home/user/Documents/log_data.json
    format json
    tag myfile
  &lt;/source&gt;
  
  &lt;match *myfile*&gt;
    @type elasticsearch
    hosts 192.168.48.118:9200
    user &lt;username&gt;
    password &lt;password&gt;
    index_name fluentd
    type_name fluentd
  &lt;/match&gt;
  </code></pre>
  
  <p>As you can see I am monitoring <code>log_data.json</code> file by using <code>tail</code>. I also have a file in the same directory <code>log_user.json</code>, I want to monitor it also and publish it logs to <code>elasticsearch</code>. To do this, I thought of creating another <code>&lt;source&gt;</code> &amp; <code>&lt;match&gt;</code> with different tag but it started showing errors. </p>
  
  <p>How can I monitor multiple files in <code>fluentd</code> and publish them to <code>elasticsearch</code>. I see when we start <code>fluentd</code> its worker is started. Is it possible to start multiple worker so that each one of them is monitoring different files, or any other way of doing it. Can anyone point me to some good links/tutorials.</p>
  
  <p>Thanks.</p>