wangwengwu 发表于 2015-11-27 13:03:12

Fluentd+ElasticSearch+Kibana 搭建日誌類文件分析器 配置篇

  甲:FluentD配置
  


  筆者安裝的是td-agent版,其配置文件位於:/etc/td-agent/td-agent.conf
  前文已給出其收集syslog的數據配置,筆者項目中需其收集JSON數據,嘗試使用syslog方式,存在不能將數據按JSON格式解析問題及無法過濾其他進程的syslog數據問題,後者在理論上還可以處理,雖然筆者花了不少時間不有做成功,前者實在找不到文檔解決。
  


  筆者選擇了POST方式收集數據,其配置如官方文檔即可,如下所示:
  <source>

type http

port 8080

bind 0.0.0.0

body_size_limit 32m

keepalive_timeout 10s

tag symdroid

</source>



<match symdroid.**>

type elasticsearch

logstash_format true

flush_interval 10s # for testing

</match>
  


  HTTP POST之URL格式,
  

http://{server}:{port}/{tag}/{datatype}
例如:  
  http://localhost:8080/tag/json
  乙:elasticsearch 與 Kibana無有遭遇棘手的問題。
页: [1]
查看完整版本: Fluentd+ElasticSearch+Kibana 搭建日誌類文件分析器 配置篇