34 lines
1005 B
Django/Jinja
34 lines
1005 B
Django/Jinja
agent:
|
|
metadata:
|
|
agent_name: "{{ log_agent_name | default('dsk-log-agent') }}"
|
|
collect:
|
|
- paths:
|
|
{% if paths is defined and paths | length > 0 %}
|
|
{% for path in paths %}
|
|
- "{{ path | default('') }}"
|
|
{% endfor %}
|
|
{% else %}
|
|
- /var/log/sample/*/*.log
|
|
{% endif %}
|
|
{% if exclude_paths is defined and exclude_paths | length > 0 %}
|
|
exclude_paths:
|
|
{% for exclude_path in exclude_paths %}
|
|
- "{{ exclude_path | default('') }}"
|
|
{% endfor %}
|
|
{% else %}
|
|
exclude_paths: []
|
|
{% endif %}
|
|
{% if keywords is defined and keywords | length > 0 %}
|
|
keywords:
|
|
{% for keyword in keywords %}
|
|
- "{{ keyword | default('ERROR') }}"
|
|
{% endfor %}
|
|
{% else %}
|
|
keywords: []
|
|
{% endif %}
|
|
tag: "{{ log_agent_tag | default('Default') }}"
|
|
service:
|
|
name: "{{ log_agent_service_name | default('default') }}"
|
|
category: "{{ log_agent_service_category | default('etc') }}"
|
|
type: "{{ log_agent_service_type | default('etc') }}"
|