Error interpreting the template of the input: template: text:3:22: executing “text“ at <.paths>

使用filebeat 的 module 监控kakfa log,启动filebeat报错:

Error interpreting the template of the input: template: text:3:22: executing "text" at <.paths>: range can't iterate over /var/log/kafka/server.log

报错是filebeat.yml 文件中指定路径的写法:

var.paths: "/var/log/kafka/server.log.* "

正确的写法是:

var.paths: ["/var/log/kafka/server.log.*"]

带不带[] , 表示的数据类型不一样,[]表示为 序列(也应了报错中的提示 range can't iterate over "" ),不带则表示 字符串

修改后启动,正常!

 

参考文章:https://discuss.elastic.co/t/filebeats-nginx-problem/141952/12

你可能感兴趣的:(elk)