配置Logstash消费kafka消息
input{kafka {topics => "my-log-topic"//这里要和你Java中logback.xml中的<topic></topic>一致type => "kafka"bootstrap_servers =>"192.168.80.
·
input{
kafka {
topics => "my-log-topic" //这里要和你Java中logback.xml中的<topic></topic>一致
type => "kafka"
bootstrap_servers => "192.168.80.112:9092,192.168.80.113:9092,192.168.80.114:9092" //你的kafka地址
codec => "json" //JSON形式写入
}
}
output {
elasticsearch {
hosts => ["http://localhost:9200"] //你的ES地址
index => "logkafka-%{+YYYY.MM.dd}" //前缀
#user => "elastic"
#password => "changeme"
}
}
更多推荐
已为社区贡献1条内容
所有评论(0)