fangli / fluent-plugin-influxdb

A buffered output plugin for fluentd and InfluxDB
MIT License
111 stars 65 forks source link

Apply to influxdb-ruby v0.2.0 #23

Closed Mahito closed 9 years ago

Mahito commented 9 years ago

In influxdb-ruby v0.2.0, this plugin doesn't work. This PR applies to influxdb-ruby v0.2.0 for this plugin.

cosmo0920 commented 9 years ago

Hmm..., this PR may cause this issue: https://github.com/influxdb/influxdb-ruby/issues/55. Could you try to avoid this issue?

e.g.) Replace "." to "_" and so on.

Mahito commented 9 years ago

Sorry, I don't use invalid db names. I'm using simple name (e.g. dstat) Sample is as follow:

% /opt/influxdb/influx
> show databases
name: databases
---------------
name
dstat

> use dstat
Using database dstat
> show series
....
name: influxdb.dstat.host01.net_total
------------------------------------------
_key
influxdb.dstat.host01.net_total

name: influxdb.dstat.host01.swap
-------------------------------------
_key
influxdb.dstat.host01.swap

name: influxdb.dstat.host01.total_cpu_usage
------------------------------------------------
_key
influxdb.dstat.host01.total_cpu_usage

> select * from "influxdb.dstat.host01.total_cpu_usage"
...
2015-07-24T08:18:25Z    0.0         99.572          0.0         0.201           0.227           0.0
2015-07-24T08:19:25Z    0.0         99.284          0.093           0.202           0.413           0.008
2015-07-24T08:20:25Z    0.0         98.359          0.245           0.355           1.041           0.0
2015-07-24T08:21:25Z    0.0         98.053          0.212           0.491           1.244           0.0
2015-07-24T08:22:25Z    0.0         98.342          0.220           0.347           1.091           0.0
2015-07-24T08:23:25Z    0.0         98.345          0.355           0.329           0.971           0.0
cosmo0920 commented 9 years ago

Thanks for your response.

I'm using simple name (e.g. dstat) Sample is as follow:

[snip]

I understand. Your concrete example helps me to understand invalid dbname issue detail. From a conclusion, I've misunderstood this issue.

Your PR looks good to me.

williampratt commented 9 years ago

I recommend bumping the version to 0.2.0 to follow in line with Influxdb-ruby. Also, 0.2.0 officially doesn't support 0.8 Influx so the README should reflect that. #22 does both of these.

Mahito commented 9 years ago

@williampratt, thank you for your recommendation. I like your idea! I added "NOTE" which description of description of InfluxDB version compatibility to README.

repeatedly commented 9 years ago

Thanks!