Go to file
Joshua Powers 9daefaba11
test: harden running of testcontainer integration tests (#11245)
2022-06-03 10:29:08 -06:00
.circleci chore: update go from v1.18.1 to v1.18.3 (#11248) 2022-06-02 14:19:18 -06:00
.github fix: update golangci-lint from v1.45.2 to v1.46.2 (#11191) 2022-05-25 12:48:45 -06:00
agent fix: change name of snmp translator setting (#10872) 2022-03-23 09:27:58 -06:00
assets docs: improve documentation around contribution (#10825) 2022-03-28 09:47:02 -06:00
cmd/telegraf fix(cmd): Also allow 0 outputs when using test-wait parameter (#11013) 2022-04-21 15:00:03 -06:00
config style: align plugin renaming (#10868) 2022-04-28 13:40:34 -06:00
docs chore: update go from v1.18.1 to v1.18.3 (#11248) 2022-06-02 14:19:18 -06:00
etc feat: add slab metrics input plugin (#11075) 2022-05-18 22:42:17 -05:00
filter Generic SQL input (#8735) 2021-06-15 13:10:52 -06:00
internal fix(inputs/snmp): switch new Reconnect method to be a value receiver (#11197) 2022-05-27 15:03:46 -06:00
logger test: use `T.TempDir` to create temporary test directory (#10988) 2022-04-18 13:27:59 -06:00
metric chore: typos across source code comments (#10361) 2022-01-05 08:20:10 -07:00
models fix: linter fixes for "import-shadowing: The name '...' shadows an import name" (#10689) 2022-02-22 08:11:30 -07:00
plugins test: harden running of testcontainer integration tests (#11245) 2022-06-03 10:29:08 -06:00
scripts chore: update go from v1.18.1 to v1.18.3 (#11248) 2022-06-02 14:19:18 -06:00
selfstat Remove error return type from metric.New method (#9116) 2021-04-13 14:40:03 -04:00
testutil test: harden running of testcontainer integration tests (#11245) 2022-06-03 10:29:08 -06:00
tools chore: correctly spell embed (#11200) 2022-05-27 07:13:47 -06:00
.gitattributes Fix tests for Windows - part 1 (#8414) 2020-11-23 10:40:32 -05:00
.gitignore chore: Embed sample configurations into README for inputs (#11136) 2022-05-24 08:49:47 -05:00
.golangci.yml fix: Linter fixes for config/config.go (#10710) 2022-02-22 18:47:04 -07:00
.markdownlint.yml feat: Implement deprecation infrastructure (#10200) 2021-12-01 12:38:43 -07:00
CHANGELOG.md test: add test for mysql gatherGlobalVariables using sql-mock (#10987) 2022-05-16 15:11:25 -06:00
CONTRIBUTING.md test: remove docker-compose.yml test file (#11243) 2022-06-02 11:33:41 -06:00
EXTERNAL_PLUGINS.md feat: add external huebridge input plugin (#11159) 2022-05-23 07:26:58 -06:00
LICENSE Build packages in makefile (#7759) 2020-06-30 00:15:28 -07:00
Makefile chore: update go from v1.18.1 to v1.18.3 (#11248) 2022-06-02 14:19:18 -06:00
README.md chore: Update Go to 1.18.1 (#10961) 2022-04-13 16:50:39 -05:00
SECURITY.md chore: clean up all markdown lint errors in root directory (#10154) 2021-11-24 11:45:31 -07:00
accumulator.go chore: typos across source code comments (#10361) 2022-01-05 08:20:10 -07:00
aggregator.go add support for streaming processors (#7634) 2020-06-05 10:43:43 -04:00
build_version.txt Update build version to 1.23.0 2022-03-23 13:13:32 -06:00
go.mod fix: update moby/ipvs dependency from v1.0.1 to v1.0.2 (#11242) 2022-06-02 09:04:58 -06:00
go.sum fix: update moby/ipvs dependency from v1.0.1 to v1.0.2 (#11242) 2022-06-02 09:04:58 -06:00
info.plist Mac Packaging / Notarization (#8878) 2021-03-05 10:14:01 -05:00
input.go add plugin documentation 2020-10-14 12:27:16 -04:00
metric.go Cleanup metric type docs (#9244) 2021-05-20 16:34:07 -04:00
output.go add plugin documentation 2020-10-14 12:27:16 -04:00
parser.go feat: Parser plugin restructuring (#8791) 2022-01-12 15:54:42 -07:00
plugin.go feat: generate the plugins sample config (#10886) 2022-04-05 17:11:09 -05:00
processor.go add plugin documentation 2020-10-14 12:27:16 -04:00

README.md

Telegraf

tiger

Contribute Slack Status Circle CI GoDoc Docker pulls

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:

wget -qO- https://repos.influxdata.com/influxdb.key | sudo tee /etc/apt/trusted.gpg.d/influxdata.asc >/dev/null
echo "deb 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:

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

Build From Source

Telegraf requires Go version 1.18 or newer, the Makefile requires GNU make.

  1. Install Go >=1.18 (1.18.0 recommended)

  2. Clone the Telegraf repository:

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

    cd telegraf
    make
    

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 --section-filter agent:inputs:outputs --input-filter cpu --output-filter influxdb config

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.