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