fluent-plugin-zookeeper-mntr 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/fluent/plugin/in_zookeeper_mntr.rb +17 -3
- data/lib/fluent/plugin/zookeeper/mntr/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bda63954af8d01fce8496bd736056b700db85fa84b830762a566d85a73d1aa82
|
4
|
+
data.tar.gz: 95fd26545fd64ef298b0088f77aa629d13d7d5f428b987fd18bdd1921dd9caf3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c48c9140eec80f65c7096d8516d77e36af11b890dfd9ccfe2f6a75e3a3bd4ba4611a980ea974f445dcf27b6c7536b944a92fef49eba18b2bb6051b98b77bb4d9
|
7
|
+
data.tar.gz: d49285390013bba1190636376e7cb30868d7d4f59f3b5aa25c66b52ae13e92383a4bf1f2c16f91c957ebc8d09b35d6762e0f2823fba8b4f38748a1f7ec059462
|
data/CHANGELOG.md
CHANGED
@@ -40,11 +40,25 @@ module Fluent
|
|
40
40
|
socket_create_tcp(@host, @port) do |socket|
|
41
41
|
socket.write('mntr')
|
42
42
|
data = socket.read
|
43
|
-
message =
|
44
|
-
data.
|
45
|
-
|
43
|
+
message =
|
44
|
+
if data.start_with?('This ZooKeeper')
|
45
|
+
{ 'error' => data }
|
46
|
+
else
|
47
|
+
Hash[data.split("\n").map! { |row| row.split("\t") }]
|
48
|
+
end
|
49
|
+
|
50
|
+
message.transform_values do |value|
|
51
|
+
if value =~ /\A[0-9]+\z/
|
52
|
+
value.to_i
|
53
|
+
else
|
54
|
+
value
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
46
58
|
router.emit(@tag, Fluent::EventTime.now, message)
|
47
59
|
end
|
60
|
+
rescue StandardError => exc
|
61
|
+
router.emit(@tag, Fluent::EventTime.now, { 'error' => exc.message })
|
48
62
|
end
|
49
63
|
end
|
50
64
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-zookeeper-mntr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Scarborough
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-05-
|
11
|
+
date: 2022-05-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|