This commit is contained in:
havelight-ee
2023-06-21 17:38:49 +09:00
parent a4a3c489da
commit a209a9b25c
10 changed files with 123 additions and 47 deletions

View File

@@ -0,0 +1,20 @@
agent:
metadata:
agent_name: "{{ docker_postgres_agent_name | default('dsk-postgres-agent') }}"
option:
exporter_config:
command: "/etc/datasaker/target-exporter"
port: 9187
scrape_configs:
- job_name: dsk-postgres-agent
metrics_path: /metrics/short
url: localhost:9187
filtering_configs:
rule: drop
- job_name: dsk-postgres-agent-long
scrape_interval: 60s
scrape_timeout: 10s
metrics_path: /metrics/long
url: localhost:9187
filtering_configs:
rule: drop

View File

@@ -1,8 +1,6 @@
agent:
metadata:
agent_name: "{{ log_agent_name | default('dsk-log-agent') }}"
cluster_id: "{{ log_agent_cluster_id | default('unknown') }}"
environment: "{{ log_agent_environment | default('etc') }}"
collect:
- paths:
{% if paths is defined and paths | length > 0 %}
@@ -10,7 +8,7 @@ agent:
- "{{ path | default('') }}"
{% endfor %}
{% else %}
- /var/log/*/*.log
- /var/log/sample/*/*.log
{% endif %}
{% if exclude_paths is defined and exclude_paths | length > 0 %}
exclude_paths:
@@ -23,13 +21,13 @@ agent:
{% if keywords is defined and keywords | length > 0 %}
keywords:
{% for keyword in keywords %}
- "{{ keyword | default('') }}"
- "{{ keyword | default('ERROR') }}"
{% endfor %}
{% else %}
keywords: []
{% endif %}
tag: "{{ log_agent_tag | default('sample') }}"
tag: "{{ log_agent_tag | default('Default') }}"
service:
name: "{{ log_agent_service_name | default('test') }}"
name: "{{ log_agent_service_name | default('default') }}"
category: "{{ log_agent_service_category | default('etc') }}"
type: "{{ log_agent_service_type | default('etc') }}"
type: "{{ log_agent_service_type | default('etc') }}"

View File

@@ -1,37 +0,0 @@
agent:
metadata:
agent_name: "{{ log_agent_name | default('dsk-log-agent') }}"
cluster_id: "{{ log_agent_cluster_id | default('unknown') }}"
environment: "{{ log_agent_environment | default('etc') }}"
collect:
- paths:
{% if paths is defined and paths | length > 0 %}
{% for path in paths %}
- "{{ path | default('') }}"
{% endfor %}
{% else %}
- /var/log/*/*.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('') }}"
{% endfor %}
{% else %}
keywords: []
{% endif %}
tag: "{{ log_agent_tag | default('sample') }}"
service:
name: "{{ log_agent_service_name | default('test') }}"
category: "{{ log_agent_service_category | default('etc') }}"
type: "{{ log_agent_service_type | default('etc') }}"

View File

@@ -1,7 +1,6 @@
agent:
metadata:
agent_name: "{{ plan_postgres_agent_name | default('dsk-plan-postgres-agent') }}"
cluster_id: "{{ plan_postgres_agent_cluster_id | default('REPLACE_CLUSTER_ID') }}"
data_source_name:
user: "{{ plan_postgres_user_name | default('') }}"
password: "{{ plan_postgres_user_password | default('') }}"

View File

@@ -0,0 +1,19 @@
agent:
metadata:
agent_name: "{{ postgres_agent_name | default('dsk-postgres-agent') }}"
option:
exporter_config:
command: "/usr/bin/dsk-postgres-exporter"
port: 19187
args:
- --extend.query-path=/etc/datasaker/dsk-postgres-agent/queries.yaml
- --data-source-user="{{ postgres_user_name | default('') }}"
- --data-source-pass="{{ postgres_user_password | default('') }}"
- --data-source-uri="{{ postgres_database_address | default('') }}":"{{ postgres_database_port | default('') }}"
scrape_interval: 15s
scrape_timeout: 5s
scrape_configs:
- job_name: dsk-postgres-agent
url: localhost:19187
filtering_configs:
rule: drop