Skip to content

Vector

This guide configures logs. Replace YOUR_INGEST_KEY with your key on your server, never in a public example.

For Docker stdout, replace the file source with type: docker_logs and grant access to the runtime socket only after reviewing its host privileges. For multiline stacks, configure a source multiline start pattern before shipping.

data_dir: /var/lib/vector
sources:
app:
type: file
include: ["/var/log/my-app/*.log"]
read_from: end
sinks:
siteqwality:
type: http
inputs: [app]
uri: https://otlp.siteqwality.com/ingest
method: post
encoding: {codec: json}
framing: {method: newline_delimited}
request:
headers:
Authorization: "Bearer YOUR_INGEST_KEY"
Content-Type: application/x-ndjson
X-Service: "my-service"
X-Env: "production"
batch: {max_bytes: 1000000, timeout_secs: 1}
buffer: {type: disk, max_size: 268435488, when_full: block}

Persist data_dir for the disk buffer. Check the sink delivery counters and rejected JSON records. To preserve JSON object fields, parse the message with a remap transform before the sink.

Terminal window
vector validate vector.yaml
vector --config vector.yaml

Open Logs, Traces or Metrics. New data usually shows up within a minute, and a page that says it is waiting for data switches to your data on its own. Nothing arriving? See what each status code means in failure handling.

Store the key in your platform secret mechanism, rotate it when exposed and remove test keys. Set a stable service.name and deployment.environment.name; avoid user IDs or unbounded values in metric labels. Prefer a persistent queue, bounded retries and exporter failure monitoring. Review redaction and processors before increasing traffic.