Writing the Telegraf input plugin

Source: Internet
Author: User

Telegraf is a Influxdata data collection kit that is used to resemble Collectd, STATSD, Logstash and other software. The input and output of the data are implemented by plugin. Today we try to write a plugin that collects Supervisord

1. Prepare Golang (preferably 1.9+) environment,

2. Prepare some DEP compilation environments https://golang.github.io/dep/docs/installation.html

3. Prepare to Http_proxy (you know)

4. Go get Github.com/influxdata/telegraf

5. CD $GOPATH/github.com/influxdata/telegraf

6. Git checkout-b Supervisor

7. CD Plugins/inputs

8. mkdir Supervisor

9. CD Supervisor

10. Reference Https://github.com/influxdata/telegraf/blob/master/CONTRIBUTING.md#input-plugin-example

One. Vim Telegraf/plugins/inputs/all/all.go Append _ "Github.com/influxdata/telegraf/plugins/inputs/supervisor"

CD $GOPATH/github.com/influxdata/telegraf

http_proxy= "Http://<proxy>" make

/telegraf--help

/telegraf--input-filter Supervisor Config > telegraf.conf

/telegraf--config telegraf.conf--test


Supervisor.go code BLOG/TELEGRAF.MD at Master Lmyyao/blog GitHub

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.