【问题标题】:Logstash error to recreate Index for Elasticsearch为 Elasticsearch 重新创建索引的 Logstash 错误
【发布时间】:2015-12-30 12:37:21
【问题描述】:

我正在使用: - 弹性搜索-2.1.1 - kibana-4.3.1-linux-x64 -logstash-2.1.1 我遵循了本教程: https://www.elastic.co/guide/en/logstash/current/advanced-pipeline.html

然后,logstash 能够在 Elasticsearch 中创建索引。 在我删除弹性搜索中的索引后: curl -XDELETE http://localhost:9200/logstash-2015.12.30/ 然后我尝试使用新文件配置创建一个新索引,但 logstash 没有将新索引发送到 elasticsearch。

怎么了? 为什么logstash没有将新索引发送到elasticsearch? 这是某种错误吗?

我希望有人可以帮助我。

问候

【问题讨论】:

  • 您确定输入中的日志文件正在生成新的日志数据吗?

标签: elasticsearch logstash kibana


【解决方案1】:

这是因为 logstash 已经读取并处理了您的输入文件。 logstash 使用 sincedb 来跟踪它已经读取的位置。要在每次运行 logstash 时让 logstash 读取和处理您的输入,请在您的输入插件中对 /dev/null 使用“sincedb_path”选项,如下所示。

input {
     file {
     path => "/path/to/logstash-tutorial.log"
      start_position => beginning 
      sincedb_path => "/dev/null"
    }
  } 

查看此(how to use sincedb in logstash?) 链接了解更多信息。

【讨论】:

  • 太棒了。非常感谢。
猜你喜欢
  • 1970-01-01
  • 2015-05-27
  • 1970-01-01
  • 2021-01-16
  • 2016-01-19
  • 1970-01-01
  • 2016-02-21
  • 1970-01-01
  • 2016-06-07
相关资源
最近更新 更多