filebeat笔记

1.filebeat中,我们可以自己创建Yml文件,并在启动时指定该文件。但是在执行load template的命令:

./filebeat setup --index-management

时,会报错:

Failed to connect to http://localhost:9200Get http://localhost:9200/ping: dial tcp 127.0.0.1:9200.

开始的想法是执行这条命令的时候并没有去调用某个配置文件,为什么他会一直去连localhost而不是ip,且这里我们自己创建的yml中已经把output.elasticsearch的host设为ip了。后来就抱着试一试的态度去看了一下默认的配置文件filebeat.yml中,果然output.elasticsearch的host配置的是localhost,就把它改为ip试了一下,结果就不报错了,说明执行上面的命令load template时会调用默认的配置文件,尽管我们有了自己创建的配置文件。

2.在filebeat7.0以上版本中,使用PUT命令修改template时,报错:

Root mapping definition has unsupported parameters

可以在curl命令后面加上参数include_type_name: true 即可:

 curl -XPUT 'http://localhost:9200/people?include_type_name=true'

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章