ELK not passing metadata from filebeat into logstash
<p>Installed an ELK server via: <a href="https://www.digitalocean.com/community/tutorials/how-to-install-elasticsearch-logstash-and-kibana-elk-stack-on-centos-7" rel="nofollow">https://www.digitalocean.com/community/tutorials/how-to-install-elasticsearch-logstash-and-kibana-elk-stack-on-centos-7</a></p>

<p>It seems to work except for the filebeat connection; filebeat does not appear to be forwarding anything or at least I can't find anything in the logs to indicate anything is happening.  </p>

<p>My filebeat configuration is as follows:</p>

<pre><code>filebeat:
  prospectors:
    -
  paths:
     - /var/log/*.log
     - /var/log/messages
     - /var/log/secure
  encoding: utf-8
  input_type: log
  timeout: 30s
  idle_timeout: 30s
  registry_file: /var/lib/filebeat/registry
output:
  logstash:
    hosts: ["my_elk_fqdn:5044"]
    bulk_max_size: 1024
    compression_level: 3
    worker: 1
    tls:
      certificate_authorities: ["/etc/pki/tls/certs/logstash-forwarder.crt"]
shipper:
logging:
  to_files: true
  files:
    path: /var/log/filebeat
    name: filebeat.log
    rotateeverybytes: 10485760 # = 10MB
    keepfiles: 7
  level: debug
</code></pre>

<p>The log file output I keep getting from filebeat is just not very helpful:</p>

<pre><code>2016-07-14T17:32:21-04:00 DBG  Start next scan
2016-07-14T17:32:31-04:00 DBG  Start next scan
2016-07-14T17:32:41-04:00 DBG  Start next scan
2016-07-14T17:32:46-04:00 DBG  Flushing spooler because of timeout. Events flushed: 0
2016-07-14T17:32:51-04:00 DBG  Start next scan
</code></pre>

<p>Is there anything wrong with my configuration file?  </p>

<p>When I test on the ELK server to see if I am getting anything:</p>

<pre><code>[root@my_elk_server ~]# curl -XGET 'http://localhost:9200/filebeat-*/_search?pretty'
{
  "took" : 1,
  "timed_out" : false,
  "_shards" : {
    "total" : 0,
    "successful" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : 0,
    "max_score" : 0.0,
    "hits" : [ ]
  }
}
</code></pre>

<p>Oh and my logstash configuration for filebeats:</p>

<pre><code>input {
  beats {
    port =&gt; 5044
    ssl =&gt; true
    ssl_certificate =&gt; "/etc/pki/tls/certs/logstash-forwarder.crt"
    ssl_key =&gt; "/etc/pki/tls/private/logstash-forwarder.key"
  }
}
</code></pre>

<p>UPDATE:  It is not filebeat.  Somewhat relieved that messages are indeed being passed but still have an issue I can't track:</p>

<p>Discovered it wasn't filebeat that was causing the issue.  It appears that the configuration file in logstash to send to elasticsearch is not properly labeling the index (and the type) to make it searchable as shown in the question.  Instead of putting filebeat in the index name it gives a result like this:</p>

<pre><code>"_index" : "%{[@metadata][beat]}-2016.07.14",
</code></pre>

<p>The elasticsearch output put in the file turned out to be incorrect in the </p>

<pre><code>output {
  elasticsearch {
    hosts =&gt; "my_elk_fqdn:9200"
    sniffing =&gt; true
    manage_template =&gt; false
    index =&gt; "%{[@metadata][beat]}-%{+YYYY.MM.dd}"
    document_type =&gt; "%{[@metadata][type]}"
  }
}
</code></pre>

<p>Apparently this @metadata is not being passed in correctly.  Has anyone been able to get the _index and _type fields to populate correctly???</p>

<p>This might be a bug with filebeat??
<a href="https://github.com/logstash-plugins/logstash-input-beats/issues/6" rel="nofollow">https://github.com/logstash-plugins/logstash-input-beats/issues/6</a></p>