filebeat.config:
modules:
path: ${path.config}/modules.d/*.yml
reload.enabled: false
processors:
filebeat.inputs:
setup.template.settings:
index.number_of_shards: 3
setup.kibana:
setup.template.name: “app”
setup.template.pattern: “app-*”
setup.template.overwrite: true
setup.template.enabled: false
setup.ilm.enabled: false
output.elasticsearch:
hosts: [“172.30.149.181:9200”,“172.30.149.182:9200”,“172.30.149.183:9200”]
indices:
- index: “test-sec-%{+yyyy.MM}”
when.equals:
fields:
logtopic: “syslog”
- index: “test-app-%{+yyyy.MM}”
when.equals:
fields:
logtopic: “docker”
或者是采用自动发现
filebeat.config:
modules:
path: ${path.config}/modules.d/*.yml
reload.enabled: false
filebeat.autodiscover:
providers:
- type: docker
hints.enabled: true
hints.default_config.enabled: false
exclude: [“filebeat”]
setup.template.settings:
index.number_of_shards: 3
setup.kibana:
setup.template.name: “bss-app”
setup.template.pattern: “bss-app*”
setup.template.overwrite: true
setup.template.enabled: false
setup.ilm.enabled: false
output.elasticsearch:
hosts: [“172.30.149.18:9200”]
index: “bss-app-%{+yyyy.MM}”
processors: