ganymed 0.3.4 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -2
- data/README.md +6 -14
- data/ganymed.gemspec +4 -17
- data/lib/ganymed/collector.rb +6 -30
- data/lib/ganymed/collectors/cpu.rb +8 -8
- data/lib/ganymed/collectors/disk.rb +2 -2
- data/lib/ganymed/collectors/iostat.rb +2 -2
- data/lib/ganymed/collectors/load.rb +1 -1
- data/lib/ganymed/collectors/memory.rb +8 -8
- data/lib/ganymed/collectors/network.rb +6 -6
- data/lib/ganymed/collectors/process.rb +4 -4
- data/lib/ganymed/config.yml +0 -32
- data/lib/ganymed/master.rb +9 -8
- data/lib/ganymed/version.rb +1 -1
- metadata +8 -152
- data/contrib/cpuhog +0 -0
- data/contrib/cpuhog.c +0 -21
- data/lib/ganymed/collectors/uptime.rb +0 -10
- data/lib/ganymed/console.rb +0 -147
- data/lib/ganymed/event.rb +0 -97
- data/lib/ganymed/ext/array.rb +0 -38
- data/lib/ganymed/mongodb.rb +0 -44
- data/lib/ganymed/processor.rb +0 -137
- data/lib/ganymed/sampler/counter.rb +0 -19
- data/lib/ganymed/sampler/datasource.rb +0 -85
- data/lib/ganymed/sampler/derive.rb +0 -27
- data/lib/ganymed/sampler/gauge.rb +0 -20
- data/lib/ganymed/sampler.rb +0 -94
- data/lib/ganymed/websocket/authentication.rb +0 -37
- data/lib/ganymed/websocket/connection.rb +0 -71
- data/lib/ganymed/websocket/filter.rb +0 -23
- data/lib/ganymed/websocket/metadata.rb +0 -21
- data/lib/ganymed/websocket/query.rb +0 -30
- data/lib/ganymed/websocket/subscribe.rb +0 -45
- data/lib/ganymed/websocket.rb +0 -45
- data/spec/sampler/counter_spec.rb +0 -11
- data/spec/sampler/datasource_examples.rb +0 -49
- data/spec/sampler/datasource_spec.rb +0 -23
- data/spec/sampler/derive_spec.rb +0 -34
- data/spec/sampler/gauge_spec.rb +0 -35
- data/spec/sampler_spec.rb +0 -5
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,20 +1,12 @@
|
|
1
1
|
# Ganymed
|
2
2
|
|
3
|
-
Ganymed is
|
3
|
+
Ganymed is a daemon that collects Metriks from third-party applications.
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
to
|
8
|
-
|
9
|
-
|
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
|
12
|
-
s.description = %q{Ganymed is
|
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
|
data/lib/ganymed/collector.rb
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
require 'eventmachine'
|
2
|
-
|
3
2
|
require 'ganymed'
|
4
|
-
require '
|
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 {
|
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
|
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
|
-
|
120
|
-
|
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 |
|
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
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
15
|
-
|
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
|
@@ -14,28 +14,28 @@ collect do
|
|
14
14
|
when "MemTotal"
|
15
15
|
apps = value
|
16
16
|
when "MemFree"
|
17
|
-
|
17
|
+
Metriks.histogram("os.mem.unused").update(value)
|
18
18
|
apps -= value
|
19
19
|
when "Buffers"
|
20
|
-
|
20
|
+
Metriks.histogram("os.mem.buffers").update(value)
|
21
21
|
apps -= value
|
22
22
|
when "Cached"
|
23
|
-
|
23
|
+
Metriks.histogram("os.mem.cache").update(value)
|
24
24
|
apps -= value
|
25
25
|
when "SwapCached"
|
26
|
-
|
26
|
+
Metriks.histogram("os.mem.swap_cache").update(value)
|
27
27
|
apps -= value
|
28
28
|
when "Slab"
|
29
|
-
|
29
|
+
Metriks.histogram("os.mem.slab_cache").update(value)
|
30
30
|
apps -= value
|
31
31
|
when "PageTables"
|
32
|
-
|
32
|
+
Metriks.histogram("os.mem.page_tables").update(value)
|
33
33
|
apps -= value
|
34
34
|
when "Mapped"
|
35
|
-
|
35
|
+
Metriks.histogram("os.mem.mapped").update(value)
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
39
|
-
|
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
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
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
|
-
|
8
|
+
Metriks.derive("os.procs.switch").mark(value.to_i)
|
9
9
|
when "processes"
|
10
|
-
|
10
|
+
Metriks.derive("os.procs.forks").mark(value.to_i)
|
11
11
|
when "procs_running"
|
12
|
-
|
12
|
+
Metriks.histogram("os.procs.running").update(value.to_i)
|
13
13
|
when "procs_blocked"
|
14
|
-
|
14
|
+
Metriks.histogram("os.procs.blocked").update(value.to_i)
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
data/lib/ganymed/config.yml
CHANGED
@@ -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:
|
data/lib/ganymed/master.rb
CHANGED
@@ -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
|
data/lib/ganymed/version.rb
CHANGED
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.
|
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-
|
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:
|
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:
|
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
|
-
-
|
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:
|
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:
|
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
|
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
|