fluent-plugin-influxdb 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.md +5 -0
- data/README.md +0 -7
- data/fluent-plugin-influxdb.gemspec +1 -1
- data/lib/fluent/plugin/out_influxdb.rb +2 -7
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 31241c0d29bbf9d7442afa7d5f6d95e0a14c754a
|
4
|
+
data.tar.gz: ab28d482facd88629c06e1193c80755f87708179
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d856b411ddfe9006b1a0fdbc1d0974c6ae0cd6b8f1b73ac9db3a5946d2bb7c3e557247ccfbec7e9d05450bec9f371423eba85da6fb0e6dbce3ad71f4a829a5e
|
7
|
+
data.tar.gz: 602a42ec0f0edc4ae7e61fbcc90679913c90a159ad6312d90c7950898b95f480f5219651c870d76b1e9a1309f2445ee9ee8f822942a7461beaba823af2b33858
|
data/History.md
CHANGED
data/README.md
CHANGED
@@ -27,12 +27,6 @@ Just like other regular output plugins, Use type `influxdb` in your fluentd conf
|
|
27
27
|
`user`: The DB user of influxDB, should be created manually, default to "root"
|
28
28
|
|
29
29
|
`password`: The password of the user, default to "root"
|
30
|
-
|
31
|
-
`value_field`: The original data field in fluentd, default to "_value".
|
32
|
-
|
33
|
-
If you have a fluentd time-series schema like this:
|
34
|
-
my.metric.name 1386000000 {"k1":"v1","k2":"v2","count":2.3}
|
35
|
-
And apparently the field "count" is the value field, you should set it to "count"
|
36
30
|
|
37
31
|
`time_precision`: The time precision of timestamp. default to "s". should specify either second (s), millisecond (m), or microsecond (u)
|
38
32
|
|
@@ -49,7 +43,6 @@ Just like other regular output plugins, Use type `influxdb` in your fluentd conf
|
|
49
43
|
dbname test
|
50
44
|
user testuser
|
51
45
|
password mypwd
|
52
|
-
value_field count
|
53
46
|
time_precision s
|
54
47
|
</match>
|
55
48
|
```
|
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "fluent-plugin-influxdb"
|
6
|
-
s.version = '0.1.
|
6
|
+
s.version = '0.1.2'
|
7
7
|
s.authors = ["FangLi"]
|
8
8
|
s.email = ["surivlee@gmail.com"]
|
9
9
|
s.description = %q{InfluxDB output plugin for Fluentd}
|
@@ -10,7 +10,6 @@ class Fluent::InfluxdbOutput < Fluent::BufferedOutput
|
|
10
10
|
config_param :dbname, :string, :default => 'fluentd'
|
11
11
|
config_param :user, :string, :default => 'root'
|
12
12
|
config_param :password, :string, :default => 'root'
|
13
|
-
config_param :value_field, :string, :default => '_value'
|
14
13
|
config_param :time_precision, :string, :default => 's'
|
15
14
|
|
16
15
|
|
@@ -38,14 +37,10 @@ class Fluent::InfluxdbOutput < Fluent::BufferedOutput
|
|
38
37
|
bulk = []
|
39
38
|
|
40
39
|
chunk.msgpack_each do |tag, time, record|
|
41
|
-
|
42
|
-
value = record[@value_field]
|
43
|
-
record.delete(@value_field)
|
44
|
-
|
45
40
|
bulk << {
|
46
41
|
'name' => tag,
|
47
|
-
'columns' =>
|
48
|
-
'points' => [
|
42
|
+
'columns' => record.keys << 'time',
|
43
|
+
'points' => [record.values << time],
|
49
44
|
}
|
50
45
|
end
|
51
46
|
|