telegraf/plugins
Mark Rushakoff 2811ca61ea Add influxdb plugin
This was primarily intended to consume InfluxDB-style expvars,
particularly InfluxDB's `/debug/vars` endpoint.

That endpoint follows a structure like

```json
{
  "httpd::8086": {
    "name": "httpd",
    "tags": {
      "bind": ":8086"
    },
    "values": {
      "pointsWrittenOK": 33756,
      "queryReq": 19,
      "queryRespBytes": 26973,
      "req": 428,
      "writeReq": 205,
      "writeReqBytes": 3939161
    }
  }
}
```

There are an arbitrary number of top-level keys in the JSON response at
the configured URLs, and this plugin will iterate through all of their
values looking for objects with keys "name", "tags", and "values"
indicating a metric to be consumed by telegraf.

Running this on current master of InfluxDB, I am able to record nearly
the same information that is normally stored in the `_internal`
database; the only measurement missing from `_internal` is `runtime`,
which is present under the "memstats" key but does not follow the format
and so is not consumed in this plugin.

```
$ influx -database=telegraf -execute 'SHOW FIELD KEYS FROM /influxdb/'

name: influxdb_influxdb_engine
----------------------------
fieldKey
blksWrite
blksWriteBytes
blksWriteBytesC
pointsWrite
pointsWriteDedupe

name: influxdb_influxdb_httpd
---------------------------
fieldKey
pingReq
pointsWrittenOK
queryReq
queryRespBytes
req
writeReq
writeReqBytes

name: influxdb_influxdb_shard
---------------------------
fieldKey
fieldsCreate
seriesCreate
writePointsOk
writeReq

name: influxdb_influxdb_subscriber
--------------------------------
fieldKey
pointsWritten

name: influxdb_influxdb_wal
-------------------------
fieldKey
autoFlush
flushDuration
idleFlush
memSize
metaFlush
pointsFlush
pointsWrite
pointsWriteReq
seriesFlush

name: influxdb_influxdb_write
---------------------------
fieldKey
pointReq
pointReqLocal
req
subWriteOk
writeOk
```
2015-12-16 10:58:07 -08:00
..
aerospike Change aerospike plugin server tag to aerospike_host 2015-11-30 10:43:28 -07:00
all Add influxdb plugin 2015-12-16 10:58:07 -08:00
apache Mailchimp report plugin 2015-12-04 12:25:16 -07:00
bcache removed "panic" from bcache plugin 2015-11-06 14:05:09 -07:00
disque Execute "long" unit tests using docker containers 2015-10-28 11:45:04 -06:00
elasticsearch add elasticsearch README 2015-11-02 11:04:43 -07:00
exec Overhaul config <-> agent coupling. Put config in it's own package. 2015-11-25 19:07:04 -07:00
haproxy Change HAProxy plugin tag from host to server 2015-11-03 11:21:58 -07:00
httpjson Overhaul config <-> agent coupling. Put config in it's own package. 2015-11-25 19:07:04 -07:00
influxdb Add influxdb plugin 2015-12-16 10:58:07 -08:00
jolokia Add optional auth credentials to Jolokia plugin 2015-12-03 11:48:20 -07:00
kafka_consumer Fix kafka plugin and rename to kafka_consumer 2015-11-19 13:41:58 -07:00
leofs Change config file indentation to 2 spaces 2015-10-15 15:53:29 -06:00
lustre2 Change duration -> internal and implement private gopsutil methods 2015-11-11 15:38:22 -07:00
mailchimp Mailchimp report plugin 2015-12-04 12:25:16 -07:00
memcached memcached plugin. Break out metric parsing into it's own func 2015-12-03 13:53:37 -07:00
mongodb update mongostat from github.com/mongodb/mongo-tools 2015-10-28 15:26:04 -06:00
mysql Execute "long" unit tests using docker containers 2015-10-28 11:45:04 -06:00
nginx Run go fmt in CI 2015-10-16 13:08:32 -06:00
phpfpm phpfpm: add socket fcgi support 2015-11-12 10:44:51 -07:00
ping Change config file indentation to 2 spaces 2015-10-15 15:53:29 -06:00
postgresql Overhaul config <-> agent coupling. Put config in it's own package. 2015-11-25 19:07:04 -07:00
procstat Overhaul config <-> agent coupling. Put config in it's own package. 2015-11-25 19:07:04 -07:00
prometheus Skip measurements with NaN fields 2015-11-23 16:03:11 -07:00
puppetagent fixed test to check actual value 2015-10-18 17:39:53 -06:00
rabbitmq Overhaul config <-> agent coupling. Put config in it's own package. 2015-11-25 19:07:04 -07:00
redis redis_test.go with instantaneous input/output 2015-12-02 13:17:49 -07:00
rethinkdb Change config file indentation to 2 spaces 2015-10-15 15:53:29 -06:00
statsd Parse statsd lines with multiple metric bits 2015-11-30 15:25:35 -07:00
system Implement Glob matching for pass/drop filters 2015-12-07 16:58:31 -07:00
trig Create trig plugin 2015-12-01 18:11:03 -07:00
twemproxy Overhaul config <-> agent coupling. Put config in it's own package. 2015-11-25 19:07:04 -07:00
zfs Separate pool tag and stat collection. 2015-12-11 10:59:11 -07:00
zookeeper Execute "long" unit tests using docker containers 2015-10-28 11:45:04 -06:00
mock_Plugin.go Switch plugin API to use an accumulator 2015-04-06 09:32:10 -07:00
registry.go Utilizing new client and overhauling Accumulator interface 2015-10-20 13:53:58 -06:00