ganymed 0.3.4 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. data/Gemfile +1 -2
  2. data/README.md +6 -14
  3. data/ganymed.gemspec +4 -17
  4. data/lib/ganymed/collector.rb +6 -30
  5. data/lib/ganymed/collectors/cpu.rb +8 -8
  6. data/lib/ganymed/collectors/disk.rb +2 -2
  7. data/lib/ganymed/collectors/iostat.rb +2 -2
  8. data/lib/ganymed/collectors/load.rb +1 -1
  9. data/lib/ganymed/collectors/memory.rb +8 -8
  10. data/lib/ganymed/collectors/network.rb +6 -6
  11. data/lib/ganymed/collectors/process.rb +4 -4
  12. data/lib/ganymed/config.yml +0 -32
  13. data/lib/ganymed/master.rb +9 -8
  14. data/lib/ganymed/version.rb +1 -1
  15. metadata +8 -152
  16. data/contrib/cpuhog +0 -0
  17. data/contrib/cpuhog.c +0 -21
  18. data/lib/ganymed/collectors/uptime.rb +0 -10
  19. data/lib/ganymed/console.rb +0 -147
  20. data/lib/ganymed/event.rb +0 -97
  21. data/lib/ganymed/ext/array.rb +0 -38
  22. data/lib/ganymed/mongodb.rb +0 -44
  23. data/lib/ganymed/processor.rb +0 -137
  24. data/lib/ganymed/sampler/counter.rb +0 -19
  25. data/lib/ganymed/sampler/datasource.rb +0 -85
  26. data/lib/ganymed/sampler/derive.rb +0 -27
  27. data/lib/ganymed/sampler/gauge.rb +0 -20
  28. data/lib/ganymed/sampler.rb +0 -94
  29. data/lib/ganymed/websocket/authentication.rb +0 -37
  30. data/lib/ganymed/websocket/connection.rb +0 -71
  31. data/lib/ganymed/websocket/filter.rb +0 -23
  32. data/lib/ganymed/websocket/metadata.rb +0 -21
  33. data/lib/ganymed/websocket/query.rb +0 -30
  34. data/lib/ganymed/websocket/subscribe.rb +0 -45
  35. data/lib/ganymed/websocket.rb +0 -45
  36. data/spec/sampler/counter_spec.rb +0 -11
  37. data/spec/sampler/datasource_examples.rb +0 -49
  38. data/spec/sampler/datasource_spec.rb +0 -23
  39. data/spec/sampler/derive_spec.rb +0 -34
  40. data/spec/sampler/gauge_spec.rb +0 -35
  41. data/spec/sampler_spec.rb +0 -5
data/Gemfile CHANGED
@@ -3,9 +3,8 @@ source :rubygems
3
3
  gemspec
4
4
 
5
5
  group :development, :test do
6
- #gem 'ganymed-client', :path => '../ganymed-client'
7
- gem 'bson_ext'
8
6
  gem 'bundler'
7
+ gem 'cane'
9
8
  gem 'debugger'
10
9
  gem 'perftools.rb'
11
10
  gem 'pry'
data/README.md CHANGED
@@ -1,20 +1,12 @@
1
1
  # Ganymed
2
2
 
3
- Ganymed is an event collection daemon.
3
+ Ganymed is a daemon that collects Metriks from third-party applications.
4
4
 
