ffwd-riemann 0.1.7 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/ffwd/plugin/riemann/connection.rb +3 -3
- data/lib/ffwd/plugin/riemann/version.rb +1 -1
- data/lib/ffwd/plugin/riemann.rb +14 -22
- metadata +17 -27
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 26799a65a4b9c7da9fb5a91d475b0ceafc908b38
|
4
|
+
data.tar.gz: 48fc183e8bab98a8f4092faf1cabc62fd7e0a30f
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 179a4d1c73fbae1c09ea37249718512561ffc58e40de3d8e8a6b94aec0858d03c36cff36b6c710d4906ff26a106ccbd843b37e60e7dbfaa319f0715a9ee3be3e
|
7
|
+
data.tar.gz: 05251cf4e2e10a0a8ac257e0b5a0b937e0e2764de8cc1d4b806bf2b9a22a2e22cf21c4893b6ee8e15272a21d0f177d452506e33230100c93e6d03517d69aff95
|
@@ -29,10 +29,10 @@ module FFWD::Plugin::Riemann
|
|
29
29
|
FFWD::Plugin::Riemann::Connection::Serializer
|
30
30
|
end
|
31
31
|
|
32
|
-
def initialize bind, core,
|
32
|
+
def initialize bind, core, config
|
33
33
|
@bind = bind
|
34
34
|
@core = core
|
35
|
-
@
|
35
|
+
@config = config
|
36
36
|
end
|
37
37
|
|
38
38
|
def receive_object(m)
|
@@ -51,7 +51,7 @@ module FFWD::Plugin::Riemann
|
|
51
51
|
send_ok
|
52
52
|
rescue => e
|
53
53
|
@bind.increment :failed_events, m.events.size
|
54
|
-
@log.error "Failed to receive object", e
|
54
|
+
@bind.log.error "Failed to receive object", e
|
55
55
|
send_error e
|
56
56
|
end
|
57
57
|
|
data/lib/ffwd/plugin/riemann.rb
CHANGED
@@ -104,39 +104,31 @@ module FFWD::Plugin::Riemann
|
|
104
104
|
OUTPUTS = {:tcp => OutputTCP, :udp => OutputUDP}
|
105
105
|
INPUTS = {:tcp => InputTCP, :udp => InputUDP}
|
106
106
|
|
107
|
-
def self.setup_output
|
108
|
-
|
109
|
-
|
107
|
+
def self.setup_output config
|
108
|
+
config[:host] ||= DEFAULT_HOST
|
109
|
+
config[:port] ||= DEFAULT_PORT
|
110
|
+
config[:protocol] ||= DEFAULT_PROTOCOL
|
110
111
|
|
111
|
-
protocol = FFWD.parse_protocol
|
112
|
+
protocol = FFWD.parse_protocol config[:protocol]
|
112
113
|
|
113
|
-
unless
|
114
|
-
raise "No
|
114
|
+
unless handler = OUTPUTS[protocol.family]
|
115
|
+
raise "No handler for protocol family: #{protocol.family}"
|
115
116
|
end
|
116
117
|
|
117
|
-
protocol.connect
|
118
|
+
protocol.connect config, log, handler
|
118
119
|
end
|
119
120
|
|
120
|
-
def self.setup_input
|
121
|
-
|
122
|
-
|
123
|
-
|
121
|
+
def self.setup_input config
|
122
|
+
config[:host] ||= DEFAULT_HOST
|
123
|
+
config[:port] ||= DEFAULT_PORT
|
124
|
+
config[:protocol] ||= DEFAULT_PROTOCOL
|
124
125
|
|
125
|
-
|
126
|
-
raise "No connection for protocol family: #{protocol.family}"
|
127
|
-
end
|
128
|
-
|
129
|
-
protocol.bind opts, core, log, connection, log
|
130
|
-
end
|
131
|
-
|
132
|
-
def self.setup_tunnel opts, core, tunnel
|
133
|
-
opts[:port] ||= DEFAULT_PORT
|
134
|
-
protocol = FFWD.parse_protocol(opts[:protocol] || DEFAULT_PROTOCOL)
|
126
|
+
protocol = FFWD.parse_protocol config[:protocol]
|
135
127
|
|
136
128
|
unless connection = INPUTS[protocol.family]
|
137
129
|
raise "No connection for protocol family: #{protocol.family}"
|
138
130
|
end
|
139
131
|
|
140
|
-
protocol.
|
132
|
+
protocol.bind config, log, connection
|
141
133
|
end
|
142
134
|
end
|
metadata
CHANGED
@@ -1,78 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ffwd-riemann
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.2.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- John-John Tedro
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2014-
|
11
|
+
date: 2014-06-02 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: riemann-client
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - '>='
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '0'
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: ffwd
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
31
|
- - '='
|
36
32
|
- !ruby/object:Gem::Version
|
37
|
-
version: 0.
|
33
|
+
version: 0.2.0
|
38
34
|
type: :development
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
38
|
- - '='
|
44
39
|
- !ruby/object:Gem::Version
|
45
|
-
version: 0.
|
40
|
+
version: 0.2.0
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: rspec
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - '>='
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: '0'
|
54
48
|
type: :development
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- -
|
52
|
+
- - '>='
|
60
53
|
- !ruby/object:Gem::Version
|
61
54
|
version: '0'
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: rspec-mocks
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
|
-
- -
|
59
|
+
- - '>='
|
68
60
|
- !ruby/object:Gem::Version
|
69
61
|
version: '0'
|
70
62
|
type: :development
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
|
-
- -
|
66
|
+
- - '>='
|
76
67
|
- !ruby/object:Gem::Version
|
77
68
|
version: '0'
|
78
69
|
description:
|
@@ -83,33 +74,32 @@ extensions: []
|
|
83
74
|
extra_rdoc_files: []
|
84
75
|
files:
|
85
76
|
- lib/ffwd/plugin/riemann.rb
|
86
|
-
- lib/ffwd/plugin/riemann/shared.rb
|
87
|
-
- lib/ffwd/plugin/riemann/version.rb
|
88
77
|
- lib/ffwd/plugin/riemann/output.rb
|
78
|
+
- lib/ffwd/plugin/riemann/shared.rb
|
89
79
|
- lib/ffwd/plugin/riemann/connection.rb
|
80
|
+
- lib/ffwd/plugin/riemann/version.rb
|
90
81
|
homepage: https://github.com/spotify/ffwd
|
91
82
|
licenses:
|
92
83
|
- Apache 2.0
|
84
|
+
metadata: {}
|
93
85
|
post_install_message:
|
94
86
|
rdoc_options: []
|
95
87
|
require_paths:
|
96
88
|
- lib
|
97
89
|
required_ruby_version: !ruby/object:Gem::Requirement
|
98
|
-
none: false
|
99
90
|
requirements:
|
100
|
-
- -
|
91
|
+
- - '>='
|
101
92
|
- !ruby/object:Gem::Version
|
102
93
|
version: '0'
|
103
94
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
104
|
-
none: false
|
105
95
|
requirements:
|
106
|
-
- -
|
96
|
+
- - '>='
|
107
97
|
- !ruby/object:Gem::Version
|
108
98
|
version: '0'
|
109
99
|
requirements: []
|
110
100
|
rubyforge_project:
|
111
|
-
rubygems_version:
|
101
|
+
rubygems_version: 2.0.3
|
112
102
|
signing_key:
|
113
|
-
specification_version:
|
103
|
+
specification_version: 4
|
114
104
|
summary: Riemann support for FFWD.
|
115
105
|
test_files: []
|