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

38 lines
739 B
TOML
Raw Normal View History

2023-10-24 15:46:25 +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 = '''
.logdatetime = to_unix_timestamp(now())
.program = .container_name
'''
[transforms.emptyprogram]
type = "filter"
inputs = [ "ts_and_program" ]
condition.type = "vrl"
condition.source = '''
.program != ""
'''
[transforms.dedupe]
type = "dedupe"
inputs = [ "emptyprogram" ]
[sinks.clickhouse]
type = "clickhouse"
inputs = [ "dedupe"]
compression = "gzip"
endpoint = "http://clickhouse:8123"
auth.strategy = "basic"
auth.user = "default"
auth.password = "default"
database = "default"
table = "log_docker_raw"