infra/roles/nginx/templates/filebeat/nginx.yml.j2

23 lines
472 B
Django/Jinja

# {{ansible_managed}}
- type: filestream
id: "nginx-access-glob"
paths:
- /var/log/nginx/access_*.log
- /var/log/nginx/access.log
{% if kibana_url is defined %}
prospector.scanner.exclude_files:
- /var/log/nginx/access_{{ kibana_url }}.log
{% endif %}
scan_frequency: 10s
enabled: true
parsers:
- ndjson:
keys_under_root: true
add_error_key: true
fields_under_root: true
fields:
service.type: nginx
tags:
- nginx