公司用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端能否做到?跪求大牛解答。。。。。。。
举个例子,日志是长这样:{"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端能否做到?跪求大牛解答。。。。。。。
0 个回复