filelog receiver tails files under /var/log/, and the otlphttp exporter ships each record to Rootprint’s OTLP endpoint with a Bearer token. Records land in the index your ingest token is scoped to: otel-logs-v0_9 in this guide. Run the Collector on bare metal or in Docker — pick the tab below.
Use the Contrib distribution (otelcol-contrib). The filelog receiver lives in Contrib, not in the core release.
Prerequisites
- A running Rootprint instance and its base URL — you’ll substitute it for
<your-rootprint>. - A Linux host. The Bare Metal tab runs the Collector directly or under
systemd; the Docker tab uses Docker Compose. - An ingest API key scoped to your target index. In Settings → API keys, click Create ingest key, give it a name, and pick the index (
otel-logs-v0_9here; see Indexes for its schema). See API keys.
- Bare Metal
- Docker
Install the Collector
Install the Contrib distribution (
otelcol-contrib) for your platform — Debian/Ubuntu apt,
RHEL/Fedora rpm, or a standalone binary, all maintained upstream on the
Collector installation page.Write /etc/otel/config.yaml
Save the following at
/etc/otel/config.yaml. Replace <your-rootprint> with your
Rootprint base URL, <your-ingest-token> with the API key you copied in step 1, and
/var/log/myapp/*.log with the glob that matches your application’s log files.start_at: end skips existing content on first start, so pointing the Collector at an existing
log file does not replay everything already in it. Set it to beginning for a one-time backfill.Grant read access to the log files
The user the Collector runs as may not be able to read files under Alternatively
/var/log/. Add it to
the group that owns them (the Debian/RPM package runs as otelcol-contrib; the group is
often adm on Debian/Ubuntu):sudo chmod a+r the log files, which loosens permissions for every user on
the host.Start the Collector
Point the Collector at the config:If you run it under a service manager instead, point that unit at
/etc/otel/config.yaml and
restart it. Either way, the startup log lines should not contain config-parse or exporter errors.Send a test log line
Create the application log directory if it doesn’t exist yet and append a single line:
What the config does
filelogreceiver: tails the files matched byincludeand emits one OTLP log record per line. The raw line lands inbody, and the receiver populatesobservedTimeUnixNanowith the time it read the line. To split structured fields out of the line, add the receiver’soperators(ajson_parserorregex_parser); without them the whole line is kept verbatim.logs_endpoint: the full logs URL, including/v1/logs. Set this rather thanendpoint, which would append the path itself. Theotlphttpexporter sends OTLP over HTTP as protobuf, which is the only content type Rootprint’s OTLP endpoint accepts.compression: gzip: gzips each request body. Rootprint forwards theContent-Encodingheader to Quickwit unchanged.batchprocessor: groups records before export to cut request count. Tunesend_batch_sizeandtimeoutif you need tighter latency or larger batches.
Troubleshooting
401from Rootprint: theAuthorizationheader is missing or malformed. Confirm theheaders.Authorizationvalue reads exactlyBearer <token>, with a single space.403from Rootprint: the API key’s index scope does not matchotel-logs-v0_9, or the key has been deleted. Mint a fresh ingest API key forotel-logs-v0_9in Settings → API keys.404 unrecognized receiver "filelog"on startup: you are running the core Collector, not Contrib. Installotelcol-contrib.413from a proxy in front of Rootprint: a single batch was too large on the wire. Rootprint sets no OTLP body-size limit, but a reverse proxy may. Lower thebatchprocessor’ssend_batch_size.415from Rootprint: the request is not protobuf. Use theotlphttpexporter (not a custom HTTP exporter that sends JSON);otlphttpdefaults to protobuf.- Collector starts cleanly but no logs appear:
start_at: endskipped the existing file content. Append a new line to trigger a read, or setstart_at: beginningfor a one-time replay. permission deniedreading/var/log/...: the user the Collector runs as can’t read the files. Eithersudo chmod a+rthe log files, or add that user to the group that owns them. (The Debian/RPM package runs asotelcol-contrib.)
Related
- Send logs from Docker: collect every container’s stdout via the Docker daemon, rather than tailing specific files.
- Send logs from Kubernetes: run the Collector as a DaemonSet across a cluster.
- OTLP reference: endpoint URL, response codes, body limits.
- Indexes: the
otel-logs-v0_9schema, so you know what you can search. - Manage indexes: API key lifecycle and per-index permissions.
