gitee.com/woood2/luca@v1.0.4/deployments/EFK.md (about) 1 ### 安装 EFK 2 - `elasticsearch`、`kibana` 基于docker安装,详见 [deployments/README.md](https://gitee.com/woood2/luca/blob/master/deployments/README.md) 3 - `fluentd` 参考 [官方教程](https://docs.fluentd.org/installation) 4 5 ### Fluentd 追加配置 6 注:根据实际情况替换选项值 7 8 ``` 9 <source> 10 @type tail 11 @log_level debug 12 path /Users/qiujiashu/go/src/luca/zap.log 13 pos_file /Users/qiujiashu/go/src/luca/zap.log.pos 14 tag luca 15 <parse> 16 @type json 17 time_key ts 18 </parse> 19 </source> 20 <match luca> 21 @type copy 22 <store> 23 @type elasticsearch 24 host {ip} 25 port 9200 26 log_es_400_reason true 27 logstash_format true 28 logstash_prefix luca 29 logstash_dateformat %Y%m%d 30 flush_interval 1s 31 </store> 32 <store> 33 @type stdout 34 </store> 35 </match> 36 ``` 37 38 ### 设置Kibana 39 浏览器地址栏输入 http://{ip}:5601/ 访问kibana 40 "Index name or pattern" 填入 luca-*,然后点击创建按钮 41 (取值对应 fluentd conf中 的 logstash_prefix 选项)