Skip to content

Onboard your first log

This walkthrough takes a fresh host all the way to a live log pipeline: install a collector, point it at a log file, route the records to a destination, and verify they arrive. It’s the path most operators take on day one.

By the end you’ll have a collector reading a log file, a route forwarding those records to a destination, and a topology canvas that shows the records flowing. Total time: about 10 minutes.

You need:

  • A running LinkMesh server you can reach in a browser (the Quickstart brings one up with Docker Compose).
  • A Linux host that produces a log file you want to collect — anything under /var/log works. This walkthrough uses /var/log/app.log.
  • Admin access to the server UI.

On the host, run the OpAMP install snippet. The server hands you a personalised one-liner under Collectors → + Add Collector; it bakes in your server URL and a single-use enrollment token:

curl -fsSL https://<your-server>/install-opamp.sh | sudo sh -s -- --token <enrollment-token> --env production

The script installs otelcol-contrib and the OpAMP supervisor as a systemd service, then connects back over the control channel. Within a few seconds the host appears in Collectors, online and awaiting configuration.

The Collectors page — enrolled hosts appear here online, with their tags and last-seen time.
An enrolled agent reporting the service-detection and log-discovery capabilities behind Discover sources on the collector's Sources tab.

A source is the receiver side of the pipeline — what reads telemetry into the collector. You add it on the collector that runs it: open the collector, go to its Sources tab, click Add Source and pick the File Tail receiver type. Saving creates the source and attaches it to this collector in one step. With the agent on the host, Discover sources next to Add Source suggests the log files it found instead.

Adding a source: name it, choose a receiver type — File Tail tails one or more log files on the collector host — and configure it inline.

Give it a name (App logs), set the signal type to logs, and set the include path to the file you want to read:

include:
  - /var/log/app.log
A File Tail source configured to read one log file (here /var/log/checkout/orders.log). The include list accepts glob patterns, so /var/log/*.log tails a whole directory.

A destination is where matched records leave the collector. Open Library → Destinations and create one — Grafana Cloud Loki, an OTLP endpoint, Elasticsearch, and others ship as templates. Fill in the connection details for your backend; this walkthrough sends to an OTLP endpoint.

The Destinations library. Pick the exporter that matches your backend and fill in its connection settings — endpoint, credentials, TLS.

A source reads records and a destination receives them, but nothing connects the two until a route does. Open the collector, switch to the Routing tab, and create a route:

  • Pipeline: leave it as the passthrough pipeline (no processing), or pick one you’ve built — see Build your first pipeline.
  • Destination: the destination from step 3.
  • Filter: leave it as true to accept every record.

Save the route. The collector regenerates its configuration and applies it within a few seconds — the Last applied timestamp on the collector detail page is the authoritative confirmation.

The collector detail page. The Routing tab is where sources, pipelines, and destinations are wired together for this collector.

Append a line to the log file on the host so the File Tail source has something fresh to read:

echo "$(date -u +%FT%TZ) INFO hello from my first log source" >> /var/log/app.log

Open Routing from the sidebar. The canvas draws the collector and the destination as nodes, with the active route between them.

The topology canvas. Each collector forwards logs to its destinations over the routes; the LOGS badge marks the signal type carried.

The line you appended travels File Tail → route → destination. Confirm it arrived at your backend (the records carry linkmesh.source.id and linkmesh.source.name attributes, added by the route so you can tell which source they came from). That’s the full path — source to destination, verified.

Complete OpenTelemetry Collector configs for the same jobs, validated against the collector and with the mistake that usually breaks each one: