几天前我发现了Filebeat。如果我在filebeat.yml中硬编码主题名称,我会让它直接将数据发送到Kafka。但我似乎想不出如何根据suricata事件类型动态计算主题名称。我已经启用了filebeat suricata模块,并在filebeat.yml主题值中尝试了许多方法,例如:
topic: 'suricata-%{[fields.suricata.eve.event_type]}'但是我总是在日志中看到这样的错误:
2020-01-14T23:44:49.550Z INFO kafka/log.go:53 kafka message: Initializing new client
2020-01-14T23:44:49.551Z INFO kafka/log.go:53 kafka message: Successfully initialized new client
2020-01-14T23:44:49.551Z INFO pipeline/output.go:105 Connection to kafka(somehost:9092) established
2020-01-14T23:44:49.551Z ERROR kafka/client.go:144 Dropping event: no topic could be selected
2020-01-14T23:44:49.551Z ERROR kafka/client.go:144 Dropping event: no topic could be selected
2020-01-14T23:44:49.551Z ERROR kafka/client.go:144 Dropping event: no topic could be selected你是怎么做到的?有没有基于suricata事件类型的路由到不同主题的示例filebeat.yml文件?
发布于 2020-01-16 06:59:28
如果地球上还有其他人对此感兴趣,我得到了一个有效的答案:
https://discuss.elastic.co/t/suricata-logs-to-filebeat-to-kafka-topics-by-event-type/215179
topic: 'suricata-%{[suricata.eve.event_type]}'https://stackoverflow.com/questions/59743530
复制相似问题