【问题标题】:where the log files stored - filebeat and logstash存储日志文件的位置 - filebeat 和 logstash
【发布时间】:2016-06-09 09:28:21
【问题描述】:

我已经用 Filebeat 安装了 ELK。

我关注这个博客进行设置:https://www.digitalocean.com/community/tutorials/how-to-install-elasticsearch-logstash-and-kibana-elk-stack-on-ubuntu-14-04#set-up-filebeat(add-client-servers)

当我测试时:

curl -XGET 'http://localhost:9200/filebeat-*/_search?pretty'

我得到了博客的结果。

我这边有两个问题:

  1. logstash主机得到日志信息后,存放在哪里?
  2. 如果我想使用 filebeat 将整个日志文件转发到 logstash 主机并存储我想要的位置,我该如何配置它?

【问题讨论】:

    标签: elasticsearch logstash filebeat


    【解决方案1】:

    Logstash 将其输出发送到您配置的位置。在您引用的博客文章中,文件 30-elasticsearch-output.conf 包含一个 output{} 部分,它将输出定向到 elasticsearch。还有很多其他可能的输出。

    【讨论】:

    • 其实我已经在输出文件中添加了路径。输出 { if [type] == 'syslog'{ elasticsearch { hosts => ["localhost:9200"] sniffing => true manage_template => false index => "%{[@metadata][beat]}-%{+ YYYY.MM.dd}" document_type => "%{[@metadata][type]}" path => "/var/log/filebeat" } } } 并且服务也重新启动。但它不起作用。我不确定是否还应该编辑 filebeat 配置文件的一些条目。
    • 我认为你在博客文章中找到的任何配置都很少能完成你需要做的所有事情,这使得了解系统如何工作并迭代地构建你自己的配置变得很重要。要查看 logstash 可能发送到 elasticsearch 的内容,请尝试添加 stdout{} 输出部分。
    猜你喜欢
    • 2019-02-27
    • 1970-01-01
    • 1970-01-01
    • 2019-11-30
    • 1970-01-01
    • 2014-11-12
    • 1970-01-01
    • 1970-01-01
    • 2011-11-23
    相关资源
    最近更新 更多