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:
- Input Plugins collect metrics from the system, services, or 3rd party APIs
- Processor Plugins transform, decorate, and/or filter metrics
- Aggregator Plugins create aggregate metrics (e.g. mean, min, max, quantiles, etc.)
- 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.
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
View the changelog for the latest updates and changes by version.
Binary downloads are available from the InfluxData downloads page or from each GitHub Releases page.
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:
# influxdb.key GPG Fingerprint: 05CE15085FC09D18E99EFB22684A14CF2582E0C5
wget -q https://repos.influxdata.com/influxdb.key
echo '23a1c8836f0afc5ed24e0486339d7cc8f6790b83886c4c96995b88a061c5bb5d influxdb.key' | sha256sum -c && cat influxdb.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/influxdb.gpg > /dev/null
echo 'deb [signed-by=/etc/apt/trusted.gpg.d/influxdb.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:
# influxdb.key GPG Fingerprint: 05CE15085FC09D18E99EFB22684A14CF2582E0C5
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/influxdb.key
EOF
sudo yum install telegraf
Telegraf requires Go version 1.18 or newer, the Makefile requires GNU make.
-
Install Go >=1.18 (1.18.0 recommended)
-
Clone the Telegraf repository:
git clone https://github.com/influxdata/telegraf.git
-
Run
make
from the source directorycd telegraf make
Nightly builds are available, generated from the master branch.
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:
- Ansible Role
- Chocolatey by ripclawffb
- Scoop
- Snap by Laurent Sesquès (sajoupa)
See usage with:
telegraf --help
telegraf config > telegraf.conf
telegraf --section-filter agent:inputs:outputs --input-filter cpu --output-filter influxdb config
telegraf --config telegraf.conf --test
telegraf --config telegraf.conf
telegraf --config telegraf.conf --input-filter cpu:mem --output-filter influxdb
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.
For documentation on the latest development code see the documentation index.