【问题标题】:is there any easy way to push the data to elasticsearch via logstash有什么简单的方法可以通过logstash将数据推送到elasticsearch
【发布时间】:2020-07-05 04:45:00
【问题描述】:

这是我的logstash代码

input {
    file {
       path => "C:/Users/Rajaraman/Documents/logstashfiles/demo.txt"
       start_position => "beginning"
    }
}
filter {}
output {
    elasticsearch {
        hosts => ["localhost:9200"]
    }
}

Logstash 运行良好,但在弹性搜索中未创建索引

【问题讨论】:

  • 这个帖子应该有帮助:stackoverflow.com/a/59032554/4604579
  • 在弹性搜索上看不到数据流。但 logstatsh 运行良好[2020-03-25T12:26:43,805][INFO][logstash.inputs.file][main] No sincedb_path set, } [2020-03-25T12:26:44,572][INFO][logstash .agent ] 成功启动 Logstash API 端点 {:port=>9600}
  • 我在您提供的日志中看到No sincedb_path set。您是否将sincedb_path 设置添加到您的file 输入中,如链接线程中所示?
  • 到目前为止一切正常.. 感谢您的帮助

标签: elasticsearch logstash logstash-grok elasticsearch-5


【解决方案1】:

要检查您的 logstash 是否正在执行任何操作:

$ curl -XGET 'localhost:9600/_node/stats/events?pretty'
{
  "events" : {
    "in" : 293658,
    "filtered" : 293658,
    "out" : 293658,
    "duration_in_millis" : 2324391,
    "queue_push_duration_in_millis" : 343816
  }

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-07-16
    • 1970-01-01
    • 2021-06-07
    • 2011-08-30
    • 1970-01-01
    • 1970-01-01
    • 2017-02-01
    相关资源
    最近更新 更多