update
This commit is contained in:
31
templates/docker-log-agent-config.yml.j2
Normal file
31
templates/docker-log-agent-config.yml.j2
Normal file
@@ -0,0 +1,31 @@
|
||||
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/sample/*/*.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 %}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
agent:
|
||||
metadata:
|
||||
agent_name: "{{ docker_postgres_agent_name | default('dsk-postgres-agent') }}"
|
||||
agent_name: "{{ docker_postgres_agent_name | default('dsk-docker-postgres-agent') }}"
|
||||
option:
|
||||
exporter_config:
|
||||
command: "/etc/datasaker/target-exporter"
|
||||
|
||||
@@ -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 %}
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
agent:
|
||||
metadata:
|
||||
agent_name: "{{ trace_agent_name | default('trace-agent') }}"
|
||||
cluster_id: "{{ trace_agent_cluster_id | default('unknown_cluster') }}"
|
||||
option:
|
||||
agent_name: "{{ trace_agent_name | default('trace-agent') }}"
|
||||
cluster_id: "{{ trace_agent_cluster_id | default('unknown_cluster') }}"
|
||||
collector_config:
|
||||
sampling_rate: "{{ trace_sampling_rate | default('10') }}"
|
||||
|
||||
Reference in New Issue
Block a user