国产成人精品亚洲777人妖,欧美日韩精品一区视频,最新亚洲国产,国产乱码精品一区二区亚洲

您的位置:首頁技術文章
文章詳情頁

filebeat同時收集錯誤日志與普通日志并存詳解

瀏覽:10日期:2023-03-13 15:37:37
目錄
  • 1.配置filebeat收集error日志
  • 2.查看es是否產生error索引
  • 3.在kibana上關聯es索引
  • 4.在kibana上統計錯誤日志

1.配置filebeat收集error日志

只收集正常日志往往是不完整的,錯誤日志更需要收集起來

所有集群都按如下配置,其實就是增加了一個type和一個index

vim /etc/filebeat/filebeat.ymlfilebeat.inputs:- type: log  enabled: true  paths:    - /var/log/nginx/www_access.log  json.keys_under_root: true  json.overwrite_keys: true  tags: ["www"]- type: log  enabled: true  paths:    - /var/log/nginx/bbs_access.log  json.keys_under_root: true  json.overwrite_keys: true  tags: ["bbs"]- type: log  enabled: true  paths:    - /var/log/nginx/blog_access.log  json.keys_under_root: true  json.overwrite_keys: true  tags: ["blog"]- type: log  enabled: true  paths:    - /var/log/nginx/error.log  tags: ["error"]output.elasticsearch:  hosts: ["192.168.81.210:9200"]  indices:    - index: "nginx-www-access-%{+yyyy.MM.dd}"      when.contains:tags: "www"    - index: "nginx-bbs-access-%{+yyyy.MM.dd}"      when.contains:tags: "bbs"    - index: "nginx-blog-access-%{+yyyy.MM.dd}"      when.contains:tags: "blog"    - index: "nginx-error-%{+yyyy.MM.dd}"      when.contains:tags: "error"systemctl restart filebeat

2.查看es是否產生error索引

已經生成

3.在kibana上關聯es索引

點擊Managerment---索引模式---創建索引

創建成功

4.在kibana上統計錯誤日志

點擊Discovery---選擇索引即可查看,根據自己的需求進行統計即可

以上就是filebeat同時收集錯誤日志與普通日志并存詳解的詳細內容,更多關于filebeat錯誤普通日志并存的資料請關注其它相關文章!

標簽: Nginx
主站蜘蛛池模板: 西峡县| 抚顺县| 北流市| 荣昌县| 卓资县| 嘉荫县| 南京市| 中宁县| 土默特左旗| 琼结县| 比如县| 运城市| 乌拉特前旗| 清水县| 隆安县| 海安县| 顺昌县| 治多县| 锡林郭勒盟| 两当县| 繁峙县| 房山区| 鱼台县| 乐昌市| 上蔡县| 佛学| 渑池县| 德令哈市| 长岭县| 灌南县| 阿巴嘎旗| 灵山县| 社旗县| 黑山县| 砀山县| 潼关县| 夏津县| 桐乡市| 志丹县| 苏尼特右旗| 石屏县|