itamae/cookbooks/docker/templates/etc/vector/docker.toml.erb

27 lines
511 B
Plaintext
Raw Permalink Normal View History

data_dir = "/var/lib/vector"
[sources.docker]
type = "docker_logs"
[transforms.docker-transform]
type = "remap"
inputs = ["docker"]
source = '''
del(.container_created_at)
del(.container_id)
del(.container_name)
'''
[sinks.docker-logs]
type = "loki"
inputs = ["docker-transform"]
endpoint = "http://<%= @LOKI %>:3100"
healthcheck = true
remove_timestamp = true
encoding.codec = "text"
labels.level = "info"
labels.job = "docker"
labels.hostname = "<%= @HOSTNAME %>"