|
|
|
|
@ -7,43 +7,39 @@ filebeat.modules:
|
|
|
|
|
enabled: true
|
|
|
|
|
auth:
|
|
|
|
|
enabled: true
|
|
|
|
|
{% if filebeat_postgres_enabled | default(false) %}
|
|
|
|
|
|
|
|
|
|
{% if filebeat_postgres_enabled | default(false) -%}
|
|
|
|
|
- module: postgresql
|
|
|
|
|
log:
|
|
|
|
|
enabled: true
|
|
|
|
|
{% endif -%}
|
|
|
|
|
{% endif %}
|
|
|
|
|
{% if filebeat_maria_enabled | default(false) %}
|
|
|
|
|
|
|
|
|
|
{% if filebeat_maria_enabled | default(false) -%}
|
|
|
|
|
- module: mysql
|
|
|
|
|
error:
|
|
|
|
|
enabled: true
|
|
|
|
|
slowlog:
|
|
|
|
|
enabled: true
|
|
|
|
|
{% endif -%}
|
|
|
|
|
{% if filebeat_inputs is defined %}
|
|
|
|
|
|
|
|
|
|
filebeat.inputs:
|
|
|
|
|
{% if filebeat_inputs is defined %}
|
|
|
|
|
{% for elem in filebeat_inputs %}
|
|
|
|
|
- type: {{ elem.type }}
|
|
|
|
|
{% for filebeat_input in filebeat_inputs %}
|
|
|
|
|
- type: {{ filebeat_input.type }}
|
|
|
|
|
paths:
|
|
|
|
|
{% for path in elem.paths %}
|
|
|
|
|
{% for path in filebeat_input.paths %}
|
|
|
|
|
- {{ path }}
|
|
|
|
|
{% endfor %}
|
|
|
|
|
{%+ if elem.fields is defined -%}
|
|
|
|
|
{%+ if filebeat_input.fields is defined -%}
|
|
|
|
|
fields:
|
|
|
|
|
{% for field in elem.fields %}
|
|
|
|
|
{{ field }}: {{ elem.fields[field] }}
|
|
|
|
|
{% for field in filebeat_input.fields %}
|
|
|
|
|
{{ field }}: {{ filebeat_input.fields[field] }}
|
|
|
|
|
{% endfor %}
|
|
|
|
|
{% endif %}
|
|
|
|
|
{% endfor %}
|
|
|
|
|
{% else %}
|
|
|
|
|
- type: container
|
|
|
|
|
paths:
|
|
|
|
|
- /var/lib/docker/containers/*/*.log
|
|
|
|
|
{% endif %}
|
|
|
|
|
{% if ansible_fqdn not in groups['harbor'] %}
|
|
|
|
|
|
|
|
|
|
{% if ansible_fqdn not in groups['harbor'] -%}
|
|
|
|
|
filebeat.autodiscover:
|
|
|
|
|
providers:
|
|
|
|
|
- type: docker
|
|
|
|
|
|