Platform
OpenTelemetry Collector
This document describes a sample setup for sending metrics to Last9 via OpenTelemetry Collector.
Prerequisites
- Create a Last9 cluster by following Getting Started
- Keep the following information handy after creating the cluster:
$levitate_remote_write_url
: Last9’s Remote write endpoint$levitate_remote_write_username
: Cluster ID$levitate_remote_write_password
: Write token created for the cluster
OpenTelemetry Collector Basics
OpenTelemetry collectors consist of three parts:
- Receivers
- A receiver, which can be push or pull-based sends data to the collector
- In this doc, we will use Prometheus receiver, as an example, which will receive metrics
- Processors
- Processors are run on data between being received and being exported
- Processors are not mandatory for sending data to Last9
- Exporters
- An exporter, which can be push or pull-based, sends data to one or more backends/destinations
- We will use Last9 as an exporter destination
Setup
-
Create a
docker-compose.yaml
file with the following config:Note that the image used for OpenTelemetry Collector is
otel/opentelemetry-collector-contrib:0.64.0
which has support for the Basic authentication extension. -
Create
otel-config.yaml
with a sample scrape config. Replace this scrape config by your desired config: -
Deploy the setup using:
As per the config, the entire flow is combined in the pipelines
section under the service
where the data flows from OpenTelemetry Collector to Last9 using the basic auth mechanism.
Troubleshooting
Please get in touch with us on Discord or Email if you have any questions.