统计数据收集代理 telegraf v0.1.3 发布
Telegraf 是一个用 Go 编写的代理程序,可收集系统和服务的统计数据,并写入到 InfluxDB 数据库。
Telegraf 具有内存占用小的特点,通过插件系统开发人员可轻松添加支持其他服务的扩展。
目前已有的插件包括:
-
System (memory, CPU, network, etc.)
-
Docker
-
MySQL
-
PostgreSQL
-
Redis
telegraf v0.1.3 发布,更新内容如下:
Features
-
-- [#35](https://github.com/influxdb/influxdb/pull/35): Add Kafka plugin. Thanks @EmilS!
-
-- [#47](https://github.com/influxdb/influxdb/pull/47): Add RethinkDB plugin. Thanks @jipperinbham!
-
+- [#35](https://github.com/influxdb/telegraf/pull/35): Add Kafka plugin. Thanks @EmilS!
-
+- [#47](https://github.com/influxdb/telegraf/pull/47): Add RethinkDB plugin. Thanks @jipperinbham!
Bugfixes
-
-- [#45](https://github.com/influxdb/influxdb/pull/45): Skip disk tags that don't have a value. Thanks @jhofeditz!
-
-- [#43](https://github.com/influxdb/influxdb/pull/43): Fix bug in MySQL plugin. Thanks @marcosnils!
-
+- [#45](https://github.com/influxdb/telegraf/pull/45): Skip disk tags that don't have a value. Thanks @jhofeditz!
-
+- [#43](https://github.com/influxdb/telegraf/pull/43): Fix bug in MySQL plugin. Thanks @marcosnils!
更多内容请查看更新日志。
下载地址:Source code (zip)
package cn.huxi.tools.util; // simple.go import "github.com/influxdb/telegraf/plugins" type Simple struct { Ok bool } func (s *Simple) Description() string { return "a demo plugin" } func (s *Simple) SampleConfig() string { return "ok = true # indicate if everything is fine" } func (s *Simple) Gather(acc plugins.Accumulator) error { if s.Ok { acc.Add("state", "pretty good", nil) } else { acc.Add("state", "not great", nil) } return nil } func init() { plugins.Add("simple", func() plugins.Plugin { &Simple{} }) }