Hello,World

filebeat的host相关的字段,获取的机器的hostname,能否获取ip?

Beats | 作者 hailin0 | 发布于2017年04月28日 | 阅读数:11885

filebeat的host相关的字段,获取的机器的hostname,能否获取ip?,通过hostname再去找机器不方便啊
已邀请:

zaqweb

赞同来自:

直接获取IP没有做过,但是你可以通过fields扩展任意的字段。
 
如果你的IP不是随时在变,可以用这个解决

filebeat.prospectors: 
- paths: ["/var/log/app/*.log"] 
  fields: 
    ip: xx.xxx.xx.xx
 

要回复问题请先登录注册