This commit is contained in:
@@ -3,3 +3,6 @@ grpc_url: backend:9001
|
||||
label: test-agent-1
|
||||
registration_token: "156616b56774d59ba53f1eb4b096488bb5f755bbf5b737d93a42bb1b583ad7fb"
|
||||
cert_dir: /etc/hellreign-agent/certs
|
||||
services:
|
||||
- name: system
|
||||
type: journald
|
||||
|
||||
@@ -6,11 +6,11 @@ clickhouse-client --query "CREATE DATABASE IF NOT EXISTS hellreign;"
|
||||
clickhouse-client --query "
|
||||
CREATE TABLE IF NOT EXISTS hellreign.logs (
|
||||
timestamp DateTime64(3) DEFAULT now(),
|
||||
level String,
|
||||
service String,
|
||||
message String,
|
||||
host String,
|
||||
trace_id String
|
||||
level LowCardinality(String),
|
||||
service LowCardinality(String),
|
||||
agent LowCardinality(String),
|
||||
message String
|
||||
) ENGINE = MergeTree()
|
||||
ORDER BY (timestamp, service, level);
|
||||
ORDER BY (timestamp, level, service, agent)
|
||||
SETTINGS index_granularity = 8192;
|
||||
"
|
||||
|
||||
@@ -13,6 +13,12 @@ services:
|
||||
volumes:
|
||||
- clickhouse_data:/var/lib/clickhouse
|
||||
- ./clickhouse/init:/docker-entrypoint-initdb.d
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8123/ping"]
|
||||
interval: 5s
|
||||
timeout: 3s
|
||||
retries: 20
|
||||
start_period: 30s
|
||||
networks:
|
||||
- hellreign
|
||||
|
||||
@@ -33,7 +39,8 @@ services:
|
||||
- ./backend/config.yml:/etc/hellreign/config.yml:ro
|
||||
- backend_data:/var/lib/hellreign
|
||||
depends_on:
|
||||
- clickhouse
|
||||
clickhouse:
|
||||
condition: service_healthy
|
||||
networks:
|
||||
- hellreign
|
||||
|
||||
@@ -56,9 +63,13 @@ services:
|
||||
container_name: hellreign-agent
|
||||
environment:
|
||||
CONFIG_FILE: /etc/hellreign-agent/config.yml
|
||||
JOURNALD_LOGDIR: /var/log/journal
|
||||
BUFFER_DB: /var/lib/hellreign-agent/agent_buffer.db
|
||||
volumes:
|
||||
- ./agent/config.yml:/etc/hellreign-agent/config.yml:ro
|
||||
- agent_certs:/etc/hellreign-agent/certs
|
||||
- agent_data:/var/lib/hellreign-agent
|
||||
- /var/log/journal:/var/log/journal:ro
|
||||
depends_on:
|
||||
- backend
|
||||
networks:
|
||||
@@ -71,6 +82,8 @@ volumes:
|
||||
driver: local
|
||||
agent_certs:
|
||||
driver: local
|
||||
agent_data:
|
||||
driver: local
|
||||
|
||||
networks:
|
||||
hellreign:
|
||||
|
||||
Reference in New Issue
Block a user