update
This commit is contained in:
@@ -2,32 +2,30 @@ agent:
|
||||
metadata:
|
||||
agent_name: "{{ log_agent_name | default('dsk-log-agent') }}"
|
||||
collect:
|
||||
{% for collect_item in log_collects %}
|
||||
- paths:
|
||||
{% if paths is defined and paths | length > 0 %}
|
||||
{% for path in paths %}
|
||||
- "{{ path | default('') }}"
|
||||
{% for path in collect_item.paths %}
|
||||
- "{{ path | default('/var/log/*.log') }}"
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
- /var/log/sample/*/*.log
|
||||
{% endif %}
|
||||
{% if exclude_paths is defined and exclude_paths | length > 0 %}
|
||||
{% if collect_item.exclude_paths is defined %}
|
||||
exclude_paths:
|
||||
{% for exclude_path in exclude_paths %}
|
||||
- "{{ exclude_path | default('') }}"
|
||||
{% for exclude_path in collect_item.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') }}"
|
||||
{% if collect_item.keywords is defined %}
|
||||
keywords:
|
||||
{% for keyword in collect_item.keywords %}
|
||||
- "{{ keyword | default('[]') }}"
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
keywords: []
|
||||
{% endif %}
|
||||
tag: "{{ log_agent_tag | default('Default') }}"
|
||||
{% endif %}
|
||||
tag: "{{ collect_item.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') }}"
|
||||
name: "{{ collect_item.service.name | default('default') }}"
|
||||
category: "{{ collect_item.service.category | default('etc') }}"
|
||||
type: "{{ collect_item.service.type | default('etc') }}"
|
||||
{% if collect_item.service.address is defined %}
|
||||
address: "{{ collect_item.service.address }}"
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user