Title
Create new category
Edit page index title
Edit category
Edit link
OpenTelemetry Collector
Description
You can export your telemetry data directly to Mezmo with the OpenTelemetry Exporter. If you are already using OpenTelemetry Collector, you can start sending log data by adding the Mezmo Exporter to your existing Pipelines. If you are new to OTEL, you can use this quick start example to get you up and running.
Example OpenTelemetry Exporter Setup
- Download the appropriate OTEL collector for your environment from the OpenTelemetry website.
- Create a new pipeline in Mezmo.
- Add an OpenTelemetry Source node.
- Create a configuration file
config.yamlwith these contents:
xxxxxxxxxxreceivers: filelog: #This will collect new lines from log files in /var/log include: [/var/log/*.log] hostmetrics: #This will collect metrics about the host on which the collector is running. scrapers: cpu: disk: filesystem: load: memory: jaeger: #This will expose an endpoint where you can send traces protocols: grpc: endpoint: "0.0.0.0:14250"exporters: otlphttp/mezmo: endpoint: "http://logs.mezmo.com/otel" headers: apikey: "<ingestion key>" processors: batch: service: pipelines: logs: receivers: [filelog] exporters: [otlphttp/mezmo] traces: receivers: [jaeger] processors: [batch] exporters: [otlphttp/mezmo] metrics: receivers: [hostmetrics] processors: [batch] exporters: [otlphttp/mezmo]- Start the Collector with this command:
./otelcol-contrib --config /path/to/config.yaml - The Collector will start sending logs, metrics and traces to your Pipeline.
For complete information on setting up and configuring the OpenTelemetry Collector, visit https://opentelemetry.io/docs/collector/configuration
Installing the Collector via a Helm Chart
You can install the OpenTelemetry collector directly in a Kubernetes cluster using a Helm chart.
If you don't have the OpenTelemetry repo added to your Helm list, you must add it first.
xxxxxxxxxxhelm repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-chartsUpdate your repos once you've added the OpenTelemetry repo.
xxxxxxxxxxhelm repo updateNext, create a namespace to run this:
xxxxxxxxxxkubectl create namespace mezmoNow create a secret to store your ingestion key:
xxxxxxxxxxkubectl create secret generic mezmo-otlp \ --namespace=mezmo \ --from-literal=ingestion-key=000000000000000000000000000000000Now create a values.yaml file. This example file will give you an otlp source within your cluster and export your telemetry to mezmo:
xxxxxxxxxx# OpenTelemetry Collector — Mezmo OTLP forwarder## Chart: open-telemetry/opentelemetry-collector# Install:# helm repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-charts# helm repo update# helm upgrade --install otel-collector open-telemetry/opentelemetry-collector \# -n otel --create-namespace -f values.yaml## What this does:# - Runs as a DaemonSet so every node tails /var/log/pods/*/*/*.log# - Exposes a ClusterIP Service at# otel-collector-opentelemetry-collector.otel.svc.cluster.local# accepting OTLP/gRPC (4317) and OTLP/HTTP (4318) for logs, metrics, traces# - Forwards everything to https://logs.use.dev.mezmo.it/otel via otlphttp mode: daemonset # contrib distribution — required for filelog, k8sattributes, etc.image:... # tag: "0.115.0" # pin to a known-good release # Stable in-cluster endpoint for other workloads to send OTLP to.service:... # Trim chart-default ports we don't use; keep OTLP gRPC + HTTP.ports:... resources:... # Pull the Mezmo ingestion key from the `mezmo-otlp` Secret (see secret.yaml).extraEnvs:... # Presets do the Kubernetes plumbing for us:# logsCollection -> mounts /var/log/pods, adds filelog receiver, wires it into the logs pipeline# kubernetesAttributes -> creates RBAC + adds k8sattributes processor to every pipelinepresets:... config:... Then you can install the chart to deploy the Collector:
xxxxxxxxxxhelm upgrade \ --install \ --namespace mezmo \ mezmo-otel-collector open-telemetry/opentelemetry-collector \ --values .\your-values-file.yaml \ --rollback-on-failure \ # roll back automatically if the release fails to come up healthy --wait \ --timeout 5m