fluent-plugin-scribe 0.9.9 → 0.9.10
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +11 -0
- data/VERSION +1 -1
- data/bin/fluent-scribe-remote +1 -1
- data/example.conf +0 -1
- data/fluent-plugin-scribe.gemspec +17 -10
- data/lib/fluent/plugin/in_scribe.rb +2 -12
- metadata +5 -5
data/README.rdoc
CHANGED
@@ -44,6 +44,17 @@ Install this plugin with fluent, and add the following configuration to fluent.c
|
|
44
44
|
|
45
45
|
You can modify port, and the corresponding tag.
|
46
46
|
|
47
|
+
== For Developers
|
48
|
+
|
49
|
+
To test this plugin, please execute the following command in your 'fluent' project directory, not scribe input plugin directory.
|
50
|
+
|
51
|
+
$ export SCRIBE_PLUGIN_DIR=../fluent-plugin-scribe
|
52
|
+
$ FLUENT_PLUGIN=$SCRIBE_PLUGIN_DIR/lib/fluent/plugin/ ./bin/fluentd --config $SCRIBE_PLUGIN_DIR/example.conf -v -v -v
|
53
|
+
|
54
|
+
Then please execute the sample client.
|
55
|
+
|
56
|
+
$ ./bin/fluent-scribe-remote
|
57
|
+
|
47
58
|
== Contributors
|
48
59
|
|
49
60
|
* {Satoshi Tagomori}[https://github.com/tagomoris]
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.9.
|
1
|
+
0.9.10
|
data/bin/fluent-scribe-remote
CHANGED
data/example.conf
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
# Generated by jeweler
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{fluent-plugin-scribe}
|
8
|
-
s.version = "0.9.
|
8
|
+
s.version = "0.9.10"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Kazuki Ohta"]
|
12
|
-
s.date = %q{2011-
|
12
|
+
s.date = %q{2011-09-29}
|
13
13
|
s.extra_rdoc_files = [
|
14
14
|
"README.rdoc"
|
15
15
|
]
|
@@ -17,29 +17,36 @@ Gem::Specification.new do |s|
|
|
17
17
|
"AUTHORS",
|
18
18
|
"Rakefile",
|
19
19
|
"VERSION",
|
20
|
+
"bin/fluent-scribe-remote",
|
20
21
|
"example.conf",
|
21
22
|
"fluent-plugin-scribe.gemspec",
|
22
|
-
"lib/fluent/plugin/
|
23
|
+
"lib/fluent/plugin/in_scribe.rb",
|
24
|
+
"lib/fluent/plugin/thrift/facebook_service.rb",
|
25
|
+
"lib/fluent/plugin/thrift/fb303.thrift",
|
26
|
+
"lib/fluent/plugin/thrift/fb303_constants.rb",
|
27
|
+
"lib/fluent/plugin/thrift/fb303_types.rb",
|
28
|
+
"lib/fluent/plugin/thrift/scribe.rb",
|
29
|
+
"lib/fluent/plugin/thrift/scribe.thrift",
|
30
|
+
"lib/fluent/plugin/thrift/scribe_constants.rb",
|
31
|
+
"lib/fluent/plugin/thrift/scribe_types.rb"
|
23
32
|
]
|
24
|
-
s.rdoc_options = ["--charset=UTF-8"]
|
25
33
|
s.require_paths = ["lib"]
|
26
|
-
s.rubygems_version = %q{1.
|
34
|
+
s.rubygems_version = %q{1.6.2}
|
27
35
|
s.summary = %q{Scribe plugin for Fluent event collector}
|
28
36
|
|
29
37
|
if s.respond_to? :specification_version then
|
30
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
31
38
|
s.specification_version = 3
|
32
39
|
|
33
40
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
34
|
-
s.add_runtime_dependency(%q<thrift>, [">= 0.7.0"])
|
35
41
|
s.add_runtime_dependency(%q<fluent>, ["~> 0.9.7"])
|
42
|
+
s.add_runtime_dependency(%q<thrift>, ["~> 0.7.0"])
|
36
43
|
else
|
37
|
-
s.add_dependency(%q<thrift>, [">= 0.7.0"])
|
38
44
|
s.add_dependency(%q<fluent>, ["~> 0.9.7"])
|
45
|
+
s.add_dependency(%q<thrift>, ["~> 0.7.0"])
|
39
46
|
end
|
40
47
|
else
|
41
|
-
s.add_dependency(%q<thrift>, [">= 0.7.0"])
|
42
48
|
s.add_dependency(%q<fluent>, ["~> 0.9.7"])
|
49
|
+
s.add_dependency(%q<thrift>, ["~> 0.7.0"])
|
43
50
|
end
|
44
51
|
end
|
45
52
|
|
@@ -40,11 +40,6 @@ class ScribeInput < Input
|
|
40
40
|
@port = conf['port'] || @port
|
41
41
|
@port = @port.to_i
|
42
42
|
@bind = conf['bind'] || @bind
|
43
|
-
if tag = conf['tag']
|
44
|
-
@tag = tag
|
45
|
-
else
|
46
|
-
raise ConfigError, "in_scribe: 'tag' parameter is required on scribe input"
|
47
|
-
end
|
48
43
|
|
49
44
|
@server_type = conf['server_type'] || 'thread_pool'
|
50
45
|
@is_framed = conf['framed'].to_s != "false"
|
@@ -57,7 +52,7 @@ class ScribeInput < Input
|
|
57
52
|
def start
|
58
53
|
$log.debug "listening scribe on #{@bind}:#{@port}"
|
59
54
|
|
60
|
-
handler = FluentScribeHandler.new
|
55
|
+
handler = FluentScribeHandler.new
|
61
56
|
processor = Scribe::Processor.new handler
|
62
57
|
|
63
58
|
@transport = Thrift::ServerSocket.new @host, @port
|
@@ -108,18 +103,13 @@ class ScribeInput < Input
|
|
108
103
|
end
|
109
104
|
|
110
105
|
class FluentScribeHandler
|
111
|
-
def initialize(tag)
|
112
|
-
@tag = tag
|
113
|
-
end
|
114
|
-
|
115
106
|
def Log(msgs)
|
116
107
|
begin
|
117
108
|
msgs.each { |msg|
|
118
109
|
event = Event.new(Engine.now, {
|
119
|
-
'category' => msg.category,
|
120
110
|
'message' => msg.message
|
121
111
|
})
|
122
|
-
Engine.emit(
|
112
|
+
Engine.emit(msg.category, event)
|
123
113
|
}
|
124
114
|
return ResultCode::OK
|
125
115
|
rescue => e
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-scribe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.10
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -14,7 +14,7 @@ default_executable:
|
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: fluent
|
17
|
-
requirement: &
|
17
|
+
requirement: &2153972480 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ~>
|
@@ -22,10 +22,10 @@ dependencies:
|
|
22
22
|
version: 0.9.7
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *2153972480
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: thrift
|
28
|
-
requirement: &
|
28
|
+
requirement: &2153971820 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
31
|
- - ~>
|
@@ -33,7 +33,7 @@ dependencies:
|
|
33
33
|
version: 0.7.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *2153971820
|
37
37
|
description:
|
38
38
|
email:
|
39
39
|
executables: []
|