身安不如心安,屋宽不如心宽 。

filebeat根据json日志内容中字段发送到kafka中指定中的partition

Beats | 作者 stalena | 发布于2018年09月26日 | 阅读数:3544

公司用filebeat来做应用端的告警日志收集。架构是这样,filebeat--》kafka,告警日志的格式是json格式,需求是想根据json中的某个字段值来决定将这条日志发送到kafka的topic中的指定partition。
举个例子,日志是长这样:{"Tag":"HandlerManagerCalc","Priority":1,"Status":200,"CurrentStatus":200,"Note":"totalInventoryHandlerManager Calc is success","time":"2018-09-26 13:41:34.109","thread":"inventory.calc.new-executor-503","level":"WARN ","func":"alarmLog"}
假设在该topic有3个partition,假如说"Tag"的属性值是"HandlerManagerCalc",就将该条日志事件发送到第"0"个partition,这个在filebeat端能否做到?跪求大牛解答。。。。。。。
 
已邀请:

要回复问题请先登录注册