2017-06-13 122 views
0

我试图通过logstash摄入metricbeat文件输出,但logstash没有在elasticsearch中创建任何索引。下面是我logstash .conf文件Logstash无法在metricsearch文件输出的elasticsearch中创建索引

input { 
      file { 
      type => "my-metricbeat" 
      path => ["C:/tmp/metricbeat/metric*"] 
      codec => "json" 
      start_position => beginning 
      sincedb_path => "/dev/null" 
      } 
     } 
     output { 
      if([type] == "my-metricbeat") { 
       elasticsearch { 
       hosts => "http://localhost:9200" 
       index => "metricbeat-test-%{+YYYY.MM.dd}" 
       } 
} 
     stdout { codec => rubydebug } 
     } 

ELK版本5.2.1

回答

0

我看到你的输出缺少支架。

+0

这是一个小姐......但问题仍然存在。 –

+0

您是否在管理下的索引模式中添加了Kibana中的索引?另外,你是否在你的LS日志中发现任何错误,只是为了确保你没有遗漏你的过滤器中的任何东西? bin/logstash --path.settings /etc/logstash -f /etc/logstash/conf.d/test_pipeline.conf --config.test_and_exit使用此命令验证您的配置文件是否正常并且没有重大错误。 – Zee

+0

是的,我从管理控制台添加了Kibana的索引。我在Windows机器上安装了ELK堆栈,并且在LS文件夹内没有看到任何LS日志。我在“C:/ tmp/metricbeat/metricbeat”位置将度量标准输出推送到文件,并试图直接在LS中摄取此文件以在ES中创建索引。在读取metricbeat文件输出时,LS不会在ES中创建任何索引。 –

相关问题