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
|
|
|
|
2016-11-04 14:12:22 +00:00
|
|
|
Telegraf is an agent written in Go for collecting, processing, aggregating,
|
|
|
|
and writing metrics.
|
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-11-04 14:12:22 +00:00
|
|
|
Telegraf is plugin-driven and has the concept of 4 distinct plugins:
|
|
|
|
|
|
|
|
1. [Input Plugins](#input-plugins) collect metrics from the system, services, or 3rd party APIs
|
|
|
|
2. [Processor Plugins](#processor-plugins) transform, decorate, and/or filter metrics
|
|
|
|
3. [Aggregator Plugins](#aggregator-plugins) create aggregate metrics (e.g. mean, min, max, quantiles, etc.)
|
|
|
|
4. [Output Plugins](#output-plugins) write metrics to various destinations
|
|
|
|
|
|
|
|
For more information on Processor and Aggregator plugins please [read this](./docs/AGGREGATORS_AND_PROCESSORS.md).
|
|
|
|
|
|
|
|
New plugins are designed to be easy to contribute,
|
2016-01-07 22:21:10 +00:00
|
|
|
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
|
|
|
|
2017-01-13 17:02:10 +00:00
|
|
|
You can either download the binaries directly from the
|
|
|
|
[downloads](https://www.influxdata.com/downloads) page.
|
2015-09-09 17:00:19 +00:00
|
|
|
|
2017-01-13 17:02:10 +00:00
|
|
|
A few alternate installs are available here as well:
|
2015-06-19 16:34:27 +00:00
|
|
|
|
2016-03-17 15:53:55 +00:00
|
|
|
### FreeBSD tarball:
|
|
|
|
|
|
|
|
Latest:
|
2017-01-13 17:02:10 +00:00
|
|
|
* https://dl.influxdata.com/telegraf/releases/telegraf-VERSION_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-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-10-25 12:47:38 +00:00
|
|
|
See usage with:
|
2016-01-07 22:21:10 +00:00
|
|
|
|
2016-10-25 12:47:38 +00:00
|
|
|
```
|
|
|
|
telegraf --help
|
|
|
|
```
|
2016-01-07 22:21:10 +00:00
|
|
|
|
2017-01-13 17:02:10 +00:00
|
|
|
#### Generate a telegraf config file:
|
2016-01-07 22:21:10 +00:00
|
|
|
|
2016-10-25 12:47:38 +00:00
|
|
|
```
|
|
|
|
telegraf config > telegraf.conf
|
|
|
|
```
|
2016-01-07 22:21:10 +00:00
|
|
|
|
2017-01-13 17:02:10 +00:00
|
|
|
#### Generate config with only cpu input & influxdb output plugins defined
|
2016-10-05 12:53:43 +00:00
|
|
|
|
2016-10-25 12:47:38 +00:00
|
|
|
```
|
|
|
|
telegraf --input-filter cpu --output-filter influxdb config
|
|
|
|
```
|
2016-01-07 22:21:10 +00:00
|
|
|
|
2017-01-13 17:02:10 +00:00
|
|
|
#### Run a single telegraf collection, outputing metrics to stdout
|
2016-01-07 22:21:10 +00:00
|
|
|
|
2016-10-25 12:47:38 +00:00
|
|
|
```
|
|
|
|
telegraf --config telegraf.conf -test
|
|
|
|
```
|
2016-01-07 22:21:10 +00:00
|
|
|
|
2017-01-13 17:02:10 +00:00
|
|
|
#### Run telegraf with all plugins defined in config file
|
2016-01-07 22:21:10 +00:00
|
|
|
|
2016-10-25 12:47:38 +00:00
|
|
|
```
|
|
|
|
telegraf --config telegraf.conf
|
|
|
|
```
|
2016-01-07 22:21:10 +00:00
|
|
|
|
2017-01-13 17:02:10 +00:00
|
|
|
#### Run telegraf, enabling the cpu & memory input, and influxdb output plugins
|
2016-01-07 22:21:10 +00:00
|
|
|
|
|
|
|
```
|
2016-10-25 12:47:38 +00:00
|
|
|
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-11-04 14:12:22 +00:00
|
|
|
## Input Plugins
|
|
|
|
|
|
|
|
* [aws cloudwatch](./plugins/inputs/cloudwatch)
|
|
|
|
* [aerospike](./plugins/inputs/aerospike)
|
|
|
|
* [apache](./plugins/inputs/apache)
|
|
|
|
* [bcache](./plugins/inputs/bcache)
|
|
|
|
* [cassandra](./plugins/inputs/cassandra)
|
|
|
|
* [ceph](./plugins/inputs/ceph)
|
|
|
|
* [chrony](./plugins/inputs/chrony)
|
|
|
|
* [consul](./plugins/inputs/consul)
|
|
|
|
* [conntrack](./plugins/inputs/conntrack)
|
|
|
|
* [couchbase](./plugins/inputs/couchbase)
|
|
|
|
* [couchdb](./plugins/inputs/couchdb)
|
|
|
|
* [disque](./plugins/inputs/disque)
|
|
|
|
* [dns query time](./plugins/inputs/dns_query)
|
|
|
|
* [docker](./plugins/inputs/docker)
|
|
|
|
* [dovecot](./plugins/inputs/dovecot)
|
|
|
|
* [elasticsearch](./plugins/inputs/elasticsearch)
|
|
|
|
* [exec](./plugins/inputs/exec) (generic executable plugin, support JSON, influx, graphite and nagios)
|
|
|
|
* [filestat](./plugins/inputs/filestat)
|
|
|
|
* [haproxy](./plugins/inputs/haproxy)
|
|
|
|
* [hddtemp](./plugins/inputs/hddtemp)
|
|
|
|
* [http_response](./plugins/inputs/http_response)
|
|
|
|
* [httpjson](./plugins/inputs/httpjson) (generic JSON-emitting http service plugin)
|
2016-11-07 08:34:46 +00:00
|
|
|
* [internal](./plugins/inputs/internal)
|
2016-11-04 14:12:22 +00:00
|
|
|
* [influxdb](./plugins/inputs/influxdb)
|
|
|
|
* [ipmi_sensor](./plugins/inputs/ipmi_sensor)
|
|
|
|
* [iptables](./plugins/inputs/iptables)
|
|
|
|
* [jolokia](./plugins/inputs/jolokia)
|
2017-02-01 21:23:45 +00:00
|
|
|
* [kubernetes](./plugins/inputs/kubernetes)
|
2016-11-04 14:12:22 +00:00
|
|
|
* [leofs](./plugins/inputs/leofs)
|
|
|
|
* [lustre2](./plugins/inputs/lustre2)
|
|
|
|
* [mailchimp](./plugins/inputs/mailchimp)
|
|
|
|
* [memcached](./plugins/inputs/memcached)
|
|
|
|
* [mesos](./plugins/inputs/mesos)
|
|
|
|
* [mongodb](./plugins/inputs/mongodb)
|
|
|
|
* [mysql](./plugins/inputs/mysql)
|
|
|
|
* [net_response](./plugins/inputs/net_response)
|
|
|
|
* [nginx](./plugins/inputs/nginx)
|
|
|
|
* [nsq](./plugins/inputs/nsq)
|
|
|
|
* [nstat](./plugins/inputs/nstat)
|
|
|
|
* [ntpq](./plugins/inputs/ntpq)
|
|
|
|
* [phpfpm](./plugins/inputs/phpfpm)
|
|
|
|
* [phusion passenger](./plugins/inputs/passenger)
|
|
|
|
* [ping](./plugins/inputs/ping)
|
|
|
|
* [postgresql](./plugins/inputs/postgresql)
|
|
|
|
* [postgresql_extensible](./plugins/inputs/postgresql_extensible)
|
|
|
|
* [powerdns](./plugins/inputs/powerdns)
|
|
|
|
* [procstat](./plugins/inputs/procstat)
|
|
|
|
* [prometheus](./plugins/inputs/prometheus)
|
|
|
|
* [puppetagent](./plugins/inputs/puppetagent)
|
|
|
|
* [rabbitmq](./plugins/inputs/rabbitmq)
|
|
|
|
* [raindrops](./plugins/inputs/raindrops)
|
|
|
|
* [redis](./plugins/inputs/redis)
|
|
|
|
* [rethinkdb](./plugins/inputs/rethinkdb)
|
|
|
|
* [riak](./plugins/inputs/riak)
|
|
|
|
* [sensors](./plugins/inputs/sensors)
|
|
|
|
* [snmp](./plugins/inputs/snmp)
|
|
|
|
* [snmp_legacy](./plugins/inputs/snmp_legacy)
|
|
|
|
* [sql server](./plugins/inputs/sqlserver) (microsoft)
|
|
|
|
* [twemproxy](./plugins/inputs/twemproxy)
|
|
|
|
* [varnish](./plugins/inputs/varnish)
|
|
|
|
* [zfs](./plugins/inputs/zfs)
|
|
|
|
* [zookeeper](./plugins/inputs/zookeeper)
|
|
|
|
* [win_perf_counters ](./plugins/inputs/win_perf_counters) (windows performance counters)
|
|
|
|
* [sysstat](./plugins/inputs/sysstat)
|
|
|
|
* [system](./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-11-04 14:12:22 +00:00
|
|
|
* [http_listener](./plugins/inputs/http_listener)
|
|
|
|
* [kafka_consumer](./plugins/inputs/kafka_consumer)
|
|
|
|
* [mqtt_consumer](./plugins/inputs/mqtt_consumer)
|
|
|
|
* [nats_consumer](./plugins/inputs/nats_consumer)
|
|
|
|
* [nsq_consumer](./plugins/inputs/nsq_consumer)
|
|
|
|
* [logparser](./plugins/inputs/logparser)
|
|
|
|
* [statsd](./plugins/inputs/statsd)
|
2017-02-02 16:24:03 +00:00
|
|
|
* [socket_listener](./plugins/inputs/socket_listener)
|
2016-11-04 14:12:22 +00:00
|
|
|
* [tail](./plugins/inputs/tail)
|
2017-02-02 17:06:41 +00:00
|
|
|
* [tcp_listener](./plugins/inputs/socket_listener)
|
|
|
|
* [udp_listener](./plugins/inputs/socket_listener)
|
2016-11-04 14:12:22 +00:00
|
|
|
* [webhooks](./plugins/inputs/webhooks)
|
|
|
|
* [filestack](./plugins/inputs/webhooks/filestack)
|
|
|
|
* [github](./plugins/inputs/webhooks/github)
|
|
|
|
* [mandrill](./plugins/inputs/webhooks/mandrill)
|
|
|
|
* [rollbar](./plugins/inputs/webhooks/rollbar)
|
|
|
|
|
|
|
|
## Processor Plugins
|
|
|
|
|
|
|
|
* [printer](./plugins/processors/printer)
|
|
|
|
|
|
|
|
## Aggregator Plugins
|
|
|
|
|
|
|
|
* [minmax](./plugins/aggregators/minmax)
|
|
|
|
|
|
|
|
## Output Plugins
|
|
|
|
|
|
|
|
* [influxdb](./plugins/outputs/influxdb)
|
|
|
|
* [amon](./plugins/outputs/amon)
|
2017-01-13 17:02:10 +00:00
|
|
|
* [amqp](./plugins/outputs/amqp) (rabbitmq)
|
2016-11-04 14:12:22 +00:00
|
|
|
* [aws kinesis](./plugins/outputs/kinesis)
|
|
|
|
* [aws cloudwatch](./plugins/outputs/cloudwatch)
|
|
|
|
* [datadog](./plugins/outputs/datadog)
|
2016-11-23 12:21:17 +00:00
|
|
|
* [discard](./plugins/outputs/discard)
|
2016-11-04 14:12:22 +00:00
|
|
|
* [file](./plugins/outputs/file)
|
|
|
|
* [graphite](./plugins/outputs/graphite)
|
|
|
|
* [graylog](./plugins/outputs/graylog)
|
|
|
|
* [instrumental](./plugins/outputs/instrumental)
|
|
|
|
* [kafka](./plugins/outputs/kafka)
|
|
|
|
* [librato](./plugins/outputs/librato)
|
|
|
|
* [mqtt](./plugins/outputs/mqtt)
|
|
|
|
* [nats](./plugins/outputs/nats)
|
|
|
|
* [nsq](./plugins/outputs/nsq)
|
|
|
|
* [opentsdb](./plugins/outputs/opentsdb)
|
|
|
|
* [prometheus](./plugins/outputs/prometheus_client)
|
|
|
|
* [riemann](./plugins/outputs/riemann)
|
2017-01-27 22:54:59 +00:00
|
|
|
* [riemann_legacy](./plugins/outputs/riemann_legacy)
|
2017-02-02 17:06:41 +00:00
|
|
|
* [socket_writer](./plugins/outputs/socket_writer)
|
|
|
|
* [tcp](./plugins/outputs/socket_writer)
|
|
|
|
* [udp](./plugins/outputs/socket_writer)
|
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.
|