docker-logs-grafana-clickhouse/files/vector.yaml

44 lines
788 B
YAML
Raw Normal View History

2023-11-15 11:41:19 +03:00
api:
enabled: true
address: '0.0.0.0:8686'
sources:
docker:
type: docker_logs
exclude_containers:
- clickhouse
- grafana
- vector
transforms:
ts_and_program:
type: remap
inputs:
- docker
source: |2
.logdatetime = to_unix_timestamp(now())
.program = .container_name
emptyprogram:
type: filter
inputs:
- ts_and_program
condition:
type: vrl
source: |2
.program != ""
dedupe:
type: dedupe
inputs:
- emptyprogram
sinks:
clickhouse:
type: clickhouse
inputs:
- dedupe
compression: gzip
endpoint: 'http://clickhouse:8123'
auth:
strategy: basic
user: default
password: default
database: default
table: log_docker_raw