LinkMesh

Search docs, blog and changelog

ENDE

Snippets

OpenTelemetry Collector config snippets

Whole collector configs for common jobs, each with the mistake that usually breaks it. Every one passes the collector's own validate (otelcol-contrib v0.165.0) before it is published.

Sources (27)

Tail a log file

Ship an application log file to your backend, and keep your place in it across collector restarts.

Logs

Get the config →

Receive syslog (RFC 5424 and RFC 3164)

Accept modern and legacy syslog on one collector, from network gear and hosts that speak nothing else.

Logs

Get the config →

Receive OTLP over gRPC and HTTP

The front door: accept OTLP from SDKs and other collectors, on both transports, for all three signals.

Logs · Metrics · Traces

Get the config →

Parse JSON log lines into attributes

Turn each JSON log line into attributes you can filter and group by, keeping the original line as the body.

Logs

Get the config →

Parse nginx access logs into semantic conventions

Turn nginx combined-format access log lines into OpenTelemetry semantic-convention attributes, with typed status codes.

Logs

Get the config →

Parse Apache access logs into semantic conventions

Turn Apache combined-format access log lines into semantic-convention attributes, with typed status codes and sizes.

Logs

Get the config →

All 27 sources →

Processors (19)

memory_limiter and batch, in the right order

The two processors every pipeline needs, so a traffic spike neither kills the collector nor floods the backend.

Logs

Get the config →

Mask PII in logs (e-mail, card numbers, IBAN, tokens, IPs)

Rewrite e-mail addresses, card numbers, IBANs, bearer tokens and IPs to placeholders on the collector, before the data leaves your network.

Logs

Get the config →

Redact everything except an attribute allowlist

Turn masking around - name the attributes you keep, and the redaction processor removes everything else.

Logs

Get the config →

Pseudonymise user IDs with a salted hash

Replace user.id with a salted SHA-256 on logs and spans - same user, same value, so per-user queries still join.

Logs · Traces

Get the config →

Drop sensitive attributes before export

Delete named attributes, and every captured HTTP request header, from logs, spans and metrics before they are exported.

Logs · Metrics · Traces

Get the config →

Enforce required resource attributes (semantic conventions)

Refuse telemetry that cannot be attributed - drop anything without service.name, service.namespace and deployment.environment.name.

Logs · Metrics · Traces

Get the config →

All 19 processors →

Destinations (18)

Prove data is flowing with the debug exporter

The first thing to reach for when nothing arrives: print what the collector actually receives.

Logs

Get the config →

Send logs and traces to Elasticsearch

Logs and traces into Elasticsearch, in the OpenTelemetry-native mapping, with the API key from the environment.

Logs · Traces

Get the config →

Send OTLP over gRPC (with headers and TLS)

Forward everything over OTLP/gRPC to a backend or another collector, with a tenant header, compression, a queue and retries.

Logs · Metrics · Traces

Get the config →

Send to Grafana Cloud over OTLP

Logs, metrics and traces to Grafana Cloud's OTLP gateway, authenticated with your instance ID and token from the environment.

Logs · Metrics · Traces

Get the config →

Send metrics with Prometheus remote write

Metrics into Prometheus, Mimir, Thanos or any remote-write store, with resource attributes as labels you can query.

Metrics

Get the config →

Send logs to Loki over native OTLP

Logs into Loki through its native OTLP endpoint - the way that still works in current collectors.

Logs

Get the config →

All 18 destinations →

Pipelines (10)

nginx access logs to Elasticsearch, parsed into semantic conventions

Tail nginx, parse every request into semantic-convention fields with typed status codes, and index it in Elasticsearch.

Logs

Get the config →

Kubernetes pod logs to Loki, enriched with deployment and cluster

Every pod's logs into Loki over OTLP, labelled with namespace, pod, container, deployment, node and cluster.

Logs

Get the config →

Firewall syslog to a SIEM, with PII masked

Firewall and VPN syslog into the SIEM with user names pseudonymised and e-mail addresses masked - IPs kept for correlation.

Logs

Get the config →

Agents to a gateway tier, load-balanced by trace ID

Agents route every span of a trace to the same gateway, so tail sampling on the gateways sees complete traces.

Traces

Get the config →

Buffer through a backend outage with a persistent queue

Keep what arrives while the backend is down on disk, and deliver it when the backend is back - even if the collector restarts in between.

Logs · Traces

Get the config →

Route logs to different backends by attribute (routing connector)

One collector, several backends: the payments team's logs go to their store, everything else to the central one.

Logs

Get the config →

All 10 pipelines →

Looking for configs that use one collector component, such as filelog or k8sattributes? Browse snippets by component →

Running more than one collector?

LinkMesh manages collector configuration across a fleet from one self-hosted control plane, with a built-in library of sources you activate instead of hand-editing YAML on every host.

Install LinkMesh →