Installing the OpenTelemetry Collector
OpenTelemetry Collector is a powerful, vendor-agnostic, and flexible component in the OpenTelemetry ecosystem that simplifies the collection, processing, and export of telemetry data from various sources.
This guide will walk you through the process of setting up and using OpenTelemetry Collector.
Using the OpenTelemetry collector is not mandatory but is recommended as a best practice. Since it provides a local collector agent as the default location for instrumentation libraries to export their telemetry data, the applications can quickly offload the data to the collector. This makes it particularly beneficial in complex and dynamic environments where the telemetry data is generated and consumed by a variety of systems and tools. It streamlines the collection and processing of the telemetry data and can also take care of additional handling such as retries, batching, encryption, granular data filtering, and more.
Step 1:
Prerequisites: A system where you can install the OpenTelemetry Collector. This can be a physical or virtual machine or a container orchestration platform like Kubernetes.
Step 2:
Download and install the latest release of the OpenTelemetry Collector for your Operating System/ architecture from the OpenTelemetry Collector releases page.
Use the following command to pull a docker image and run the collector in a container:
Replace 0.95.0 with the version of the collector that you wish to run.
Use the following command to deploy an agent as a daemonset and a single gateway instance.
For Linux amd64/arm64/i386 systems, every collector release includes APK, DEB, and RPM packaging. It also includes a default configuration that can be found at /etc/otelcol/config.yaml post-installation.
Manual Installation:
Linux releases are available for various architectures as gzipped tarballs (.tar.gz). You can choose from the following packages based on your system architecture:
- linux_386.tar.gz: Linux package for Intel/AMD 32-bit architecture in Tarball format
- linux_amd64.tar.gz: Linux package for Intel/AMD 64-bit architecture in Tarball format
- linux_arm64.tar.gz: Linux package for ARM 64-bit architecture in Tarball format
- linux_armv7.tar.gz: Linux package for ARM 32-bit architecture in Tarball format
- linux_ppc64le.tar.gz: Linux package for PowerPC 64-bit Little-Endian architecture in Tarball format
- linux_s390x.tar.gz: Linux package for IBM System z architecture in Tarball format
Download the archive containing the binary and install it on your machine manually using the following command.
Replace 0.95.0with the version of the collector that you wish to run and linux_amd64.tar.gz with your preferred package name.
APK Installation:
You can choose from the following packages based on your system architecture:
- linux_386.apk: Linux package for Intel/AMD 32-bit architecture in APK format
- linux_amd64.apk: Linux package for Intel/AMD 64-bit architecture in APK format
- linux_arm64.apk: Linux package for ARM 64-bit architecture in APK format
- linux_armv7.apk: Linux package for ARM 32-bit architecture in APK format
- linux_ppc64le.apk: Linux package for PowerPC 64-bit Little-Endian architecture in APK format
- linux_s390x.apk: Linux package for IBM System z architecture in APK format
Run the following command to get started on alpine systems:
Replace 0.95.0with the version of the collector that you wish to run and linux_amd64.apk with your preferred package name.
DEB Installation:
You can choose from the following packages based on your system architecture:
- linux_386.deb: Linux package for Intel/AMD 32-bit architecture in Debian package format
- linux_amd64.deb: Linux package for Intel/AMD 64-bit architecture in Debian package format
- linux_arm64.deb: Linux package for ARM 64-bit architecture in Debian package format
- linux_armv7.deb: Linux package for ARM 32-bit architecture in Debian package format
- linux_ppc64le.deb: Linux package for PowerPC 64-bit Little-Endian architecture in Debian package format
- linux_s390x.deb: Linux package for IBM System z architecture in Debian package format
Run the following command to get started on Debian systems:
Replace 0.95.0with the version of the collector that you wish to run and linux_amd64.deb with your preferred package name.
RPM Installation:
You can choose from the following packages based on your system architecture:
- linux_386.rpm: Linux package for Intel/AMD 32-bit architecture in RPM package format
- linux_amd64.rpm: Linux package for Intel/AMD 64-bit architecture in RPM package format
- linux_arm64.rpm: Linux package for ARM 64-bit architecture in RPM package format
- linux_armv7.rpm: Linux package for ARM 32-bit architecture in RPM package format
- linux_ppc64le.rpm: Linux package for PowerPC 64-bit Little-Endian architecture in RPM package format
- linux_s390x.rpm: Linux package for IBM System z architecture in RPM package format
Run the following command to get started with Red Hat systems:
Replace 0.95.0with the version of the collector that you wish to run and linux_amd64.rpm with your preferred package name.
All Windows releases are packaged as gzipped tarballs (.tar.gz) and will need to be unpacked with a tool that supports this compression format. You can choose from the following packages to download based on your system architecture:
- windows_386.tar.gz: Windows package for Intel/AMD 32-bit architecture in Tarball format
- windows_amd64.tar.gz: Windows package for Intel/AMD 64-bit architecture in Tarball format
Every collector release also includes an otelcol.exe executable that you can run after unpacking.
MacOS releases are available for Intel- & ARM-based systems and are packaged as gzipped tarballs (.tar.gz). You can choose from the following packages to download based on your system architecture:
- darwin_amd64.tar.gz: macOS package for Intel/AMD 64-bit architecture
- darwin_arm64.tar.gz: macOS package for ARM 64-bit architecture
Once downloaded, they will need to be unpacked with a tool that supports this compression format. Every Collector release includes an otelcolexecutable that you can run after unpacking.