redmon 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/.travis.yml +1 -2
- data/Gemfile +20 -0
- data/README.md +13 -10
- data/bin/redmon +6 -0
- data/lib/redmon.rb +6 -2
- data/lib/redmon/config.rb +1 -0
- data/lib/redmon/version.rb +1 -1
- data/lib/redmon/views/app.haml +1 -1
- data/redmon.gemspec +2 -15
- metadata +13 -181
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
NmM3YjNjM2E4YWM5MTFlMDdjODhiY2QwM2ViNzA1M2YzNWZiYzM3Yw==
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 28f5cedae9d53022bfb9236bf61e049dc108ecf3
|
4
|
+
data.tar.gz: 842200093bf6b2068af54456d25dcc83bae309d9
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
10
|
-
NGQxNmUwMTdiMmZkMmUzMmM4MjZkMDJhY2IxMTdkYzk2ODJmOGViNDNjYmM0
|
11
|
-
ZGEyYWYwZjMxZWVmNWE5ZjMxYTdkY2JmMWYyMTExZWYxMWM1OTQ=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
NTY0MWM5OWEwNmU4NjEwYzkzNDg1N2MxMjg4OTAyZTNkNjM3MmY0MDY3OTVh
|
14
|
-
NmNlNDc0MzAyZjVmZWIxMWJmOTJlY2U1Nzk2NTg4N2RlNmE5MGFjM2U5NjQz
|
15
|
-
NzBiYjZhNjA3OTVlOGI2NDBjOGE2MGM1NzY5OTJiZTQ0MGMxYWQ=
|
6
|
+
metadata.gz: 305e647bbfacd7e4875adaf05adb9ad12487c84a19d13ac0f1fa5d850b0364d861c025e732983dd1d4668179df5f2962a58b5d61973cecc64119b5190d784e76
|
7
|
+
data.tar.gz: a7688038c9defc9941720e11d91feb737fb2eda69530bd61605430a2c77aa06f00bf73c898176bb34b59f7bc534e6cb1c550b3611e29d086a13c4eda8a153ecf
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
@@ -2,8 +2,28 @@ source "http://rubygems.org"
|
|
2
2
|
|
3
3
|
gemspec
|
4
4
|
|
5
|
+
gem "rake"
|
6
|
+
|
7
|
+
gem "sinatra", ">= 1.2.6"
|
8
|
+
gem "hiredis", "~> 0.4.0"
|
9
|
+
gem "redis", ">= 2.2.2"
|
10
|
+
gem "eventmachine"
|
11
|
+
gem "i18n"
|
12
|
+
gem "haml"
|
13
|
+
gem "rack"
|
14
|
+
gem "thin"
|
15
|
+
gem "activesupport", "~> 3.2.0"
|
16
|
+
# gem "json", "~> 1.7.7"
|
17
|
+
gem "mixlib-cli"
|
18
|
+
|
19
|
+
group :development do
|
20
|
+
gem "sinatra-contrib", "~> 1.3.1"
|
21
|
+
gem "rack-test"
|
22
|
+
end
|
23
|
+
|
5
24
|
group :test do
|
6
25
|
gem "coveralls", :require => false
|
26
|
+
gem "rspec", "~> 2.8.0"
|
7
27
|
end
|
8
28
|
|
9
29
|
platforms :ruby_18 do
|
data/README.md
CHANGED
@@ -40,22 +40,23 @@ gem install redmon
|
|
40
40
|
|
41
41
|
```bash
|
42
42
|
$ redmon -h
|
43
|
-
Usage:
|
43
|
+
Usage: bin/redmon (options)
|
44
44
|
-a, --address ADDRESS The thin bind address for the app (default: 0.0.0.0)
|
45
|
-
-
|
45
|
+
-b, --base-path BASE_PATH The base path to expose the service at (default: /)
|
46
46
|
-l, --lifespan MINUTES Lifespan(in minutes) for polled data (default: 30)
|
47
|
+
-n, --namespace NAMESPACE The root Redis namespace (default: redmon)
|
47
48
|
-i, --interval SECS Poll interval in secs for the worker (default: 10)
|
48
49
|
-p, --port PORT The thin bind port for the app (default: 4567)
|
49
|
-
-r, --redis URL The Redis url for monitor (default: redis://127.0.0.1:6379)
|
50
|
+
-r, --redis URL The Redis url for monitor (default: redis://127.0.0.1:6379, note: password is support, ie redis://:password@127.0.0.1:6379)
|
50
51
|
-s, --secure CREDENTIALS Use basic auth. Colon separated credentials, eg admin:admin.
|
51
|
-
--no-app Do not run the web app to present stats
|
52
|
-
--no-worker Do not run a worker to collect the stats
|
52
|
+
--no-app Do not run the web app to present stats (default: true)
|
53
|
+
--no-worker Do not run a worker to collect the stats (default: true)
|
53
54
|
|
54
55
|
$ redmon
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
[
|
56
|
+
Thin web server (v1.7.0 codename Dunder Mifflin)
|
57
|
+
Maximum connections set to 1024
|
58
|
+
Listening on 0.0.0.0:4567, CTRL+C to stop
|
59
|
+
[16-08-22 19:36:53] listening on http://0.0.0.0:4567
|
59
60
|
```
|
60
61
|
|
61
62
|
If you want to simulate a weak load on redis
|
@@ -109,7 +110,9 @@ class RedmonWorker
|
|
109
110
|
include Sidekiq::Worker
|
110
111
|
|
111
112
|
def perform
|
112
|
-
Redmon::Worker.new
|
113
|
+
worker = Redmon::Worker.new
|
114
|
+
worker.record_stats
|
115
|
+
worker.cleanup_old_stats
|
113
116
|
ensure
|
114
117
|
self.class.perform_in Redmon.config.poll_interval.seconds
|
115
118
|
end
|
data/bin/redmon
CHANGED
@@ -22,6 +22,12 @@ class RedmonCLI
|
|
22
22
|
:description => "The thin bind port for the app (default: 4567)",
|
23
23
|
:proc => to_i
|
24
24
|
|
25
|
+
option :base_path,
|
26
|
+
:short => '-b BASE_PATH',
|
27
|
+
:long => '--base-path BASE_PATH',
|
28
|
+
:default => '/',
|
29
|
+
:description => "The base path to expose the service at (default: /)"
|
30
|
+
|
25
31
|
option :redis_url,
|
26
32
|
:short => '-r URL',
|
27
33
|
:long => '--redis URL',
|
data/lib/redmon.rb
CHANGED
@@ -27,10 +27,14 @@ module Redmon
|
|
27
27
|
|
28
28
|
def start_app
|
29
29
|
require 'thin'
|
30
|
+
base_path = config.base_path
|
30
31
|
Thin::Server.start(*config.web_interface) do
|
31
|
-
|
32
|
+
app = Redmon::App.new
|
33
|
+
map base_path do
|
34
|
+
run app
|
35
|
+
end
|
32
36
|
end
|
33
|
-
log "listening on http
|
37
|
+
log "listening on http://#{config.web_interface.join(':')}#{base_path}"
|
34
38
|
rescue Exception => e
|
35
39
|
log "Can't start Redmon::App. port in use? Error: #{e}"
|
36
40
|
end
|
data/lib/redmon/config.rb
CHANGED
data/lib/redmon/version.rb
CHANGED
data/lib/redmon/views/app.haml
CHANGED
data/redmon.gemspec
CHANGED
@@ -18,18 +18,5 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.executables = ["redmon"]
|
19
19
|
s.require_paths = ["lib"]
|
20
20
|
|
21
|
-
s.
|
22
|
-
|
23
|
-
s.add_dependency "redis", ">= 2.2.2"
|
24
|
-
s.add_dependency "eventmachine"
|
25
|
-
s.add_dependency "i18n"
|
26
|
-
s.add_dependency "haml"
|
27
|
-
s.add_dependency "rack"
|
28
|
-
s.add_dependency "thin", "~> 1.5.1"
|
29
|
-
s.add_dependency "mixlib-cli"
|
30
|
-
|
31
|
-
s.add_development_dependency "sinatra-contrib", "~> 1.3.1"
|
32
|
-
s.add_development_dependency "rack-test"
|
33
|
-
s.add_development_dependency "rake"
|
34
|
-
s.add_development_dependency "rspec", "~> 2.8.0"
|
35
|
-
end
|
21
|
+
s.add_development_dependency 'bundler', '~> 1.3'
|
22
|
+
end
|
metadata
CHANGED
@@ -1,197 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redmon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean McDaniel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ! '>='
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: 1.2.6
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: hiredis
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ~>
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 0.4.0
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ~>
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: 0.4.0
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: redis
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ! '>='
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: 2.2.2
|
48
|
-
type: :runtime
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - ! '>='
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: 2.2.2
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: eventmachine
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - ! '>='
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
|
-
type: :runtime
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - ! '>='
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: i18n
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - ! '>='
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
76
|
-
type: :runtime
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - ! '>='
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: haml
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - ! '>='
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
90
|
-
type: :runtime
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - ! '>='
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: rack
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - ! '>='
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '0'
|
104
|
-
type: :runtime
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - ! '>='
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '0'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: thin
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - ~>
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: 1.5.1
|
118
|
-
type: :runtime
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - ~>
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: 1.5.1
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: mixlib-cli
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - ! '>='
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: '0'
|
132
|
-
type: :runtime
|
133
|
-
prerelease: false
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
135
|
-
requirements:
|
136
|
-
- - ! '>='
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
version: '0'
|
139
|
-
- !ruby/object:Gem::Dependency
|
140
|
-
name: sinatra-contrib
|
141
|
-
requirement: !ruby/object:Gem::Requirement
|
142
|
-
requirements:
|
143
|
-
- - ~>
|
144
|
-
- !ruby/object:Gem::Version
|
145
|
-
version: 1.3.1
|
146
|
-
type: :development
|
147
|
-
prerelease: false
|
148
|
-
version_requirements: !ruby/object:Gem::Requirement
|
149
|
-
requirements:
|
150
|
-
- - ~>
|
151
|
-
- !ruby/object:Gem::Version
|
152
|
-
version: 1.3.1
|
153
|
-
- !ruby/object:Gem::Dependency
|
154
|
-
name: rack-test
|
155
|
-
requirement: !ruby/object:Gem::Requirement
|
156
|
-
requirements:
|
157
|
-
- - ! '>='
|
158
|
-
- !ruby/object:Gem::Version
|
159
|
-
version: '0'
|
160
|
-
type: :development
|
161
|
-
prerelease: false
|
162
|
-
version_requirements: !ruby/object:Gem::Requirement
|
163
|
-
requirements:
|
164
|
-
- - ! '>='
|
165
|
-
- !ruby/object:Gem::Version
|
166
|
-
version: '0'
|
167
|
-
- !ruby/object:Gem::Dependency
|
168
|
-
name: rake
|
169
|
-
requirement: !ruby/object:Gem::Requirement
|
170
|
-
requirements:
|
171
|
-
- - ! '>='
|
172
|
-
- !ruby/object:Gem::Version
|
173
|
-
version: '0'
|
174
|
-
type: :development
|
175
|
-
prerelease: false
|
176
|
-
version_requirements: !ruby/object:Gem::Requirement
|
177
|
-
requirements:
|
178
|
-
- - ! '>='
|
179
|
-
- !ruby/object:Gem::Version
|
180
|
-
version: '0'
|
181
|
-
- !ruby/object:Gem::Dependency
|
182
|
-
name: rspec
|
183
|
-
requirement: !ruby/object:Gem::Requirement
|
184
|
-
requirements:
|
185
|
-
- - ~>
|
186
|
-
- !ruby/object:Gem::Version
|
187
|
-
version: 2.8.0
|
19
|
+
version: '1.3'
|
188
20
|
type: :development
|
189
21
|
prerelease: false
|
190
22
|
version_requirements: !ruby/object:Gem::Requirement
|
191
23
|
requirements:
|
192
|
-
- - ~>
|
24
|
+
- - "~>"
|
193
25
|
- !ruby/object:Gem::Version
|
194
|
-
version:
|
26
|
+
version: '1.3'
|
195
27
|
description: Redis Admin interface and monitor.
|
196
28
|
email:
|
197
29
|
- sean.mcdaniel@me.com
|
@@ -200,9 +32,9 @@ executables:
|
|
200
32
|
extensions: []
|
201
33
|
extra_rdoc_files: []
|
202
34
|
files:
|
203
|
-
- .gitignore
|
204
|
-
- .rspec
|
205
|
-
- .travis.yml
|
35
|
+
- ".gitignore"
|
36
|
+
- ".rspec"
|
37
|
+
- ".travis.yml"
|
206
38
|
- Gemfile
|
207
39
|
- README.md
|
208
40
|
- Rakefile
|
@@ -243,17 +75,17 @@ require_paths:
|
|
243
75
|
- lib
|
244
76
|
required_ruby_version: !ruby/object:Gem::Requirement
|
245
77
|
requirements:
|
246
|
-
- -
|
78
|
+
- - ">="
|
247
79
|
- !ruby/object:Gem::Version
|
248
80
|
version: '0'
|
249
81
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
250
82
|
requirements:
|
251
|
-
- -
|
83
|
+
- - ">="
|
252
84
|
- !ruby/object:Gem::Version
|
253
85
|
version: '0'
|
254
86
|
requirements: []
|
255
87
|
rubyforge_project: redmon
|
256
|
-
rubygems_version: 2.
|
88
|
+
rubygems_version: 2.5.1
|
257
89
|
signing_key:
|
258
90
|
specification_version: 4
|
259
91
|
summary: Redis monitor
|