Skip to main content
Vector tails log files, wraps each line in an OTLP envelope with a remap transform, and ships it to Rootprint over OTLP. Records land in the index your ingest API key is scoped to: otel-logs-v0_9 in this guide.

Prerequisites

  • A running Rootprint instance. Substitute its host for <your-rootprint>.
  • An ingest API key scoped to otel-logs-v0_9. Create one in Settings → API keys with Create ingest key, then substitute it for <your-ingest-api-key>. See API keys.
  • A Linux host, with Docker Compose if you run Vector in a container.
1

Write the config

Replace <your-rootprint>, <your-ingest-api-key>, the include glob, and myapp with your service name.read_from: end skips existing lines on first start. Set it to beginning for a one-time backfill. After the first read, Vector resumes from its saved offset.
2

Run Vector

Install Vector from the installation page.
  1. Save the config as /etc/vector/vector.yaml.
  2. The service runs as the vector user. Let it read the log files. On Debian/Ubuntu, /var/log files usually belong to the adm group:
    Alternatively, sudo chmod a+r the log files. That opens them to every user on the host.
  3. Restart Vector. status should show active (running) with no config or sink errors:
3

Send a test log line

4

Verify in Rootprint

Open Logs, pick otel-logs-v0_9 from the index selector, and search for hello from vector. Records typically appear within 5–10 seconds.

What the remap does

The opentelemetry sink accepts only events shaped like an OTLP request. The remap builds that envelope and deletes the file source’s own top-level fields.
  • service.name: fills Rootprint’s service_name column. Replace myapp.
  • host.name: set from get_hostname!().
  • body: the raw log line. To parse fields out of it, add a remap before to_otlp and put the parsed fields in attributes.
  • Log level: every record is INFO. Set severityText and severityNumber from the line if you need real levels.
  • Timestamps: both use the time Vector read the line. Parse the line’s own timestamp into timeUnixNano if you need it.

Troubleshooting

  • 403 when the token comes from ${VAR}: Vector 0.57 and later don’t interpolate environment variables in config files by default, so the literal ${VAR} is sent as the key. Set VECTOR_DANGEROUSLY_ALLOW_ENV_VAR_INTERPOLATION=true in Vector’s environment.
  • 415 from Rootprint: encoding.codec must be otlp.
  • 401/403/413/415: see Response codes.