首页 > 其他 > 详细

filebeat输出增加ip字段

时间:2017-08-23 10:13:49      阅读:1757      评论:0      收藏:0      [点我收藏+]

    filebeat (5.x)默认配置中,输出客户端信息 beat.name和beat.hostname 值都是主机名,这样不方便运维快速定位到具体主机,如下图(ES中):   

技术分享  

技术分享

     因此在filebeat配置文件中增加字段,并通过环境变量配置ip地址,在es索引中增加“host"字段,值为客户端的真实IP

   filebeat.yml配置增加以下部分:

fields_under_root: true   

fields:
  host: ${serverIP}

#serverIP 为系统环境变量,具体值为本机IP:192.168.1.121

修改后es索引结果如下:

   技术分享

 

本文出自 “emulator.bokee.com” 博客,请务必保留此出处http://emulator.blog.51cto.com/134664/1958524

filebeat输出增加ip字段

原文:http://emulator.blog.51cto.com/134664/1958524

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!