ansible-deploy / plan (push) Successful in 2s
ansible-lint / lint (push) Successful in 3s
ansible-deploy / deploy (core-mon, ) (push) Successful in 8s
ansible-deploy / deploy (core-net, ) (push) Successful in 9s
ansible-deploy / deploy (core-secrets, ) (push) Successful in 8s
ansible-deploy / deploy (ger-nod-02, ) (push) Successful in 1m13s
ansible-deploy / deploy (rus-central, ) (push) Successful in 1m2s
75 lines
1.9 KiB
Django/Jinja
75 lines
1.9 KiB
Django/Jinja
data_dir: {{ vector_data_dir }}
|
|
|
|
sources:
|
|
docker:
|
|
type: docker_logs
|
|
exclude_containers:
|
|
- vector
|
|
- monitoring-vlogs
|
|
|
|
journald:
|
|
type: journald
|
|
since_now: true
|
|
|
|
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")
|
|
}
|
|
msg = to_string(.message) ?? ""
|
|
msg = replace(msg, r'(?i)(bearer\s+)[a-z0-9._-]+', "${1}[REDACTED]")
|
|
msg = replace(msg, r'(?i)((?:password|passwd|secret|api_?key|token)\s*[:=]\s*)[^\s,;"]+', "${1}[REDACTED]")
|
|
.message = msg
|
|
|
|
filter_journald:
|
|
type: filter
|
|
inputs:
|
|
- journald
|
|
condition: |
|
|
ident = to_string(.SYSLOG_IDENTIFIER) ?? ""
|
|
!starts_with(ident, "ansible-") && !includes(["vector", "(systemd)", "CRON"], ident)
|
|
|
|
normalize_journald:
|
|
type: remap
|
|
inputs:
|
|
- filter_journald
|
|
source: |
|
|
.host = "{{ vector_host_name }}"
|
|
.source_type = "host"
|
|
svc = to_string(.SYSLOG_IDENTIFIER) ?? to_string(._SYSTEMD_UNIT) ?? "kernel"
|
|
if svc == "sshd-session" {
|
|
svc = "sshd"
|
|
}
|
|
.service = svc
|
|
msg = to_string(.message) ?? ""
|
|
msg = replace(msg, r'(?i)(bearer\s+)[a-z0-9._-]+', "${1}[REDACTED]")
|
|
msg = replace(msg, r'(?i)((?:password|passwd|secret|api_?key|token)\s*[:=]\s*)[^\s,;"]+', "${1}[REDACTED]")
|
|
.message = msg
|
|
|
|
sinks:
|
|
victorialogs:
|
|
type: http
|
|
inputs:
|
|
- normalize_docker
|
|
- normalize_journald
|
|
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
|