Telegraf compiles to a single static binary, which makes it easy to install. Both InfluxData and the community provide for a wide range of methods to install Telegraf from. For details on each release, view the changelog for the latest updates and changes by version.
There are many places to obtain Telegraf from:
- Binary downloads
- Homebrew
- InfluxData Linux package repository
- Official Docker images
- Helm charts
- Nightly builds
- Build from source
- Custom builder
Binary downloads for a wide range of architectures and operating systems are available from the InfluxData downloads page or from the GitHub Releases page.
A Homebrew Formula for Telegraf that updates after each release:
brew update
brew install telegrafNote that the Homebrew organization builds Telegraf itself and does not use binaries built by InfluxData. This is important as Homebrew builds with CGO, which means there are some differences between the official binaries and those found with Homebrew.
InfluxData provides a package repo that contains both DEB and RPM packages.
For DEB-based platforms (e.g. Ubuntu and Debian) run the following to add the repo GPG key and setup a new sources.list entry:
# influxdata-archive.key GPG fingerprint:
# Primary key fingerprint: 24C9 75CB A61A 024E E1B6 3178 7C3D 5715 9FC2 F927
# Subkey fingerprint: 9D53 9D90 D332 8DC7 D6C8 D3B9 D8FF 8E1F 7DF8 B07E
wget -q https://repos.influxdata.com/influxdata-archive.key
gpg --show-keys --with-fingerprint --with-colons ./influxdata-archive.key 2>&1 | grep -q '^fpr:\+24C975CBA61A024EE1B631787C3D57159FC2F927:$' && cat influxdata-archive.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/influxdata-archive.gpg > /dev/null
echo 'deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive.gpg] https://repos.influxdata.com/debian stable main' | sudo tee /etc/apt/sources.list.d/influxdata.list
sudo apt-get update && sudo apt-get install telegrafFor RPM-based platforms (e.g. RHEL, CentOS) use the following to create a repo file and install telegraf:
# influxdata-archive.key GPG fingerprint:
# Primary key fingerprint: 24C9 75CB A61A 024E E1B6 3178 7C3D 5715 9FC2 F927
# Subkey fingerprint: 9D53 9D90 D332 8DC7 D6C8 D3B9 D8FF 8E1F 7DF8 B07E
cat <<EOF | sudo tee /etc/yum.repos.d/influxdata.repo
[influxdata]
name = InfluxData Repository - Stable
baseurl = https://repos.influxdata.com/stable/\$basearch/main
enabled = 1
gpgcheck = 1
gpgkey = https://repos.influxdata.com/influxdata-archive.key
EOF
sudo yum install telegrafTelegraf is available as an Official image on DockerHub. Official images are a curated set of Docker Images that also automatically get security updates from Docker, follow a set of best practices, and are available via a shortcut syntax which omits the organization.
InfluxData maintains a Debian and Alpine based image across the last three minor releases. To pull the latest Telegraf images:
# latest Debian-based image
docker pull telegraf
# latest Alpine-based image
docker pull telegraf:alpineSee the Telegraf DockerHub page for complete details on available images, versions, and tags.
A community-supported helm chart is also available:
helm repo add influxdata https://helm.influxdata.com/
helm search repo influxdataNightly builds are available and are generated from the master branch each day at around midnight UTC. The artifacts include both binary packages, RPM & DEB packages, as well as nightly Docker images that are hosted on quay.io.
Telegraf generally follows the latest version of Go and requires GNU make to use the Makefile for builds.
On Windows, the makefile requires the use of a bash terminal to support all makefile targets. An easy option to get bash for windows is using the version that comes with git for windows.
-
Clone the Telegraf repository:
git clone https://github.com/influxdata/telegraf.git
-
Run
make buildfrom the source directorycd telegraf make build
Telegraf also provides a way of building a custom minimized binary using the custom builder. This takes a user's configuration file(s), determines what plugins are required, and builds a binary with only those plugins. This greatly reduces the size of the Telegraf binary.