5
- Ganymed processes system and application metrics and events in realtime and can
6
- easily handle thousands of samples per second. Ganymed provides these services
7
- to administrators and third-party applications:
8
-
9
- * The *Sampler* accepts high frequency samples. these samples are then
10
- consolidated based on the data source type and emitted to the *Processor*.
11
-
12
- * The *Processor* accepts metrics (events) and stores these metrics into
13
- MongoDB. All metrics are also published to interested parties via WebSocket.
14
-
15
- * The *Collector* is a simple thread that polls various system-level metrics
16
- that are not pushed to the *Sampler*/*Processor* from third-party
17
- applications.
5
+ The metriks gem and its logfile reporter are a great tool for rapid metric
6
+ collection. However applications have to collect metrics themselves. In order
7
+ to collect system-level metrics and metrics from applications like MySQL or
8
+ MongoDB, these applications have to be polled from the outside. Ganymed polls
9
+ thos applications and system-level metrics (in /proc or similar).
18
10
 
19
11
  ## Installation
20
12
 
data/ganymed.gemspec CHANGED
@@ -8,8 +8,8 @@ Gem::Specification.new do |s|
8
8
  s.authors = ["Benedikt Böhm"]
9
9
  s.email = ["bb@xnull.de"]
10
10
  s.homepage = "http://github.com/zenops/ganymed"
11
- s.summary = %q{Ganymed is an event collection daemon}
12
- s.description = %q{Ganymed is an event collection daemon}
11
+ s.summary = %q{Ganymed is a daemon that collects Metriks from third-party applications}
12
+ s.description = %q{Ganymed is a daemon that collects Metriks from third-party applications}
13
13
 
14
14
  s.files = `git ls-files`.split("\n")
15
15
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
@@ -19,27 +19,14 @@ Gem::Specification.new do |s|
19
19
  # master
20
20
  s.add_dependency "activesupport", ">= 3.2"
21
21
  s.add_dependency "eventmachine", ">= 0.12.10"
22
- s.add_dependency "ganymed-client", ">= 0.2.0"
23
22
  s.add_dependency "madvertise-ext", ">= 0.1.2"
24
23
  s.add_dependency "madvertise-logging", ">= 0.3.2"
25
24
  s.add_dependency "mixlib-cli"
26
- s.add_dependency "RubyInline"
27
25
  s.add_dependency "servolux"
28
26
 
29
- # processor
30
- s.add_dependency "msgpack"
31
- s.add_dependency "mongo", ">= 1.6"
32
-
33
- # websocket
34
- s.add_dependency "em-websocket"
35
- s.add_dependency "yajl-ruby"
36
-
37
27
  # collector
28
+ s.add_dependency "metriks"
29
+ s.add_dependency "metriks-derive"
38
30
  s.add_dependency "sys-filesystem"
39
31
  s.add_dependency "ohai", ">= 0.6.12"
40
-
41
- # console
42
- s.add_dependency "ripl"
43
- s.add_dependency "ascii_charts"
44
- s.add_dependency "terminal-table"
45
32
  end
@@ -1,13 +1,13 @@
1
1
  require 'eventmachine'
2
-
3
2
  require 'ganymed'
4
- require 'ganymed/client'
3
+ require 'metriks'
4
+ require 'metriks-derive'
5
5
 
6
6
  module Ganymed
7
7
 
8
8
  ##
9
9
  # The Collector is a simple thread that polls various system-level metrics
10
- # that are not pushed to the {Sampler}/{Processor} from third-party
10
+ # that are not pushed to the {Processor} from third-party
11
11
  # applications.
12
12
  #
13
13
  # The Collector features a very simple DSL to implement custom collector
@@ -40,26 +40,11 @@ module Ganymed
40
40
  # @return [Section]
41
41
  attr_reader :config
42
42
 
43
- # The client object.
44
- # @return [Ganymed::Client]
45
- attr_reader :client
46
-
47
43
  # Create a new collector instance and initialize all configured collectors.
48
44
  #
49
45
  # @param [Section] config The configuration object.
50
46
  def initialize(config)
51
47
  @config = config
52
-
53
- @config.client.sampler.tap do |sampler|
54
- log.info("emitting collected samples to tcp##{sampler.host}:#{sampler.port}")
55
- @sampler = Ganymed::Client::Sampler.connect(sampler.host, sampler.port)
56
- end
57
-
58
- @config.client.processor.tap do |processor|
59
- log.info("emitting collected events to tcp##{processor.host}:#{processor.port}")
60
- @processor = Ganymed::Client::Processor.connect(processor.host, processor.port)
61
- end
62
-
63
48
  load_collectors
64
49
  end
65
50
 
@@ -70,7 +55,7 @@ module Ganymed
70
55
  config = @config.collectors[name.to_sym] || Section.new
71
56
 
72
57
  log.debug("loading collector #{name} from #{file}")
73
- Plugin.new(config, @sampler, @processor).from_file(file).tap do |collector|
58
+ Plugin.new(config).from_file(file).tap do |collector|
74
59
  log.info("collecting #{name} metrics every #{collector.interval} seconds")
75
60
  collector.run
76
61
  end
@@ -105,20 +90,11 @@ module Ganymed
105
90
  # @return [Fixnum,Float]
106
91
  attr_accessor :interval
107
92
 
108
- # Processor socket.
109
- # @return [Ganymed::Client::Processor]
110
- attr_accessor :processor
111
-
112
- # Sampler socket.
113
- # @return [Ganymed::Client::Sampler]
114
- attr_accessor :sampler
115
-
116
93
  # Create a new plugin instance.
117
94
  #
118
95
  # @param [Section] config The configuration object.
119
- # @param [Ganymed::Client] client A client instance.
120
- def initialize(config, sampler, processor)
121
- @config, @sampler, @processor = config, sampler, processor
96
+ def initialize(config)
97
+ @config = config
122
98
  end
123
99
 
124
100
  # Set the block used to collect metrics with this plugin.
@@ -1,7 +1,7 @@
1
1
  collect do
2
2
  next if not File.readable?('/proc/stat')
3
3
 
4
- File.open('/proc/stat') do | file|
4
+ File.open('/proc/stat') do |file|
5
5
  file.each do |line|
6
6
  next if not line =~ /^cpu /
7
7
 
@@ -9,13 +9,13 @@ collect do
9
9
  x.to_i / 100
10
10
  end
11
11
 
12
- sampler.emit(:derive, "os.cpu.user", cpu[0])
13
- sampler.emit(:derive, "os.cpu.nice", cpu[1])
14
- sampler.emit(:derive, "os.cpu.system", cpu[2])
15
- sampler.emit(:derive, "os.cpu.idle", cpu[3])
16
- sampler.emit(:derive, "os.cpu.iowait", cpu[4])
17
- sampler.emit(:derive, "os.cpu.irq", cpu[5])
18
- sampler.emit(:derive, "os.cpu.softirq", cpu[6])
12
+ Metriks.derive("os.cpu.user").mark(cpu[0])
13
+ Metriks.derive("os.cpu.nice").mark(cpu[1])
14
+ Metriks.derive("os.cpu.system").mark(cpu[2])
15
+ Metriks.derive("os.cpu.idle").mark(cpu[3])
16
+ Metriks.derive("os.cpu.iowait").mark(cpu[4])
17
+ Metriks.derive("os.cpu.irq").mark(cpu[5])
18
+ Metriks.derive("os.cpu.softirq").mark(cpu[6])
19
19
  end
20
20
  end
21
21
  end
@@ -16,10 +16,10 @@ collect do
16
16
  next if config.exclude.map {|e| Regexp.new(e).match(name)}.any?
17
17
 
18
18
  block_pc = 1.0 - (st.blocks_free.to_f / st.blocks.to_f)
19
- sampler.emit(:gauge, "os.disk.#{name}.blocks", block_pc)
19
+ Metriks.histogram("os.disk.#{name}.blocks").update(block_pc)
20
20
 
21
21
  files_pc = 1.0 - (st.files_free.to_f / st.files.to_f)
22
- sampler.emit(:gauge, "os.disk.#{name}.files", files_pc)
22
+ Metriks.histogram("os.disk.#{name}.files").update(files_pc)
23
23
  end
24
24
  end
25
25
  end
@@ -11,8 +11,8 @@ collect do
11
11
  ios = Struct::IOStat.new(*line.strip.split(/\s+/))
12
12
  next if config.skip_numbered.tap{} and ios.dev =~ /\d+$/
13
13
  next if config.exclude.map {|e| Regexp.new(e).match(ios.dev)}.any?
14
- sampler.emit(:derive, "os.iostat.#{ios.dev}.rsect", ios.rsect)
15
- sampler.emit(:derive, "os.iostat.#{ios.dev}.wsect", ios.wsect)
14
+ Metriks.derive("os.iostat.#{ios.dev}.rsect").mark(ios.rsect)
15
+ Metriks.derive("os.iostat.#{ios.dev}.wsect").mark(ios.wsect)
16
16
  end
17
17
  end
18
18
  end
@@ -2,6 +2,6 @@ collect do
2
2
  next if not File.readable?('/proc/loadavg')
3
3
  File.open('/proc/loadavg') do |file|
4
4
  loadavg = file.read.chomp.split[0,3].map(&:to_f)
5
- sampler.emit(:gauge, "os.loadavg", loadavg[0])
5
+ Metriks.histogram("os.loadavg").update(loadavg[0])
6
6
  end
7
7
  end
@@ -14,28 +14,28 @@ collect do
14
14
  when "MemTotal"
15
15
  apps = value
16
16
  when "MemFree"
17
- sampler.emit(:gauge, "os.mem.unused", value)
17
+ Metriks.histogram("os.mem.unused").update(value)
18
18
  apps -= value
19
19
  when "Buffers"
20
- sampler.emit(:gauge, "os.mem.buffers", value)
20
+ Metriks.histogram("os.mem.buffers").update(value)
21
21
  apps -= value
22
22
  when "Cached"
23
- sampler.emit(:gauge, "os.mem.cache", value)
23
+ Metriks.histogram("os.mem.cache").update(value)
24
24
  apps -= value
25
25
  when "SwapCached"
26
- sampler.emit(:gauge, "os.mem.swap_cache", value)
26
+ Metriks.histogram("os.mem.swap_cache").update(value)
27
27
  apps -= value
28
28
  when "Slab"
29
- sampler.emit(:gauge, "os.mem.slab_cache", value)
29
+ Metriks.histogram("os.mem.slab_cache").update(value)
30
30
  apps -= value
31
31
  when "PageTables"
32
- sampler.emit(:gauge, "os.mem.page_tables", value)
32
+ Metriks.histogram("os.mem.page_tables").update(value)
33
33
  apps -= value
34
34
  when "Mapped"
35
- sampler.emit(:gauge, "os.mem.mapped", value)
35
+ Metriks.histogram("os.mem.mapped").update(value)
36
36
  end
37
37
  end
38
38
 
39
- sampler.emit(:gauge, "os.mem.apps", apps)
39
+ Metriks.histogram("os.mem.apps").update(apps)
40
40
  end
41
41
  end
@@ -15,12 +15,12 @@ collect do
15
15
 
16
16
  next if config.exclude.map {|e| Regexp.new(e).match(ns.dev)}.any?
17
17
 
18
- sampler.emit(:derive, "os.net.#{ns.dev}.rbytes", ns.rbytes)
19
- sampler.emit(:derive, "os.net.#{ns.dev}.wbytes", ns.wbytes)
20
- sampler.emit(:derive, "os.net.#{ns.dev}.rpackets", ns.rpackets)
21
- sampler.emit(:derive, "os.net.#{ns.dev}.wpackets", ns.wpackets)
22
- sampler.emit(:derive, "os.net.#{ns.dev}.rerrs", ns.rerrs)
23
- sampler.emit(:derive, "os.net.#{ns.dev}.werrs", ns.werrs)
18
+ Metriks.derive("os.net.#{ns.dev}.rbytes").mark(ns.rbytes.to_i)
19
+ Metriks.derive("os.net.#{ns.dev}.wbytes").mark(ns.wbytes.to_i)
20
+ Metriks.derive("os.net.#{ns.dev}.rpackets").mark(ns.rpackets.to_i)
21
+ Metriks.derive("os.net.#{ns.dev}.wpackets").mark(ns.wpackets.to_i)
22
+ Metriks.derive("os.net.#{ns.dev}.rerrs").mark(ns.rerrs.to_i)
23
+ Metriks.derive("os.net.#{ns.dev}.werrs").mark(ns.werrs.to_i)
24
24
  end
25
25
  end
26
26
  end
@@ -5,13 +5,13 @@ collect do
5
5
  key, value = line.chomp.split
6
6
  case key
7
7
  when "ctxt"
8
- sampler.emit(:derive, "os.procs.switch", value.to_i)
8
+ Metriks.derive("os.procs.switch").mark(value.to_i)
9
9
  when "processes"
10
- sampler.emit(:derive, "os.procs.forks", value.to_i)
10
+ Metriks.derive("os.procs.forks").mark(value.to_i)
11
11
  when "procs_running"
12
- sampler.emit(:gauge, "os.procs.running", value.to_i)
12
+ Metriks.histogram("os.procs.running").update(value.to_i)
13
13
  when "procs_blocked"
14
- sampler.emit(:gauge, "os.procs.blocked", value.to_i)
14
+ Metriks.histogram("os.procs.blocked").update(value.to_i)
15
15
  end
16
16
  end
17
17
  end
@@ -7,38 +7,6 @@ generic:
7
7
  gcprofiler: false
8
8
  rubyprof: false
9
9
 
10
- processor:
11
- enabled: true
12
- listen:
13
- host: 0.0.0.0
14
- port: 1336
15
- mongodb:
16
- host: localhost
17
- port: 27017
18
- database: ganymed
19
- pool_size: 25
20
- pool_timeout: 5
21
- websocket:
22
- host: 0.0.0.0
23
- port: 1338
24
-
25
- sampler:
26
- enabled: true
27
- window: 300
28
- listen:
29
- host: 127.0.0.1
30
- port: 1337
31
- consolidations:
32
- avg: [mean]
33
-
34
- client:
35
- processor:
36
- host: 127.0.0.1
37
- port: 1336
38
- sampler:
39
- host: 127.0.0.1
40
- port: 1337
41
-
42
10
  collectors:
43
11
  network:
44
12
  exclude:
@@ -2,14 +2,14 @@ require 'eventmachine'
2
2
  require 'madvertise/ext/config'
3
3
  require 'mixlib/cli'
4
4
  require 'servolux'
5
- require 'socket'
6
5
 
7
6
  require 'ganymed'
8
7
  require 'ganymed/collector'
9
- require 'ganymed/processor'
10
- require 'ganymed/sampler'
11
8
  require 'ganymed/version'
12
9
 
10
+ require 'metriks'
11
+ require 'metriks/reporter/logger'
12
+
13
13
  module Ganymed
14
14
  # @private
15
15
  class Master < ::Servolux::Server
@@ -20,9 +20,6 @@ module Ganymed
20
20
  @default_config_file = File.join(LIB_DIR, 'ganymed/config.yml')
21
21
  @config_file = cli[:config_file]
22
22
 
23
- # store fqdn for later use
24
- config.fqdn = ::Socket.gethostbyname(::Socket.gethostname).first
25
-
26
23
  # initialize servolux
27
24
  super('ganymed',
28
25
  :interval => 1,
@@ -39,10 +36,14 @@ module Ganymed
39
36
 
40
37
  EventMachine.epoll # use epoll
41
38
  EventMachine.run do
42
- Processor.new(config) if config.processor.enabled
43
- Sampler.new(config) if config.sampler.enabled
44
39
  Collector.new(config) if config.collectors.any?
40
+ Metriks::Reporter::Logger.new({
41
+ :logger => log,
42
+ :interval => 10,
43
+ :on_error => ->(e) { log.exception(e) },
44
+ }).start
45
45
  end
46
+
46
47
  rescue Exception => exc
47
48
  log.exception(exc)
48
49
  end
@@ -1,4 +1,4 @@
1
1
  module Ganymed
2
2
  # @private
3
- VERSION = '0.3.4'
3
+ VERSION = '0.4.0'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ganymed
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.4.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-05 00:00:00.000000000 Z
12
+ date: 2012-10-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -43,22 +43,6 @@ dependencies:
43
43
  - - ! '>='
44
44
  - !ruby/object:Gem::Version
45
45
  version: 0.12.10
46
- - !ruby/object:Gem::Dependency
47
- name: ganymed-client
48
- requirement: !ruby/object:Gem::Requirement
49
- none: false
50
- requirements:
51
- - - ! '>='
52
- - !ruby/object:Gem::Version
53
- version: 0.2.0
54
- type: :runtime
55
- prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
- requirements:
59
- - - ! '>='
60
- - !ruby/object:Gem::Version
61
- version: 0.2.0
62
46
  - !ruby/object:Gem::Dependency
63
47
  name: madvertise-ext
64
48
  requirement: !ruby/object:Gem::Requirement
@@ -107,22 +91,6 @@ dependencies:
107
91
  - - ! '>='
108
92
  - !ruby/object:Gem::Version
109
93
  version: '0'
110
- - !ruby/object:Gem::Dependency
111
- name: RubyInline
112
- requirement: !ruby/object:Gem::Requirement
113
- none: false
114
- requirements:
115
- - - ! '>='
116
- - !ruby/object:Gem::Version
117
- version: '0'
118
- type: :runtime
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
- requirements:
123
- - - ! '>='
124
- - !ruby/object:Gem::Version
125
- version: '0'
126
94
  - !ruby/object:Gem::Dependency
127
95
  name: servolux
128
96
  requirement: !ruby/object:Gem::Requirement
@@ -140,7 +108,7 @@ dependencies:
140
108
  - !ruby/object:Gem::Version
141
109
  version: '0'
142
110
  - !ruby/object:Gem::Dependency
143
- name: msgpack
111
+ name: metriks
144
112
  requirement: !ruby/object:Gem::Requirement
145
113
  none: false
146
114
  requirements:
@@ -156,39 +124,7 @@ dependencies:
156
124
  - !ruby/object:Gem::Version
157
125
  version: '0'
158
126
  - !ruby/object:Gem::Dependency
159
- name: mongo
160
- requirement: !ruby/object:Gem::Requirement
161
- none: false
162
- requirements:
163
- - - ! '>='
164
- - !ruby/object:Gem::Version
165
- version: '1.6'
166
- type: :runtime
167
- prerelease: false
168
- version_requirements: !ruby/object:Gem::Requirement
169
- none: false
170
- requirements:
171
- - - ! '>='
172
- - !ruby/object:Gem::Version
173
- version: '1.6'
174
- - !ruby/object:Gem::Dependency
175
- name: em-websocket
176
- requirement: !ruby/object:Gem::Requirement
177
- none: false
178
- requirements:
179
- - - ! '>='
180
- - !ruby/object:Gem::Version
181
- version: '0'
182
- type: :runtime
183
- prerelease: false
184
- version_requirements: !ruby/object:Gem::Requirement
185
- none: false
186
- requirements:
187
- - - ! '>='
188
- - !ruby/object:Gem::Version
189
- version: '0'
190
- - !ruby/object:Gem::Dependency
191
- name: yajl-ruby
127
+ name: metriks-derive
192
128
  requirement: !ruby/object:Gem::Requirement
193
129
  none: false
194
130
  requirements:
@@ -235,55 +171,7 @@ dependencies:
235
171
  - - ! '>='
236
172
  - !ruby/object:Gem::Version
237
173
  version: 0.6.12
238
- - !ruby/object:Gem::Dependency
239
- name: ripl
240
- requirement: !ruby/object:Gem::Requirement
241
- none: false
242
- requirements:
243
- - - ! '>='
244
- - !ruby/object:Gem::Version
245
- version: '0'
246
- type: :runtime
247
- prerelease: false
248
- version_requirements: !ruby/object:Gem::Requirement
249
- none: false
250
- requirements:
251
- - - ! '>='
252
- - !ruby/object:Gem::Version
253
- version: '0'
254
- - !ruby/object:Gem::Dependency
255
- name: ascii_charts
256
- requirement: !ruby/object:Gem::Requirement
257
- none: false
258
- requirements:
259
- - - ! '>='
260
- - !ruby/object:Gem::Version
261
- version: '0'
262
- type: :runtime
263
- prerelease: false
264
- version_requirements: !ruby/object:Gem::Requirement
265
- none: false
266
- requirements:
267
- - - ! '>='
268
- - !ruby/object:Gem::Version
269
- version: '0'
270
- - !ruby/object:Gem::Dependency
271
- name: terminal-table
272
- requirement: !ruby/object:Gem::Requirement
273
- none: false
274
- requirements:
275
- - - ! '>='
276
- - !ruby/object:Gem::Version
277
- version: '0'
278
- type: :runtime
279
- prerelease: false
280
- version_requirements: !ruby/object:Gem::Requirement
281
- none: false
282
- requirements:
283
- - - ! '>='
284
- - !ruby/object:Gem::Version
285
- version: '0'
286
- description: Ganymed is an event collection daemon
174
+ description: Ganymed is a daemon that collects Metriks from third-party applications
287
175
  email:
288
176
  - bb@xnull.de
289
177
  executables:
@@ -302,8 +190,6 @@ files:
302
190
  - Rakefile
303
191
  - bin/ganymed
304
192
  - bin/ganymed-console
305
- - contrib/cpuhog
306
- - contrib/cpuhog.c
307
193
  - ganymed.gemspec
308
194
  - lib/ganymed.rb
309
195
  - lib/ganymed/collector.rb
@@ -314,33 +200,9 @@ files:
314
200
  - lib/ganymed/collectors/memory.rb
315
201
  - lib/ganymed/collectors/network.rb
316
202
  - lib/ganymed/collectors/process.rb
317
- - lib/ganymed/collectors/uptime.rb
318
203
  - lib/ganymed/config.yml
319
- - lib/ganymed/console.rb
320
- - lib/ganymed/event.rb
321
- - lib/ganymed/ext/array.rb
322
204
  - lib/ganymed/master.rb
323
- - lib/ganymed/mongodb.rb
324
- - lib/ganymed/processor.rb
325
- - lib/ganymed/sampler.rb
326
- - lib/ganymed/sampler/counter.rb
327
- - lib/ganymed/sampler/datasource.rb
328
- - lib/ganymed/sampler/derive.rb
329
- - lib/ganymed/sampler/gauge.rb
330
205
  - lib/ganymed/version.rb
331
- - lib/ganymed/websocket.rb
332
- - lib/ganymed/websocket/authentication.rb
333
- - lib/ganymed/websocket/connection.rb
334
- - lib/ganymed/websocket/filter.rb
335
- - lib/ganymed/websocket/metadata.rb
336
- - lib/ganymed/websocket/query.rb
337
- - lib/ganymed/websocket/subscribe.rb
338
- - spec/sampler/counter_spec.rb
339
- - spec/sampler/datasource_examples.rb
340
- - spec/sampler/datasource_spec.rb
341
- - spec/sampler/derive_spec.rb
342
- - spec/sampler/gauge_spec.rb
343
- - spec/sampler_spec.rb
344
206
  - spec/spec.opts
345
207
  - spec/spec_helper.rb
346
208
  - tasks/reek.rake
@@ -360,7 +222,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
360
222
  version: '0'
361
223
  segments:
362
224
  - 0
363
- hash: -1351470773654091020
225
+ hash: 1424796383763485313
364
226
  required_rubygems_version: !ruby/object:Gem::Requirement
365
227
  none: false
366
228
  requirements:
@@ -369,20 +231,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
369
231
  version: '0'
370
232
  segments:
371
233
  - 0
372
- hash: -1351470773654091020
234
+ hash: 1424796383763485313
373
235
  requirements: []
374
236
  rubyforge_project:
375
237
  rubygems_version: 1.8.24
376
238
  signing_key:
377
239
  specification_version: 3
378
- summary: Ganymed is an event collection daemon
240
+ summary: Ganymed is a daemon that collects Metriks from third-party applications
379
241
  test_files:
380
- - spec/sampler/counter_spec.rb
381
- - spec/sampler/datasource_examples.rb
382
- - spec/sampler/datasource_spec.rb
383
- - spec/sampler/derive_spec.rb
384
- - spec/sampler/gauge_spec.rb
385
- - spec/sampler_spec.rb
386
242
  - spec/spec.opts
387
243
  - spec/spec_helper.rb
388
244
  has_rdoc:
data/contrib/cpuhog DELETED
Binary file
data/contrib/cpuhog.c DELETED
@@ -1,21 +0,0 @@
1
-
2
- /* do some CPU hogging */
3
-
4
-
5
- int main(int argc, char *argv[])
6
- {
7
- int i;
8
- unsigned long long v1,v2,v3;
9
-
10
- while (1) {
11
- v1 = 42;
12
- v2 = v3 = -1;
13
- for (i=0; i<1000; i++) {
14
- v1 += i;
15
- v2 = v1*i + v3;
16
- v3 = v1 ^ v2;
17
- }
18
- }
19
- return 0;
20
- }
21
-
@@ -1,10 +0,0 @@
1
- collect(900) do
2
- next if not File.readable?('/proc/stat')
3
- File.open('/proc/stat') do |file|
4
- file.each do |line|
5
- next if not line =~ /^btime /
6
- boottime = Time.at(line.chomp.split[1].to_i)
7
- processor.event("os.reboot", 1, :now => boottime)
8
- end
9
- end
10
- end