For the complete documentation index, see llms.txt. This page is also available as Markdown.
Page cover

Bare-Metal

Gathering and sending telemetry from Bare Metal Hosts is easy. An example config is shown below.

Prerequisite

Download the relevant binary from: https://opentelemetry.io/docs/collector/installation

An example:

sudo yum update
sudo yum -y install wget systemctl
wget https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.116.1/otelcol-contrib_0.116.1_linux_amd64.rpm
sudo rpm -ivh otelcol-contrib_0.116.1_linux_amd64.rpm

Remove default config

sudo rm /etc/otelcol-contrib/config.yaml

Copy "Example Config" (below). Replace {INTAKE} and {AUTH_TOKEN} :

sudo nano /etc/otelcol-contrib/config.yaml

Restart Collector Service:

sudo systemctl restart otelcol-contrib

Check Status:

sudo systemctl status otelcol-contrib

Example Config

This is a full-fledged example you can use to gather system metrics (excluding per process) and traces locally:

Metrics (System)

The hostmetrics section in the Example Config sets typical system scrapers. You can always customize this: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/hostmetricsreceiver#getting-started

For example, setting different collection interval and adding per-process collection:

Logs

To add logs, you can add logs to the pipeline.

Example with OTLP

Example with filelog receiver (https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/filelogreceiver). Note how fault-tolerant log collection is enabled with storage and sending queue (this can be disabled):

Last updated