Files
homelab-infra/ansible/roles/vector/templates/vector.yaml.j2
T
karpenok 1ac66ee4ef
ansible-deploy / plan (push) Successful in 1s
ansible-lint / lint (push) Successful in 3s
ansible-deploy / deploy (core-mon, ) (push) Successful in 7s
ansible-deploy / deploy (core-net, ) (push) Successful in 8s
ansible-deploy / deploy (core-secrets, ) (push) Successful in 7s
ansible-deploy / deploy (ger-nod-02, ) (push) Successful in 19s
ansible-deploy / deploy (rus-central, ) (push) Successful in 27s
fix(vector): move framing.method out of encoding block for VictoriaLogs jsonline
2026-11-18 11:29:19 +07:00

59 lines
1.2 KiB
Django/Jinja

data_dir: /var/lib/vector
sources:
docker:
type: docker_logs
exclude_containers:
- vector
host_logs:
type: file
include:
- /var/log/syslog
- /var/log/messages
- /var/log/auth.log
ignore_older_secs: 86400
transforms:
normalize_docker:
type: remap
inputs:
- docker
source: |
.host = "{{ vector_host_name }}"
.source_type = "docker"
.service = .container_name
if exists(.label."com.docker.compose.service") {
.service = string!(.label."com.docker.compose.service")
}
normalize_host:
type: remap
inputs:
- host_logs
source: |
.host = "{{ vector_host_name }}"
.source_type = "host"
.service = replace(string!(.file), "/var/log/", "")
sinks:
victorialogs:
type: http
inputs:
- normalize_docker
- normalize_host
uri: "{{ vector_vlogs_url }}"
encoding:
codec: json
framing:
method: newline_delimited
compression: gzip
request:
headers:
VL-Stream-Fields: "host,source_type,service"
VL-Msg-Field: "message"
VL-Time-Field: "timestamp"
healthcheck:
enabled: false