filebeat/playbooks/templates/filebeat-gateway-nginx-temp...

52 lines
1.4 KiB
YAML

filebeat.registry.path: {{ work_path }}/data/registry/gw-nginx-{{ instance_name }}
filebeat.inputs:
{% for log in logs %}
- type: log
paths:
- "/data/log/nginx/access_{{ log }}.log"
- "/data/log/nginx/error_{{ log }}.log"
fields:
source: {{ log }}
{% endfor %}
filebeat.config.modules:
# Glob pattern for configuration loading
path: ${path.config}/modules.d/*.yml
# Set to true to enable config reloading
reload.enabled: false
# Period on which files under path should be checked for changes
#reload.period: 10s
# ======================= Elasticsearch template setting =======================
setup.ilm.enabled: false
setup.template.name: "gw-nginx-ug10cn"
setup.template.pattern: "gw-nginx-ug10cn-*"
setup.template.settings:
index.number_of_shards: 3
setup.kibana:
host: "{{ kibana_url }}"
space.id: "{{ kibana_space }}"
# ---------------------------- Elasticsearch Output ----------------------------
output.elasticsearch:
hosts: {{ es_hosts }}
index: "gw-nginx-{{ instance_name }}-%{[fields.source]}-%{+yyyy.MM.dd}"
pipeline: "gwlogs"
username: {{ es_user }}
password: {{ es_passwd }}
# ================================= Processors =================================
processors:
- add_host_metadata:
when.not.contains.tags: forwarded
- add_cloud_metadata: ~
- add_docker_metadata: ~
- add_kubernetes_metadata: ~