1)配置

[root@web01 ~]# vim /etc/filebeat/filebeat.yml
filebeat.inputs:
- type: log
  enable: true
  paths:
    - /var/log/nginx/access.log
  json.keys_under_root: true
  json.overwrite_keys: true
output.elasticsearch:
  hosts: ["10.0.0.51:9200"]
  index: "nginx_log_%{+YYYY-MM-dd}"
setup.template.enabled: false
setup.template.name: "nginx"
setup.template.pattern: "nginx-*"

2)指定分片数

[root@web01 ~]# vim /etc/filebeat/filebeat.yml.bak 
setup.template.settings:
  index.number_of_shards: 3

相关文章:

  • 2021-12-23
  • 2022-12-23
  • 2021-07-22
  • 2021-09-24
  • 2021-09-29
  • 2021-06-17
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-09
  • 2022-12-23
  • 2021-11-29
  • 2022-12-23
  • 2022-02-01
  • 2018-12-08
相关资源
相似解决方案