telegraf/README.md

357 lines
15 KiB
Markdown
Raw Normal View History

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
2018-09-17 18:45:08 +00:00
Telegraf is an agent for collecting, processing, aggregating, and writing metrics.
2015-06-19 16:34:27 +00:00
Design goals are to have a minimal memory footprint with a plugin system so
2018-09-17 18:45:08 +00:00
that developers in the community can easily add support for collecting
metrics.
2015-06-19 16:34:27 +00:00
2018-09-17 18:45:08 +00:00
Telegraf is plugin-driven and has the concept of 4 distinct plugin types:
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
2018-09-17 18:45:08 +00:00
New plugins are designed to be easy to contribute, we'll eagerly accept pull
2016-01-07 22:21:10 +00:00
requests and will manage the set of plugins that Telegraf supports.
## Contributing
There are many ways to contribute:
- Fix and [report bugs](https://github.com/influxdata/telegraf/issues/new)
- [Improve documentation](https://github.com/influxdata/telegraf/issues?q=is%3Aopen+label%3Adocumentation)
- [Review code and feature proposals](https://github.com/influxdata/telegraf/pulls)
2018-09-17 18:45:08 +00:00
- Answer questions and discuss here on github and on the [Community Site](https://community.influxdata.com/)
- [Contribute plugins](CONTRIBUTING.md)
2015-06-19 16:34:27 +00:00
## Installation:
2015-05-20 05:26:13 +00:00
2017-07-18 20:51:44 +00:00
You can download the binaries directly from the [downloads](https://www.influxdata.com/downloads) page
or from the [releases](https://github.com/influxdata/telegraf/releases) section.
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
### From Source:
Telegraf requires golang version 1.9 or newer, the Makefile requires GNU make.
2017-07-21 18:15:00 +00:00
2019-01-08 01:14:07 +00:00
1. [Install Go](https://golang.org/doc/install) >=1.9 (1.11 recommended)
2018-08-14 21:55:38 +00:00
2. [Install dep](https://golang.github.io/dep/docs/installation.html) ==v0.5.0
3. Download Telegraf source:
```
go get -d github.com/influxdata/telegraf
```
4. Run make from the source directory
```
cd "$HOME/go/src/github.com/influxdata/telegraf"
make
```
2018-11-05 21:52:14 +00:00
### Changelog
View the [changelog](/CHANGELOG.md) for the latest updates and changes by
version.
2017-08-23 22:42:25 +00:00
### Nightly Builds
These builds are generated from the master branch:
- [telegraf_nightly_amd64.deb](https://dl.influxdata.com/telegraf/nightlies/telegraf_nightly_amd64.deb)
- [telegraf_nightly_arm64.deb](https://dl.influxdata.com/telegraf/nightlies/telegraf_nightly_arm64.deb)
- [telegraf-nightly.arm64.rpm](https://dl.influxdata.com/telegraf/nightlies/telegraf-nightly.arm64.rpm)
- [telegraf_nightly_armel.deb](https://dl.influxdata.com/telegraf/nightlies/telegraf_nightly_armel.deb)
- [telegraf-nightly.armel.rpm](https://dl.influxdata.com/telegraf/nightlies/telegraf-nightly.armel.rpm)
- [telegraf_nightly_armhf.deb](https://dl.influxdata.com/telegraf/nightlies/telegraf_nightly_armhf.deb)
- [telegraf-nightly.armv6hl.rpm](https://dl.influxdata.com/telegraf/nightlies/telegraf-nightly.armv6hl.rpm)
- [telegraf-nightly_freebsd_amd64.tar.gz](https://dl.influxdata.com/telegraf/nightlies/telegraf-nightly_freebsd_amd64.tar.gz)
- [telegraf-nightly_freebsd_i386.tar.gz](https://dl.influxdata.com/telegraf/nightlies/telegraf-nightly_freebsd_i386.tar.gz)
- [telegraf_nightly_i386.deb](https://dl.influxdata.com/telegraf/nightlies/telegraf_nightly_i386.deb)
- [telegraf-nightly.i386.rpm](https://dl.influxdata.com/telegraf/nightlies/telegraf-nightly.i386.rpm)
- [telegraf-nightly_linux_amd64.tar.gz](https://dl.influxdata.com/telegraf/nightlies/telegraf-nightly_linux_amd64.tar.gz)
- [telegraf-nightly_linux_arm64.tar.gz](https://dl.influxdata.com/telegraf/nightlies/telegraf-nightly_linux_arm64.tar.gz)
- [telegraf-nightly_linux_armel.tar.gz](https://dl.influxdata.com/telegraf/nightlies/telegraf-nightly_linux_armel.tar.gz)
- [telegraf-nightly_linux_armhf.tar.gz](https://dl.influxdata.com/telegraf/nightlies/telegraf-nightly_linux_armhf.tar.gz)
- [telegraf-nightly_linux_i386.tar.gz](https://dl.influxdata.com/telegraf/nightlies/telegraf-nightly_linux_i386.tar.gz)
- [telegraf-nightly_linux_s390x.tar.gz](https://dl.influxdata.com/telegraf/nightlies/telegraf-nightly_linux_s390x.tar.gz)
- [telegraf_nightly_s390x.deb](https://dl.influxdata.com/telegraf/nightlies/telegraf_nightly_s390x.deb)
- [telegraf-nightly.s390x.rpm](https://dl.influxdata.com/telegraf/nightlies/telegraf-nightly.s390x.rpm)
- [telegraf-nightly_windows_amd64.zip](https://dl.influxdata.com/telegraf/nightlies/telegraf-nightly_windows_amd64.zip)
- [telegraf-nightly_windows_i386.zip](https://dl.influxdata.com/telegraf/nightlies/telegraf-nightly_windows_i386.zip)
- [telegraf-nightly.x86_64.rpm](https://dl.influxdata.com/telegraf/nightlies/telegraf-nightly.x86_64.rpm)
- [telegraf-static-nightly_linux_amd64.tar.gz](https://dl.influxdata.com/telegraf/nightlies/telegraf-static-nightly_linux_amd64.tar.gz)
2016-01-30 18:53:17 +00:00
## How to use it:
2015-06-20 01:53:35 +00:00
See usage with:
2016-01-07 22:21:10 +00:00
```
2018-09-17 18:45:08 +00:00
telegraf --help
```
2016-01-07 22:21:10 +00:00
#### Generate a telegraf config file:
2016-01-07 22:21:10 +00:00
```
2018-09-17 18:45:08 +00:00
telegraf config > telegraf.conf
```
2016-01-07 22:21:10 +00:00
2017-08-03 18:54:05 +00:00
#### Generate config with only cpu input & influxdb output plugins defined:
```
2018-09-17 18:45:08 +00:00
telegraf --input-filter cpu --output-filter influxdb config
```
2016-01-07 22:21:10 +00:00
2017-08-03 18:54:05 +00:00
#### Run a single telegraf collection, outputing metrics to stdout:
2016-01-07 22:21:10 +00:00
```
2018-09-17 18:45:08 +00:00
telegraf --config telegraf.conf --test
```
2016-01-07 22:21:10 +00:00
2017-08-03 18:54:05 +00:00
#### Run telegraf with all plugins defined in config file:
2016-01-07 22:21:10 +00:00
```
2018-09-17 18:45:08 +00:00
telegraf --config telegraf.conf
```
2016-01-07 22:21:10 +00:00
2017-08-03 18:54:05 +00:00
#### Run telegraf, enabling the cpu & memory input, and influxdb output plugins:
2016-01-07 22:21:10 +00:00
```
2018-09-17 18:45:08 +00:00
telegraf --config telegraf.conf --input-filter cpu:mem --output-filter influxdb
```
2018-09-17 18:45:08 +00:00
## Documentation
[Latest Release Documentation][release docs].
2015-05-20 05:26:13 +00:00
2018-09-17 18:45:08 +00:00
For documentation on the latest development code see the [documentation index][devel docs].
2018-09-17 18:45:08 +00:00
[release docs]: https://docs.influxdata.com/telegraf
[devel docs]: docs
## Input Plugins
2018-08-13 23:34:59 +00:00
* [activemq](./plugins/inputs/activemq)
* [aerospike](./plugins/inputs/aerospike)
2017-03-03 18:24:50 +00:00
* [amqp_consumer](./plugins/inputs/amqp_consumer) (rabbitmq)
* [apache](./plugins/inputs/apache)
* [aurora](./plugins/inputs/aurora)
2017-03-03 18:24:50 +00:00
* [aws cloudwatch](./plugins/inputs/cloudwatch)
* [bcache](./plugins/inputs/bcache)
2018-09-10 19:34:05 +00:00
* [beanstalkd](./plugins/inputs/beanstalkd)
* [bond](./plugins/inputs/bond)
2018-05-22 21:10:41 +00:00
* [burrow](./plugins/inputs/burrow)
* [cassandra](./plugins/inputs/cassandra) (deprecated, use [jolokia2](./plugins/inputs/jolokia2))
* [ceph](./plugins/inputs/ceph)
2017-02-24 09:43:22 +00:00
* [cgroup](./plugins/inputs/cgroup)
* [chrony](./plugins/inputs/chrony)
* [cloud_pubsub](./plugins/inputs/cloud_pubsub) Google Cloud Pub/Sub
* [conntrack](./plugins/inputs/conntrack)
* [consul](./plugins/inputs/consul)
* [couchbase](./plugins/inputs/couchbase)
* [couchdb](./plugins/inputs/couchdb)
2018-07-12 19:25:04 +00:00
* [cpu](./plugins/inputs/cpu)
* [DC/OS](./plugins/inputs/dcos)
2018-07-12 19:25:04 +00:00
* [diskio](./plugins/inputs/diskio)
* [disk](./plugins/inputs/disk)
* [disque](./plugins/inputs/disque)
2017-05-09 20:45:27 +00:00
* [dmcache](./plugins/inputs/dmcache)
* [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)
2017-06-21 19:46:57 +00:00
* [fail2ban](./plugins/inputs/fail2ban)
2018-04-11 01:04:59 +00:00
* [fibaro](./plugins/inputs/fibaro)
* [file](./plugins/inputs/file)
* [filestat](./plugins/inputs/filestat)
2018-07-31 22:05:55 +00:00
* [filecount](./plugins/inputs/filecount)
2017-07-13 23:00:09 +00:00
* [fluentd](./plugins/inputs/fluentd)
* [graylog](./plugins/inputs/graylog)
* [haproxy](./plugins/inputs/haproxy)
* [hddtemp](./plugins/inputs/hddtemp)
* [httpjson](./plugins/inputs/httpjson) (generic JSON-emitting http service plugin)
* [http_listener](./plugins/inputs/influxdb_listener) (deprecated, renamed to [influxdb_listener](/plugins/inputs/influxdb_listener))
* [http_listener_v2](./plugins/inputs/http_listener_v2)
* [http](./plugins/inputs/http) (generic HTTP plugin, supports using input data formats)
* [http_response](./plugins/inputs/http_response)
2018-08-23 02:10:40 +00:00
* [icinga2](./plugins/inputs/icinga2)
* [influxdb](./plugins/inputs/influxdb)
* [influxdb_listener](./plugins/inputs/influxdb_listener)
* [internal](./plugins/inputs/internal)
* [interrupts](./plugins/inputs/interrupts)
* [ipmi_sensor](./plugins/inputs/ipmi_sensor)
2018-01-31 20:30:03 +00:00
* [ipset](./plugins/inputs/ipset)
* [iptables](./plugins/inputs/iptables)
2018-10-25 19:42:19 +00:00
* [ipvs](./plugins/inputs/ipvs)
2018-11-05 22:58:23 +00:00
* [jenkins](./plugins/inputs/jenkins)
* [jolokia2](./plugins/inputs/jolokia2) (java, cassandra, kafka)
* [jolokia](./plugins/inputs/jolokia) (deprecated, use [jolokia2](./plugins/inputs/jolokia2))
2018-07-12 19:25:27 +00:00
* [jti_openconfig_telemetry](./plugins/inputs/jti_openconfig_telemetry)
* [kafka_consumer](./plugins/inputs/kafka_consumer)
2017-05-09 20:45:27 +00:00
* [kapacitor](./plugins/inputs/kapacitor)
2018-07-12 19:25:04 +00:00
* [kernel](./plugins/inputs/kernel)
* [kernel_vmstat](./plugins/inputs/kernel_vmstat)
* [kibana](./plugins/inputs/kibana)
* [kubernetes](./plugins/inputs/kubernetes)
* [leofs](./plugins/inputs/leofs)
2018-07-12 19:25:04 +00:00
* [linux_sysctl_fs](./plugins/inputs/linux_sysctl_fs)
* [logparser](./plugins/inputs/logparser)
* [lustre2](./plugins/inputs/lustre2)
* [mailchimp](./plugins/inputs/mailchimp)
* [mcrouter](./plugins/inputs/mcrouter)
* [memcached](./plugins/inputs/memcached)
2018-07-12 19:25:04 +00:00
* [mem](./plugins/inputs/mem)
* [mesos](./plugins/inputs/mesos)
2017-08-03 01:02:41 +00:00
* [minecraft](./plugins/inputs/minecraft)
* [mongodb](./plugins/inputs/mongodb)
* [mqtt_consumer](./plugins/inputs/mqtt_consumer)
* [mysql](./plugins/inputs/mysql)
* [nats_consumer](./plugins/inputs/nats_consumer)
2018-01-26 23:18:15 +00:00
* [nats](./plugins/inputs/nats)
* [neptune_apex](./plugins/inputs/neptune_apex)
2018-07-12 19:25:04 +00:00
* [net](./plugins/inputs/net)
* [net_response](./plugins/inputs/net_response)
* [netstat](./plugins/inputs/net)
* [nginx](./plugins/inputs/nginx)
2017-09-19 18:49:55 +00:00
* [nginx_plus](./plugins/inputs/nginx_plus)
2018-10-22 19:57:24 +00:00
* [nginx_plus_api](./plugins/inputs/nginx_plus_api)
* [nginx_vts](./plugins/inputs/nginx_vts)
* [nsq_consumer](./plugins/inputs/nsq_consumer)
* [nginx_vts](./plugins/inputs/nginx_vts)
* [nsq](./plugins/inputs/nsq)
* [nstat](./plugins/inputs/nstat)
* [ntpq](./plugins/inputs/ntpq)
2018-04-17 20:43:36 +00:00
* [nvidia_smi](./plugins/inputs/nvidia_smi)
2017-08-03 01:02:41 +00:00
* [openldap](./plugins/inputs/openldap)
2017-11-20 22:39:13 +00:00
* [opensmtpd](./plugins/inputs/opensmtpd)
2017-11-30 00:36:00 +00:00
* [pf](./plugins/inputs/pf)
2018-08-01 22:44:10 +00:00
* [pgbouncer](./plugins/inputs/pgbouncer)
* [phpfpm](./plugins/inputs/phpfpm)
* [phusion passenger](./plugins/inputs/passenger)
* [ping](./plugins/inputs/ping)
2017-11-28 18:08:41 +00:00
* [postfix](./plugins/inputs/postfix)
* [postgresql_extensible](./plugins/inputs/postgresql_extensible)
2017-11-30 00:36:00 +00:00
* [postgresql](./plugins/inputs/postgresql)
* [powerdns](./plugins/inputs/powerdns)
2018-07-12 19:25:04 +00:00
* [processes](./plugins/inputs/processes)
* [procstat](./plugins/inputs/procstat)
* [prometheus](./plugins/inputs/prometheus) (can be used for [Caddy server](./plugins/inputs/prometheus/README.md#usage-for-caddy-http-server))
* [puppetagent](./plugins/inputs/puppetagent)
* [rabbitmq](./plugins/inputs/rabbitmq)
* [raindrops](./plugins/inputs/raindrops)
* [redis](./plugins/inputs/redis)
* [rethinkdb](./plugins/inputs/rethinkdb)
* [riak](./plugins/inputs/riak)
2017-08-08 18:50:16 +00:00
* [salesforce](./plugins/inputs/salesforce)
* [sensors](./plugins/inputs/sensors)
2017-10-04 22:18:15 +00:00
* [smart](./plugins/inputs/smart)
* [snmp_legacy](./plugins/inputs/snmp_legacy)
* [snmp](./plugins/inputs/snmp)
* [socket_listener](./plugins/inputs/socket_listener)
2017-11-08 00:44:09 +00:00
* [solr](./plugins/inputs/solr)
* [sql server](./plugins/inputs/sqlserver) (microsoft)
* [statsd](./plugins/inputs/statsd)
2018-07-12 19:25:04 +00:00
* [swap](./plugins/inputs/swap)
* [syslog](./plugins/inputs/syslog)
* [sysstat](./plugins/inputs/sysstat)
2018-07-12 19:25:04 +00:00
* [system](./plugins/inputs/system)
* [tail](./plugins/inputs/tail)
2018-09-10 19:34:05 +00:00
* [temp](./plugins/inputs/temp)
* [tcp_listener](./plugins/inputs/socket_listener)
* [teamspeak](./plugins/inputs/teamspeak)
2018-05-23 18:57:47 +00:00
* [tengine](./plugins/inputs/tengine)
* [tomcat](./plugins/inputs/tomcat)
* [twemproxy](./plugins/inputs/twemproxy)
* [udp_listener](./plugins/inputs/socket_listener)
* [unbound](./plugins/inputs/unbound)
* [varnish](./plugins/inputs/varnish)
2018-09-11 21:55:18 +00:00
* [vsphere](./plugins/inputs/vsphere) VMware vSphere
* [webhooks](./plugins/inputs/webhooks)
* [filestack](./plugins/inputs/webhooks/filestack)
* [github](./plugins/inputs/webhooks/github)
* [mandrill](./plugins/inputs/webhooks/mandrill)
2017-05-09 20:45:27 +00:00
* [papertrail](./plugins/inputs/webhooks/papertrail)
* [particle](./plugins/inputs/webhooks/particle)
* [rollbar](./plugins/inputs/webhooks/rollbar)
* [win_perf_counters](./plugins/inputs/win_perf_counters) (windows performance counters)
* [win_services](./plugins/inputs/win_services)
2018-10-29 22:59:37 +00:00
* [wireless](./plugins/inputs/wireless)
* [zfs](./plugins/inputs/zfs)
2017-08-03 01:02:41 +00:00
* [zipkin](./plugins/inputs/zipkin)
* [zookeeper](./plugins/inputs/zookeeper)
## Parsers
- [InfluxDB Line Protocol](/plugins/parsers/influx)
- [Collectd](/plugins/parsers/collectd)
- [CSV](/plugins/parsers/csv)
- [Dropwizard](/plugins/parsers/dropwizard)
- [Graphite](/plugins/parsers/graphite)
- [Grok](/plugins/parsers/grok)
- [JSON](/plugins/parsers/json)
- [Logfmt](/plugins/parsers/logfmt)
- [Nagios](/plugins/parsers/nagios)
- [Value](/plugins/parsers/value), ie: 45 or "booyah"
- [Wavefront](/plugins/parsers/wavefront)
## Serializers
- [InfluxDB Line Protocol](/plugins/serializers/influx)
- [JSON](/plugins/serializers/json)
- [Graphite](/plugins/serializers/graphite)
- [SplunkMetric](/plugins/serializers/splunkmetric)
2017-04-12 17:41:26 +00:00
## Processor Plugins
2018-05-23 21:30:55 +00:00
* [converter](./plugins/processors/converter)
2018-10-04 20:24:25 +00:00
* [enum](./plugins/processors/enum)
* [override](./plugins/processors/override)
2018-10-04 20:24:25 +00:00
* [parser](./plugins/processors/parser)
2018-05-05 01:42:36 +00:00
* [printer](./plugins/processors/printer)
* [regex](./plugins/processors/regex)
2018-08-13 23:38:46 +00:00
* [rename](./plugins/processors/rename)
2018-10-04 20:24:25 +00:00
* [strings](./plugins/processors/strings)
2018-05-05 01:42:36 +00:00
* [topk](./plugins/processors/topk)
## Aggregator Plugins
* [basicstats](./plugins/aggregators/basicstats)
* [minmax](./plugins/aggregators/minmax)
2017-08-03 01:02:41 +00:00
* [histogram](./plugins/aggregators/histogram)
* [valuecounter](./plugins/aggregators/valuecounter)
## Output Plugins
2018-11-28 20:10:51 +00:00
* [influxdb](./plugins/outputs/influxdb) (InfluxDB 1.x)
* [influxdb_v2](./plugins/outputs/influxdb_v2) ([InfluxDB 2.x](https://github.com/influxdata/platform))
* [amon](./plugins/outputs/amon)
* [amqp](./plugins/outputs/amqp) (rabbitmq)
* [application_insights](./plugins/outputs/application_insights)
* [aws kinesis](./plugins/outputs/kinesis)
* [aws cloudwatch](./plugins/outputs/cloudwatch)
2018-09-05 21:58:13 +00:00
* [azure_monitor](./plugins/outputs/azure_monitor)
2017-11-09 22:03:16 +00:00
* [cratedb](./plugins/outputs/cratedb)
* [datadog](./plugins/outputs/datadog)
2016-11-23 12:21:17 +00:00
* [discard](./plugins/outputs/discard)
2017-03-21 00:47:57 +00:00
* [elasticsearch](./plugins/outputs/elasticsearch)
* [file](./plugins/outputs/file)
* [graphite](./plugins/outputs/graphite)
* [graylog](./plugins/outputs/graylog)
2018-05-15 00:19:49 +00:00
* [http](./plugins/outputs/http)
* [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)
* [riemann_legacy](./plugins/outputs/riemann_legacy)
2017-02-02 17:06:41 +00:00
* [socket_writer](./plugins/outputs/socket_writer)
2018-10-16 19:23:05 +00:00
* [stackdriver](./plugins/outputs/stackdriver)
2017-02-02 17:06:41 +00:00
* [tcp](./plugins/outputs/socket_writer)
* [udp](./plugins/outputs/socket_writer)
* [wavefront](./plugins/outputs/wavefront)