github.com/influxdata/telegraf@v1.30.3/docs/INSTALL_GUIDE.md (about)

     1  # Installation
     2  
     3  Telegraf compiles to a single static binary, which makes it easy to install.
     4  Both InfluxData and the community provide for a wide range of methods to install
     5  Telegraf from. For details on each release, view the [changelog][] for the
     6  latest updates and changes by version.
     7  
     8  [changelog]: /CHANGELOG.md
     9  
    10  There are many places to obtain Telegraf from:
    11  
    12  * [Binary downloads](#binary-downloads)
    13  * [Homebrew](#homebrew)
    14  * [InfluxData Linux package repository](#influxdata-linux-package-repository)
    15  * [Official Docker images](#official-docker-images)
    16  * [Helm charts](#helm-charts)
    17  * [Nightly builds](#nightly-builds)
    18  * [Build from source](#build-from-source)
    19  * [Custom builder](#custom-builder)
    20  
    21  ## Binary downloads
    22  
    23  Binary downloads for a wide range of architectures and operating systems are
    24  available from the [InfluxData downloads][] page or from the
    25  [GitHub Releases][] page.
    26  
    27  [InfluxData downloads]: https://www.influxdata.com/downloads
    28  [GitHub Releases]: https://github.com/influxdata/telegraf/releases
    29  
    30  ## Homebrew
    31  
    32  A [Homebrew Formula][] for Telegraf that updates after each release:
    33  
    34  ```shell
    35  brew update
    36  brew install telegraf
    37  ```
    38  
    39  Note that the Homebrew organization builds Telegraf itself and does not use
    40  binaries built by InfluxData. This is important as Homebrew builds with CGO,
    41  which means there are some differences between the official binaries and those
    42  found with Homebrew.
    43  
    44  [Homebrew Formula]: https://formulae.brew.sh/formula/telegraf
    45  
    46  ## InfluxData Linux package repository
    47  
    48  InfluxData provides a package repo that contains both DEB and RPM packages.
    49  
    50  ### DEB
    51  
    52  For DEB-based platforms (e.g. Ubuntu and Debian) run the following to add the
    53  repo GPG key and setup a new sources.list entry:
    54  
    55  ```shell
    56  # influxdata-archive_compat.key GPG fingerprint:
    57  #     9D53 9D90 D332 8DC7 D6C8 D3B9 D8FF 8E1F 7DF8 B07E
    58  wget -q https://repos.influxdata.com/influxdata-archive_compat.key
    59  echo '393e8779c89ac8d958f81f942f9ad7fb82a25e133faddaf92e15b16e6ac9ce4c influxdata-archive_compat.key' | sha256sum -c && cat influxdata-archive_compat.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg > /dev/null
    60  echo 'deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg] https://repos.influxdata.com/debian stable main' | sudo tee /etc/apt/sources.list.d/influxdata.list
    61  sudo apt-get update && sudo apt-get install telegraf
    62  ```
    63  
    64  ### RPM
    65  
    66  For RPM-based platforms (e.g. RHEL, CentOS) use the following to create a repo
    67  file and install telegraf:
    68  
    69  ```shell
    70  # influxdata-archive_compat.key GPG fingerprint:
    71  #     9D53 9D90 D332 8DC7 D6C8 D3B9 D8FF 8E1F 7DF8 B07E
    72  cat <<EOF | sudo tee /etc/yum.repos.d/influxdata.repo
    73  [influxdata]
    74  name = InfluxData Repository - Stable
    75  baseurl = https://repos.influxdata.com/stable/\$basearch/main
    76  enabled = 1
    77  gpgcheck = 1
    78  gpgkey = https://repos.influxdata.com/influxdata-archive_compat.key
    79  EOF
    80  sudo yum install telegraf
    81  ```
    82  
    83  ## Official Docker images
    84  
    85  Telegraf is available as an [Official image][] on DockerHub. Official images
    86  are a curated set of Docker Images that also automatically get security updates
    87  from Docker, follow a set of best practices, and are available via a shortcut
    88  syntax which omits the organization.
    89  
    90  InfluxData maintains a Debian and Alpine based image across the last three
    91  minor releases. To pull the latest Telegraf images:
    92  
    93  ```shell
    94  # latest Debian-based image
    95  docker pull telegraf
    96  # latest Alpine-based image
    97  docker pull telegraf:alpine
    98  ```
    99  
   100  See the [Telegraf DockerHub][] page for complete details on available images,
   101  versions, and tags.
   102  
   103  [official image]: https://docs.docker.com/trusted-content/official-images/
   104  [Telegraf DockerHub]: https://hub.docker.com/_/telegraf
   105  
   106  ## Helm charts
   107  
   108  A community-supported [helm chart][] is also available:
   109  
   110  ```shell
   111  helm repo add influxdata https://helm.influxdata.com/
   112  helm search repo influxdata
   113  ```
   114  
   115  [helm chart]: https://github.com/influxdata/helm-charts/tree/master/charts/telegraf
   116  
   117  ## Nightly builds
   118  
   119  [Nightly builds][] are available and are generated from the master branch each
   120  day at around midnight UTC. The artifacts include both binary packages, RPM &
   121  DEB packages, as well as nightly Docker images that are hosted on [quay.io][].
   122  
   123  [Nightly builds]: /docs/NIGHTLIES.md
   124  [quay.io]: https://quay.io/repository/influxdb/telegraf-nightly?tab=tags&tag=latest
   125  
   126  ## Build from source
   127  
   128  Telegraf generally follows the latest version of Go and requires GNU make to use
   129  the Makefile for builds.
   130  
   131  On Windows, the makefile requires the use of a bash terminal to support all
   132  makefile targets. An easy option to get bash for windows is using the version
   133  that comes with [git for windows](https://gitforwindows.org/).
   134  
   135  1. [Install Go](https://golang.org/doc/install)
   136  2. Clone the Telegraf repository:
   137  
   138     ```shell
   139     git clone https://github.com/influxdata/telegraf.git
   140     ```
   141  
   142  3. Run `make build` from the source directory
   143  
   144     ```shell
   145     cd telegraf
   146     make build
   147     ```
   148  
   149  ## Custom builder
   150  
   151  Telegraf also provides a way of building a custom minimized binary using the
   152  [custom builder][]. This takes a user's configuration file(s), determines what
   153  plugins are required, and builds a binary with only those plugins. This greatly
   154  reduces the size of the Telegraf binary.
   155  
   156  [custom builder]: /tools/custom_builder