电商网站流量统计,沧州做网站的公司排名,新品发布会宣传文案,给人家做的网站想改怎么改默认的filebeat配置会把所有的索引都放到一个文件中#xff0c;通过摸索发现可以自定义索引的名字、模板、生命周期
#xff08;重点注意#xff09;该配置文件只适应于ES版本是7#xff0c;不适应于8的版本#xff0c;两个版本的配置文件差异很大
/app/logs/info.log日…默认的filebeat配置会把所有的索引都放到一个文件中通过摸索发现可以自定义索引的名字、模板、生命周期
重点注意该配置文件只适应于ES版本是7不适应于8的版本两个版本的配置文件差异很大
/app/logs/info.log日志文件为JSON格式自定义索引生命周期名为pn_springboot,可提前建好自定义索引名为idx_springboot自写义索引模板名为tn_springboot
这样上传到es的索引名为idx_springboot-20240721-000001的索引名不是默认的filebeat了
filebeat.inputs:
- type: logpaths:- /app/logs/info.logjson.keys_under_root: truejson.add_error_key: truejson.overwrite_keys: truesetup.ilm.enabled: auto
setup.ilm.rollover_alias: idx_springboot
setup.ilm.pattern: {now/d}-000001
setup.ilm.policy_name: pn_springbootsetup.template.enabled: true
setup.template.name: tn_springboot
setup.template.pattern: idx_springboot-*
setup.template.overwrite: true
setup.template.settings:index.lifecycle.name: pn_springbootindex.lifecycle.rollover_alias: idx_springbootoutput.elasticsearch:hosts: [http://192.168.21.2:8800]username: elasticpassword: elastic我是感觉这么配置有点不太合理es版本是8的配置就比较合理了ES8版本配置filebeat把日志文件上传到Es中配置ES8版本 为保护我的个人隐私有的生命周期名、索引名、模板名我做过修改如发现有问题可评论或与我联系