custodian 0.0.1
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/.gitignore +4 -0
- data/Gemfile +4 -0
- data/README.md +23 -0
- data/Rakefile +1 -0
- data/custodian.gemspec +24 -0
- data/lib/custodian/version.rb +3 -0
- data/lib/custodian.rb +5 -0
- metadata +52 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# Custodian
|
2
|
+
|
3
|
+
Custodian is a lightweight resource monitor that is easy to use and augment.
|
4
|
+
|
5
|
+
## Usage
|
6
|
+
|
7
|
+
Start Custodian and configure it to sample metrics every 60 seconds and expose
|
8
|
+
them on port 5100:
|
9
|
+
|
10
|
+
$ custodian start 127.0.0.1:5100 --interval=60
|
11
|
+
|
12
|
+
## Augmenting Custodian
|
13
|
+
|
14
|
+
Custodian convenes statistics from *samplers*, which are just simple Ruby classes:
|
15
|
+
|
16
|
+
class Who << Custodian::Sampler
|
17
|
+
|
18
|
+
# Return a list of usernames describing logged-in users.
|
19
|
+
def sample
|
20
|
+
`who`.lines.collect { |line| line.split.first }
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/custodian.gemspec
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "custodian/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "custodian"
|
7
|
+
s.version = Custodian::VERSION
|
8
|
+
s.authors = ["Johannes Gorset"]
|
9
|
+
s.email = ["jgorset@gmail.com"]
|
10
|
+
s.homepage = "http://github.com/jgorset/custodian"
|
11
|
+
s.summary = "Lightweight resource monitor"
|
12
|
+
s.description = "Custodian is a lightweight resource monitor that is easy to use and augment"
|
13
|
+
|
14
|
+
s.rubyforge_project = "custodian"
|
15
|
+
|
16
|
+
s.files = `git ls-files`.split("\n")
|
17
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
18
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
19
|
+
s.require_paths = ["lib"]
|
20
|
+
|
21
|
+
# specify any dependencies here; for example:
|
22
|
+
# s.add_development_dependency "rspec"
|
23
|
+
# s.add_runtime_dependency "rest-client"
|
24
|
+
end
|
data/lib/custodian.rb
ADDED
metadata
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: custodian
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Johannes Gorset
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-01-24 00:00:00.000000000 Z
|
13
|
+
dependencies: []
|
14
|
+
description: Custodian is a lightweight resource monitor that is easy to use and augment
|
15
|
+
email:
|
16
|
+
- jgorset@gmail.com
|
17
|
+
executables: []
|
18
|
+
extensions: []
|
19
|
+
extra_rdoc_files: []
|
20
|
+
files:
|
21
|
+
- .gitignore
|
22
|
+
- Gemfile
|
23
|
+
- README.md
|
24
|
+
- Rakefile
|
25
|
+
- custodian.gemspec
|
26
|
+
- lib/custodian.rb
|
27
|
+
- lib/custodian/version.rb
|
28
|
+
homepage: http://github.com/jgorset/custodian
|
29
|
+
licenses: []
|
30
|
+
post_install_message:
|
31
|
+
rdoc_options: []
|
32
|
+
require_paths:
|
33
|
+
- lib
|
34
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
35
|
+
none: false
|
36
|
+
requirements:
|
37
|
+
- - ! '>='
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0'
|
40
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
requirements: []
|
47
|
+
rubyforge_project: custodian
|
48
|
+
rubygems_version: 1.8.11
|
49
|
+
signing_key:
|
50
|
+
specification_version: 3
|
51
|
+
summary: Lightweight resource monitor
|
52
|
+
test_files: []
|