2016-05-16 15:16:34 +00:00
|
|
|
# Telegraf [![Circle CI](https://circleci.com/gh/influxdata/telegraf.svg?style=svg)](https://circleci.com/gh/influxdata/telegraf) [![Docker pulls](https://img.shields.io/docker/pulls/library/telegraf.svg)](https://hub.docker.com/_/telegraf/)
|
2015-05-20 05:26:13 +00:00
|
|
|
|
2015-08-06 20:00:14 +00:00
|
|
|
Telegraf is an agent written in Go for collecting metrics from the system it's
|
2016-01-07 22:21:10 +00:00
|
|
|
running on, or from other services, and writing them into InfluxDB or other
|
|
|
|
[outputs](https://github.com/influxdata/telegraf#supported-output-plugins).
|
2015-06-19 16:34:27 +00:00
|
|
|
|
2015-08-06 20:00:14 +00:00
|
|
|
Design goals are to have a minimal memory footprint with a plugin system so
|
|
|
|
that developers in the community can easily add support for collecting metrics
|
2015-09-09 17:00:19 +00:00
|
|
|
from well known services (like Hadoop, Postgres, or Redis) and third party
|
2015-08-06 20:00:14 +00:00
|
|
|
APIs (like Mailchimp, AWS CloudWatch, or Google Analytics).
|
2015-06-19 16:34:27 +00:00
|
|
|
|
2016-01-07 22:21:10 +00:00
|
|
|
New input and output plugins are designed to be easy to contribute,
|
|
|
|
we'll eagerly accept pull
|
|
|
|
requests and will manage the set of plugins that Telegraf supports.
|
|
|
|
See the [contributing guide](CONTRIBUTING.md) for instructions on writing
|
|
|
|
new plugins.
|
2015-06-19 16:34:27 +00:00
|
|
|
|
2015-09-09 17:00:19 +00:00
|
|
|
## Installation:
|
2015-05-20 05:26:13 +00:00
|
|
|
|
2016-01-30 18:30:01 +00:00
|
|
|
### Linux deb and rpm Packages:
|
2015-09-09 17:00:19 +00:00
|
|
|
|
2015-08-20 21:18:45 +00:00
|
|
|
Latest:
|
2016-06-21 13:35:26 +00:00
|
|
|
* https://dl.influxdata.com/telegraf/releases/telegraf_1.0.0-beta2_amd64.deb
|
|
|
|
* https://dl.influxdata.com/telegraf/releases/telegraf-1.0.0_beta2.x86_64.rpm
|
2016-01-07 22:21:10 +00:00
|
|
|
|
2016-02-22 23:59:45 +00:00
|
|
|
Latest (arm):
|
2016-06-21 13:35:26 +00:00
|
|
|
* https://dl.influxdata.com/telegraf/releases/telegraf_1.0.0-beta2_armhf.deb
|
|
|
|
* https://dl.influxdata.com/telegraf/releases/telegraf-1.0.0_beta2.armhf.rpm
|
2016-02-22 23:59:45 +00:00
|
|
|
|
2016-01-30 18:30:01 +00:00
|
|
|
##### Package Instructions:
|
2015-09-09 17:00:19 +00:00
|
|
|
|
2016-01-08 22:07:44 +00:00
|
|
|
* Telegraf binary is installed in `/usr/bin/telegraf`
|
|
|
|
* Telegraf daemon configuration file is in `/etc/telegraf/telegraf.conf`
|
2015-09-09 17:00:19 +00:00
|
|
|
* On sysv systems, the telegraf daemon can be controlled via
|
|
|
|
`service telegraf [action]`
|
|
|
|
* On systemd systems (such as Ubuntu 15+), the telegraf daemon can be
|
|
|
|
controlled via `systemctl [action] telegraf`
|
|
|
|
|
2016-01-30 18:30:01 +00:00
|
|
|
### yum/apt Repositories:
|
|
|
|
|
|
|
|
There is a yum/apt repo available for the whole InfluxData stack, see
|
2016-03-21 20:30:59 +00:00
|
|
|
[here](https://docs.influxdata.com/influxdb/v0.10/introduction/installation/#installation)
|
|
|
|
for instructions on setting up the repo. Once it is configured, you will be able
|
|
|
|
to use this repo to install & update telegraf.
|
2016-01-30 18:30:01 +00:00
|
|
|
|
2016-01-27 18:59:05 +00:00
|
|
|
### Linux tarballs:
|
2015-09-09 17:00:19 +00:00
|
|
|
|
|
|
|
Latest:
|
2016-06-21 13:35:26 +00:00
|
|
|
* https://dl.influxdata.com/telegraf/releases/telegraf-1.0.0-beta2_linux_amd64.tar.gz
|
|
|
|
* https://dl.influxdata.com/telegraf/releases/telegraf-1.0.0-beta2_linux_i386.tar.gz
|
|
|
|
* https://dl.influxdata.com/telegraf/releases/telegraf-1.0.0-beta2_linux_armhf.tar.gz
|
2015-06-19 16:34:27 +00:00
|
|
|
|
2016-03-17 15:53:55 +00:00
|
|
|
### FreeBSD tarball:
|
|
|
|
|
|
|
|
Latest:
|
2016-06-21 13:35:26 +00:00
|
|
|
* https://dl.influxdata.com/telegraf/releases/telegraf-1.0.0-beta2_freebsd_amd64.tar.gz
|
2016-03-17 15:53:55 +00:00
|
|
|
|
2016-01-30 18:53:17 +00:00
|
|
|
### Ansible Role:
|
|
|
|
|
|
|
|
Ansible role: https://github.com/rossmcdonald/telegraf
|
|
|
|
|
2015-06-20 01:53:35 +00:00
|
|
|
### OSX via Homebrew:
|
|
|
|
|
|
|
|
```
|
|
|
|
brew update
|
|
|
|
brew install telegraf
|
|
|
|
```
|
|
|
|
|
2016-02-23 22:59:02 +00:00
|
|
|
### Windows Binaries (EXPERIMENTAL)
|
|
|
|
|
|
|
|
Latest:
|
2016-06-21 13:35:26 +00:00
|
|
|
* https://dl.influxdata.com/telegraf/releases/telegraf-1.0.0-beta2_windows_amd64.zip
|
2016-02-23 22:59:02 +00:00
|
|
|
|
2015-08-18 16:16:59 +00:00
|
|
|
### From Source:
|
|
|
|
|
2015-12-08 23:18:23 +00:00
|
|
|
Telegraf manages dependencies via [gdm](https://github.com/sparrc/gdm),
|
|
|
|
which gets installed via the Makefile
|
2016-01-19 16:37:17 +00:00
|
|
|
if you don't have it already. You also must build with golang version 1.5+.
|
2015-08-26 00:16:01 +00:00
|
|
|
|
|
|
|
1. [Install Go](https://golang.org/doc/install)
|
|
|
|
2. [Setup your GOPATH](https://golang.org/doc/code.html#GOPATH)
|
2016-01-20 18:57:35 +00:00
|
|
|
3. Run `go get github.com/influxdata/telegraf`
|
|
|
|
4. Run `cd $GOPATH/src/github.com/influxdata/telegraf`
|
2015-10-19 21:26:08 +00:00
|
|
|
5. Run `make`
|
2015-08-18 16:16:59 +00:00
|
|
|
|
2016-01-30 18:53:17 +00:00
|
|
|
## How to use it:
|
2015-06-20 01:53:35 +00:00
|
|
|
|
2016-01-07 22:21:10 +00:00
|
|
|
```console
|
|
|
|
$ telegraf -help
|
2016-01-15 19:25:56 +00:00
|
|
|
Telegraf, The plugin-driven server agent for collecting and reporting metrics.
|
2016-01-07 22:21:10 +00:00
|
|
|
|
|
|
|
Usage:
|
|
|
|
|
|
|
|
telegraf <flags>
|
|
|
|
|
|
|
|
The flags are:
|
|
|
|
|
|
|
|
-config <file> configuration file to load
|
|
|
|
-test gather metrics once, print them to stdout, and exit
|
|
|
|
-sample-config print out full sample configuration to stdout
|
|
|
|
-config-directory directory containing additional *.conf files
|
|
|
|
-input-filter filter the input plugins to enable, separator is :
|
|
|
|
-output-filter filter the output plugins to enable, separator is :
|
|
|
|
-usage print usage for a plugin, ie, 'telegraf -usage mysql'
|
2016-01-15 19:25:56 +00:00
|
|
|
-debug print metrics as they're generated to stdout
|
|
|
|
-quiet run in quiet mode
|
2016-01-07 22:21:10 +00:00
|
|
|
-version print the version to stdout
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
|
|
|
# generate a telegraf config file:
|
|
|
|
telegraf -sample-config > telegraf.conf
|
|
|
|
|
|
|
|
# generate config with only cpu input & influxdb output plugins defined
|
|
|
|
telegraf -sample-config -input-filter cpu -output-filter influxdb
|
|
|
|
|
|
|
|
# run a single telegraf collection, outputing 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
|
|
|
|
```
|
2015-05-20 05:26:13 +00:00
|
|
|
|
2015-12-11 20:07:32 +00:00
|
|
|
## Configuration
|
2015-12-01 14:15:28 +00:00
|
|
|
|
2016-02-18 20:37:36 +00:00
|
|
|
See the [configuration guide](docs/CONFIGURATION.md) for a rundown of the more advanced
|
2015-12-11 20:07:32 +00:00
|
|
|
configuration options.
|
2015-11-24 21:22:11 +00:00
|
|
|
|
2016-01-07 22:21:10 +00:00
|
|
|
## Supported Input Plugins
|
2015-08-13 19:44:41 +00:00
|
|
|
|
2016-01-14 19:34:22 +00:00
|
|
|
Telegraf currently has support for collecting metrics from many sources. For
|
|
|
|
more information on each, please look at the directory of the same name in
|
|
|
|
`plugins/inputs`.
|
|
|
|
|
|
|
|
Currently implemented sources:
|
2015-08-13 19:44:41 +00:00
|
|
|
|
2016-04-06 19:49:50 +00:00
|
|
|
* [aws cloudwatch](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/cloudwatch)
|
2016-04-04 22:34:41 +00:00
|
|
|
* [aerospike](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/aerospike)
|
|
|
|
* [apache](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/apache)
|
|
|
|
* [bcache](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/bcache)
|
2016-04-01 23:13:21 +00:00
|
|
|
* [cassandra](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/cassandra)
|
2016-05-18 15:07:17 +00:00
|
|
|
* [ceph](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/ceph)
|
2016-05-24 08:55:25 +00:00
|
|
|
* [chrony](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/chrony)
|
2016-06-01 10:02:28 +00:00
|
|
|
* [consul](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/consul)
|
2016-03-30 04:39:50 +00:00
|
|
|
* [conntrack](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/conntrack)
|
2016-04-04 22:34:41 +00:00
|
|
|
* [couchbase](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/couchbase)
|
|
|
|
* [couchdb](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/couchdb)
|
|
|
|
* [disque](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/disque)
|
|
|
|
* [dns query time](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/dns_query)
|
|
|
|
* [docker](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/docker)
|
|
|
|
* [dovecot](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/dovecot)
|
|
|
|
* [elasticsearch](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/elasticsearch)
|
2016-04-22 01:47:23 +00:00
|
|
|
* [exec](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/exec) (generic executable plugin, support JSON, influx, graphite and nagios)
|
|
|
|
* [filestat](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/filestat)
|
2016-04-04 22:34:41 +00:00
|
|
|
* [haproxy](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/haproxy)
|
2016-04-07 16:31:06 +00:00
|
|
|
* [http_response](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/http_response)
|
|
|
|
* [httpjson](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/httpjson) (generic JSON-emitting http service plugin)
|
2016-04-04 22:34:41 +00:00
|
|
|
* [influxdb](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/influxdb)
|
|
|
|
* [ipmi_sensor](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/ipmi_sensor)
|
|
|
|
* [jolokia](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/jolokia)
|
|
|
|
* [leofs](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/leofs)
|
|
|
|
* [lustre2](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/lustre2)
|
|
|
|
* [mailchimp](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/mailchimp)
|
|
|
|
* [memcached](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/memcached)
|
|
|
|
* [mesos](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/mesos)
|
|
|
|
* [mongodb](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/mongodb)
|
|
|
|
* [mysql](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/mysql)
|
|
|
|
* [net_response](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/net_response)
|
|
|
|
* [nginx](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/nginx)
|
|
|
|
* [nsq](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/nsq)
|
2016-05-17 16:00:46 +00:00
|
|
|
* [nstat](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/nstat)
|
2016-04-04 22:34:41 +00:00
|
|
|
* [ntpq](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/ntpq)
|
|
|
|
* [phpfpm](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/phpfpm)
|
|
|
|
* [phusion passenger](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/passenger)
|
|
|
|
* [ping](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/ping)
|
|
|
|
* [postgresql](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/postgresql)
|
|
|
|
* [postgresql_extensible](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/postgresql_extensible)
|
|
|
|
* [powerdns](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/powerdns)
|
|
|
|
* [procstat](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/procstat)
|
|
|
|
* [prometheus](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/prometheus)
|
|
|
|
* [puppetagent](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/puppetagent)
|
|
|
|
* [rabbitmq](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/rabbitmq)
|
|
|
|
* [raindrops](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/raindrops)
|
|
|
|
* [redis](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/redis)
|
|
|
|
* [rethinkdb](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/rethinkdb)
|
|
|
|
* [riak](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/riak)
|
2016-04-04 21:57:52 +00:00
|
|
|
* [sensors ](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/sensors) (only available if built from source)
|
2016-04-04 22:34:41 +00:00
|
|
|
* [snmp](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/snmp)
|
2016-04-04 21:57:52 +00:00
|
|
|
* [sql server](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/sqlserver) (microsoft)
|
2016-04-04 22:34:41 +00:00
|
|
|
* [twemproxy](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/twemproxy)
|
2016-05-24 10:06:25 +00:00
|
|
|
* [varnish](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/varnish)
|
2016-04-04 22:34:41 +00:00
|
|
|
* [zfs](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/zfs)
|
|
|
|
* [zookeeper](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/zookeeper)
|
2016-04-04 21:57:52 +00:00
|
|
|
* [win_perf_counters ](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/win_perf_counters) (windows performance counters)
|
2016-04-07 17:05:20 +00:00
|
|
|
* [sysstat](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/sysstat)
|
2016-04-04 22:34:41 +00:00
|
|
|
* [system](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/system)
|
2015-09-04 23:05:50 +00:00
|
|
|
* cpu
|
|
|
|
* mem
|
|
|
|
* net
|
2015-10-14 23:53:47 +00:00
|
|
|
* netstat
|
2015-09-04 23:05:50 +00:00
|
|
|
* disk
|
2015-12-11 20:07:32 +00:00
|
|
|
* diskio
|
2015-09-04 23:05:50 +00:00
|
|
|
* swap
|
2016-03-08 10:42:31 +00:00
|
|
|
* processes
|
2016-03-10 12:40:03 +00:00
|
|
|
* kernel (/proc/stat)
|
2016-05-21 22:48:02 +00:00
|
|
|
* kernel (/proc/vmstat)
|
2015-08-13 19:44:41 +00:00
|
|
|
|
2016-01-08 22:07:44 +00:00
|
|
|
Telegraf can also collect metrics via the following service plugins:
|
2015-10-07 22:11:52 +00:00
|
|
|
|
2016-04-04 21:57:52 +00:00
|
|
|
* [statsd](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/statsd)
|
2016-05-18 14:00:30 +00:00
|
|
|
* [tail](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/tail)
|
2016-04-04 21:57:52 +00:00
|
|
|
* [udp_listener](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/udp_listener)
|
|
|
|
* [tcp_listener](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/tcp_listener)
|
|
|
|
* [mqtt_consumer](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/mqtt_consumer)
|
|
|
|
* [kafka_consumer](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/kafka_consumer)
|
|
|
|
* [nats_consumer](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/nats_consumer)
|
2016-05-27 15:27:54 +00:00
|
|
|
* [webhooks](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/webhooks)
|
|
|
|
* [github](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/webhooks/github)
|
2016-07-18 11:41:13 +00:00
|
|
|
* [mandrill](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/webhooks/mandrill)
|
2016-05-27 15:27:54 +00:00
|
|
|
* [rollbar](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/webhooks/rollbar)
|
2016-06-09 19:31:05 +00:00
|
|
|
* [nsq_consumer](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/nsq_consumer)
|
2015-10-07 22:11:52 +00:00
|
|
|
|
2015-08-13 19:44:41 +00:00
|
|
|
We'll be adding support for many more over the coming months. Read on if you
|
|
|
|
want to add support for another service or third-party API.
|
|
|
|
|
2016-01-07 22:21:10 +00:00
|
|
|
## Supported Output Plugins
|
2015-06-19 16:38:31 +00:00
|
|
|
|
2016-04-04 21:57:52 +00:00
|
|
|
* [influxdb](https://github.com/influxdata/telegraf/tree/master/plugins/outputs/influxdb)
|
|
|
|
* [amon](https://github.com/influxdata/telegraf/tree/master/plugins/outputs/amon)
|
|
|
|
* [amqp](https://github.com/influxdata/telegraf/tree/master/plugins/outputs/amqp)
|
|
|
|
* [aws kinesis](https://github.com/influxdata/telegraf/tree/master/plugins/outputs/kinesis)
|
|
|
|
* [aws cloudwatch](https://github.com/influxdata/telegraf/tree/master/plugins/outputs/cloudwatch)
|
|
|
|
* [datadog](https://github.com/influxdata/telegraf/tree/master/plugins/outputs/datadog)
|
2016-04-12 20:50:56 +00:00
|
|
|
* [file](https://github.com/influxdata/telegraf/tree/master/plugins/outputs/file)
|
2016-04-04 21:57:52 +00:00
|
|
|
* [graphite](https://github.com/influxdata/telegraf/tree/master/plugins/outputs/graphite)
|
2016-05-31 15:42:07 +00:00
|
|
|
* [graylog](https://github.com/influxdata/telegraf/tree/master/plugins/outputs/graylog)
|
2016-05-02 14:58:29 +00:00
|
|
|
* [instrumental](https://github.com/influxdata/telegraf/tree/master/plugins/outputs/instrumental)
|
2016-04-04 21:57:52 +00:00
|
|
|
* [kafka](https://github.com/influxdata/telegraf/tree/master/plugins/outputs/kafka)
|
|
|
|
* [librato](https://github.com/influxdata/telegraf/tree/master/plugins/outputs/librato)
|
|
|
|
* [mqtt](https://github.com/influxdata/telegraf/tree/master/plugins/outputs/mqtt)
|
|
|
|
* [nsq](https://github.com/influxdata/telegraf/tree/master/plugins/outputs/nsq)
|
|
|
|
* [opentsdb](https://github.com/influxdata/telegraf/tree/master/plugins/outputs/opentsdb)
|
|
|
|
* [prometheus](https://github.com/influxdata/telegraf/tree/master/plugins/outputs/prometheus_client)
|
|
|
|
* [riemann](https://github.com/influxdata/telegraf/tree/master/plugins/outputs/riemann)
|
2015-06-19 16:38:31 +00:00
|
|
|
|
2015-08-28 16:18:46 +00:00
|
|
|
## Contributing
|
2015-06-19 16:38:31 +00:00
|
|
|
|
2015-08-28 16:18:46 +00:00
|
|
|
Please see the
|
2015-09-09 17:00:19 +00:00
|
|
|
[contributing guide](CONTRIBUTING.md)
|
2016-01-30 18:53:17 +00:00
|
|
|
for details on contributing a plugin to Telegraf.
|