agent: metadata: agent_name: "{{ log_agent_name | default('dsk-log-agent') }}" collect: {% for collect_item in log_collects %} - paths: {% for path in collect_item.paths %} - "{{ path | default('/var/log/*.log') }}" {% endfor %} {% if collect_item.exclude_paths is defined %} exclude_paths: {% for exclude_path in collect_item.exclude_paths %} - "{{ exclude_path | default('[]') }}" {% endfor %} {% endif %} {% if collect_item.keywords is defined %} keywords: {% for keyword in collect_item.keywords %} - "{{ keyword | default('[]') }}" {% endfor %} {% endif %} tag: "{{ collect_item.tag | default('Default') }}" service: 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 %}