Skip to content

The plugin-driven server agent for collecting & reporting metrics.

License

Notifications You must be signed in to change notification settings

LarsStegman/telegraf

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Telegraf

tiger

Contribute Slack Status Circle CI GoDoc Docker pulls Go Report Card

Telegraf is an agent for collecting, processing, aggregating, and writing metrics. Based on a plugin system to enable developers in the community to easily add support for additional metric collection. There are four distinct types of plugins:

  1. Input Plugins collect metrics from the system, services, or 3rd party APIs
  2. Processor Plugins transform, decorate, and/or filter metrics
  3. Aggregator Plugins create aggregate metrics (e.g. mean, min, max, quantiles, etc.)
  4. Output Plugins write metrics to various destinations

New plugins are designed to be easy to contribute, pull requests are welcomed, and we work to incorporate as many pull requests as possible. Consider looking at the list of external plugins as well.

Minimum Requirements

Telegraf shares the same minimum requirements as Go:

  • Linux kernel version 2.6.23 or later
  • Windows 7 or later
  • FreeBSD 11.2 or later
  • MacOS 10.11 El Capitan or later

Obtaining Telegraf

View the changelog for the latest updates and changes by version.

Binary Downloads

Binary downloads are available from the InfluxData downloads page or from each GitHub Releases page.

Package Repository

InfluxData also provides a package repo that contains both DEB and RPM downloads.

For deb-based platforms (e.g. Ubuntu and Debian) run the following to add the repo key and setup a new sources.list entry:

# influxdata-archive_compat.key GPG fingerprint:
#     9D53 9D90 D332 8DC7 D6C8 D3B9 D8FF 8E1F 7DF8 B07E
wget -q https://repos.influxdata.com/influxdata-archive_compat.key
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
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
sudo apt-get update && sudo apt-get install telegraf

For RPM-based platforms (e.g. RHEL, CentOS) use the following to create a repo file and install telegraf:

# influxdata-archive_compat.key GPG 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_compat.key
EOF
sudo yum install telegraf

Build From Source

Telegraf requires Go version 1.20 or newer and the Makefile requires GNU make.

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.

  1. Install Go

  2. Clone the Telegraf repository:

    git clone https://github.com/influxdata/telegraf.git
  3. Run make build from the source directory

    cd telegraf
    make build

Nightly Builds

Nightly builds are available, generated from the master branch.

3rd Party Builds

Builds for other platforms or package formats are provided by members of theTelegraf community. These packages are not built, tested, or supported by the Telegraf project or InfluxData. Please get in touch with the package author if support is needed:

Getting Started

See usage with:

telegraf --help

Generate a telegraf config file

telegraf config > telegraf.conf

Generate config with only cpu input & influxdb output plugins defined

telegraf config --section-filter agent:inputs:outputs --input-filter cpu --output-filter influxdb

Run a single telegraf collection, outputting metrics to stdout

telegraf --config telegraf.conf --test

Run telegraf with all plugins defined in config file

telegraf --config telegraf.conf

Run telegraf, enabling the cpu & memory input, and influxdb output plugins

telegraf --config telegraf.conf --input-filter cpu:mem --output-filter influxdb

Contribute to the Project

Telegraf is an MIT licensed open source project and we love our community. The fastest way to get something fixed is to open a PR. Check out our contributing guide if you're interested in helping out. Also, join us on our Community Slack or Community Page if you have questions or comments for our engineering teams.

If your completely new to Telegraf and InfluxDB, you can also enroll for free at InfluxDB university to take courses to learn more.

Documentation

Latest Release Documentation

For documentation on the latest development code see the documentation index.

About

The plugin-driven server agent for collecting & reporting metrics.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 99.5%
  • Shell 0.3%
  • Makefile 0.1%
  • Ragel 0.1%
  • Ruby 0.0%
  • PowerShell 0.0%