title: how can i store in two index using two JSON formated log files using filebeat and output to elasticsearch
body: <p>below is my configuration file for filebeat which is present in /etc/filebeat/filebeat.yml,
  it throws an error of </p>
  
  <blockquote>
    <p>Failed to publish events: temporary bulk send failure</p>
  </blockquote>
  
  <pre><code>filebeat.prospectors:
    - paths:
       - /var/log/nginx/virus123.log
     input_type: log
     fields:
        type:virus123
     json.keys_under_root: true
  
  
     - paths:
       - /var/log/nginx/virus1234.log
       input_type: log
       fields:
         type:virus1234
       json.keys_under_root: true
  
  setup.template.name: "filebeat-%{[beat.version]}"
  setup.template.pattern: "filebeat-%{[beat.version]}-*"
  setup.template.overwrite: true
  
  processors:
   - drop_fields:
       fields: ["beat","source"]
  
  
  output.elasticsearch:
    index: index: "filebeat-%{[beat.version]}-%{[fields.type]:other}-%{+yyyy.MM.dd}"
  
    hosts: ["http://127.0.0.1:9200"]
  </code></pre>