garru-ruby_scribe_client 0.0.6.1 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG +1 -0
- data/etc/scribe_munin.rb +7 -6
- data/etc/scribe_net +7 -6
- data/lib/ruby_scribe_client.rb +2 -2
- data/ruby_scribe_client.gemspec +2 -2
- metadata +2 -2
data/CHANGELOG
CHANGED
data/etc/scribe_munin.rb
CHANGED
@@ -29,17 +29,17 @@ class ScribeStats
|
|
29
29
|
graph_config = <<-END.gsub(/ +/, '')
|
30
30
|
graph_title Scribe Traffic
|
31
31
|
graph_args --base 1000
|
32
|
-
graph_vlabel bits
|
32
|
+
graph_vlabel bits per second
|
33
33
|
graph_category #{CATEGORY}
|
34
34
|
graph_order bytes_read bytes_written
|
35
35
|
END
|
36
36
|
|
37
37
|
stat_config = ''
|
38
|
-
counters.keys do |stat|
|
39
|
-
stat.gsub
|
40
|
-
|
41
|
-
value = "#{
|
42
|
-
stat_config << "#{
|
38
|
+
counters.keys.each do |stat|
|
39
|
+
stat_name = stat.gsub(/\s/){'_'}
|
40
|
+
net_stats.each do |var,value|
|
41
|
+
value = "#{stat_name}," + value if var == :cdef
|
42
|
+
stat_config << "#{stat_name}.#{var} #{value}\n"
|
43
43
|
end
|
44
44
|
end
|
45
45
|
|
@@ -51,6 +51,7 @@ class ScribeStats
|
|
51
51
|
@scribe.getCounters.each do |k, v|
|
52
52
|
ret << "#{k.gsub(/\s/){'_'}}.value #{v}\n"
|
53
53
|
end
|
54
|
+
ret
|
54
55
|
end
|
55
56
|
|
56
57
|
private
|
data/etc/scribe_net
CHANGED
@@ -29,17 +29,17 @@ class ScribeStats
|
|
29
29
|
graph_config = <<-END.gsub(/ +/, '')
|
30
30
|
graph_title Scribe Traffic
|
31
31
|
graph_args --base 1000
|
32
|
-
graph_vlabel bits
|
32
|
+
graph_vlabel bits per second
|
33
33
|
graph_category #{CATEGORY}
|
34
34
|
graph_order bytes_read bytes_written
|
35
35
|
END
|
36
36
|
|
37
37
|
stat_config = ''
|
38
|
-
counters.keys do |stat|
|
39
|
-
stat.gsub
|
40
|
-
|
41
|
-
value = "#{
|
42
|
-
stat_config << "#{
|
38
|
+
counters.keys.each do |stat|
|
39
|
+
stat_name = stat.gsub(/\s/){'_'}
|
40
|
+
net_stats.each do |var,value|
|
41
|
+
value = "#{stat_name}," + value if var == :cdef
|
42
|
+
stat_config << "#{stat_name}.#{var} #{value}\n"
|
43
43
|
end
|
44
44
|
end
|
45
45
|
|
@@ -51,6 +51,7 @@ class ScribeStats
|
|
51
51
|
@scribe.getCounters.each do |k, v|
|
52
52
|
ret << "#{k.gsub(/\s/){'_'}}.value #{v}\n"
|
53
53
|
end
|
54
|
+
ret
|
54
55
|
end
|
55
56
|
|
56
57
|
private
|
data/lib/ruby_scribe_client.rb
CHANGED
@@ -4,8 +4,8 @@ require File.join([File.dirname(__FILE__), 'ruby_scribe_client', 'scribe'])
|
|
4
4
|
class ScribeLogger
|
5
5
|
attr_accessor :host, :port, :namespace
|
6
6
|
|
7
|
-
def initialize(host, port, namespace = nil)
|
8
|
-
@transport = Thrift::FramedTransport.new(Thrift::Socket.new(host, port))
|
7
|
+
def initialize(host, port, namespace = nil, timeout = nil)
|
8
|
+
@transport = Thrift::FramedTransport.new(Thrift::Socket.new(host, port, timeout))
|
9
9
|
@protocol = Thrift::BinaryProtocol.new(@transport, false, false)
|
10
10
|
@client = Scribe::Client.new(@protocol)
|
11
11
|
@namespace = namespace
|
data/ruby_scribe_client.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{ruby_scribe_client}
|
5
|
-
s.version = "0.0.
|
5
|
+
s.version = "0.0.7"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Gary Tsang"]
|
9
|
-
s.date = %q{2009-04-
|
9
|
+
s.date = %q{2009-04-13}
|
10
10
|
s.description = %q{Ruby Scribe Client. Package and Wrapper for generated ruby interfaces}
|
11
11
|
s.email = %q{}
|
12
12
|
s.extra_rdoc_files = ["CHANGELOG", "lib/ruby_scribe_client/FacebookService.rb", "lib/ruby_scribe_client/fb303_client.rb", "lib/ruby_scribe_client/fb303_types.rb", "lib/ruby_scribe_client/reflection_limited_types.rb", "lib/ruby_scribe_client/scribe.rb", "lib/ruby_scribe_client/scribe_mgmt.rb", "lib/ruby_scribe_client/scribe_types.rb", "lib/ruby_scribe_client.rb", "LICENSE", "README"]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: garru-ruby_scribe_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gary Tsang
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-04-
|
12
|
+
date: 2009-04-13 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|