filebeat. 启动报错, ERROR kafka/client.go:131 Dropping event: no topic could be selected

匿名 | 发布于2018年12月28日 | 阅读数:1092

 
 
 


filebeat.inputs:

- type: log
enabled: true
paths:
- /letv/Logs/lef-p2p-web/lef-p2p-web.log
fields_under_root: true
fields:
type: log
log_topic: test

- type: log
enabled: true
paths:
- /letv/home/tomcat/domains/lef-p2p-web/server1/server1/logs/localhost_access_log.*
fields_under_root: true
fields:
type: tomcat_access_log
log_topic: test1

- type: log
enabled: true
paths:
- /letv/home/tomcat/domains/lef-p2p-web/server1/logs/catalina.out
fields_under_root: true
fields:
type: tomcat_catalina_log
log_topic: test2

multiline.pattern: ^\[

multiline.negate: true

multiline.match: after

#============================= Filebeat modules ===============================

filebeat.config.modules:

path: ${path.config}/modules.d/*.yml

reload.enabled: false

#==================== Elasticsearch template setting ==========================

setup.template.settings:
index.number_of_shards: 3

#================================ General =====================================

name: 10.75.229.86


#================================ Outputs =====================================

#----------------------------- kafka output --------------------------------
output.kafka:
enabled: true
hosts: ["10.75.229.83:9092"]
topic: '%{[fields.log_topic]}'
partition.round_robin:
reachable_only: false
required_acks: 1
compression: gzip
max_message_bytes: 1000000

#================================ Procesors =====================================

processors:
- rename:
fields:
- from: "host.name"
to: "hostAddr"
- drop_fields:
fields: ["beat", "input", "@metadata", "prospector", "log.flags"]

#================================ Logging =====================================

 
filebeat. 启动报错,        ERROR    kafka/client.go:131    Dropping event: no topic could be selected
 
 
kafka。确定赢创建topic。 
 
已邀请:

bellengao

赞同来自: HarryKa

topic: "%{[log_topic]}"

HarryKa - 90IT

赞同来自:

确实可以了,fields_under_root: true   是因为,我这个设置true, 所以不用加fields 了吧

wajika

赞同来自:

topic: '%{[fields.log_topic]}'
这个变量取不到值

要回复问题请先登录注册