fluent-plugin-consul 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +5 -1
- data/README.md +21 -1
- data/fluent-plugin-consul.gemspec +1 -1
- data/lib/fluent/plugin/out_consul.rb +5 -5
- 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: 481e9c85e1286760edeffae90e4ccddb09318010
|
4
|
+
data.tar.gz: 2e9f44cf977e250bac9644de9f264a287565de29
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b950481eebdea394d68ce01862b8c04c0ac247c71dae96cc359e78d819479861780f62efe2c4c1c06ea35e3672a29f3fa0fb63da49c351d4158c516ea90b025
|
7
|
+
data.tar.gz: 6ab2226bbbb55bb5e6738a9360f0f8e8e2b20eddada462b4ea6a5871a693e88b13dd6cba2872414b8477c5ff70b0143c5025de25c079b25efc3567108b0ea4cb
|
data/CHANGELOG
CHANGED
data/README.md
CHANGED
@@ -4,5 +4,25 @@ fluent-plugin-consul store Fluentd event to Consul Key/Value Storage
|
|
4
4
|
|
5
5
|
## Installing
|
6
6
|
|
7
|
-
|
7
|
+
```
|
8
|
+
gem install fluent-plugin-consul
|
9
|
+
```
|
8
10
|
|
11
|
+
## Configuration
|
12
|
+
example configuration
|
13
|
+
|
14
|
+
```
|
15
|
+
<store>
|
16
|
+
type consul
|
17
|
+
consul_uri http://localhost:8500 # default
|
18
|
+
kv_prefix fluentd # default
|
19
|
+
</store>
|
20
|
+
```
|
21
|
+
|
22
|
+
## Storing to Consul
|
23
|
+
for example, input data is
|
24
|
+
- tag: debug.test
|
25
|
+
- record: {"json":"message"}
|
26
|
+
|
27
|
+
stored Key/Value Storage of Consul
|
28
|
+
- {kv_prefix}/debug.test/record/json: message
|
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "fluent-plugin-consul"
|
7
|
-
spec.version = "0.0.
|
7
|
+
spec.version = "0.0.2"
|
8
8
|
spec.authors = ["foostan"]
|
9
9
|
spec.email = ["ks@fstn.jp"]
|
10
10
|
spec.summary = %q{Store Fluentd event to Consul Key/Value Storage}
|
@@ -19,14 +19,14 @@ module Fluent
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def format(tag, time, record)
|
22
|
-
|
22
|
+
[tag, time, record].to_msgpack
|
23
23
|
end
|
24
24
|
|
25
25
|
def write(chunk)
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
26
|
+
chunk.msgpack_each do |tag, time, record|
|
27
|
+
consul_kvs_fmt(record).each do |kv|
|
28
|
+
::Diplomat.put(@kv_prefix + '/' + tag + kv[:key].to_s, kv[:value].to_s)
|
29
|
+
end
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|