S
Supanote
Sign in Sign up

Vector.dev Log Shipping Pipeline Configuration (vector.toml)

plain (toml) 13 hours ago · 26 lines · 7 views
1# vector.toml - High-Performance Log Shipping Pipeline
2
3[sources.docker_logs]
4type = "docker_logs"
5include_units = ["app-*", "nginx-*"]
6
7[transforms.parse_json]
8type = "remap"
9inputs = ["docker_logs"]
10source = '''
11 . = parse_json(.message) ?? .
12 .timestamp = to_timestamp!(.timestamp) ?? now()
13 .environment = "production"
14'''
16[sinks.loki]
17type = "loki"
18inputs = ["parse_json"]
19endpoint = "http://loki:3100"
20encoding.codec = "json"
22[sinks.loki.labels]
23service = "{{ service_name }}"
24level = "{{ level }}"
25env = "production"

No replies yet

Every reply is a note. Start a discussion, ask a question, or attach a code snippet.

Share Note

Download SVG
Social Card Preview
Open on mobile
Point your phone camera to open this note directly

Report this note

Notification