sidekiq-monitor-stats 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +5 -3
- data/Appraisals +7 -0
- data/README.md +18 -0
- data/gemfiles/sidekiq_4.gemfile +8 -0
- data/gemfiles/sidekiq_4.gemfile.lock +56 -0
- data/gemfiles/sidekiq_5.gemfile +8 -0
- data/gemfiles/sidekiq_5.gemfile.lock +56 -0
- data/lib/sidekiq/monitor/web.rb +9 -3
- data/sidekiq-monitor-stats.gemspec +2 -1
- metadata +22 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 73fd4b85bc69425e68f711dbb9a84137de8be68b
|
4
|
+
data.tar.gz: 2fcb4138c6b257b52b3eefa777bd96944e753e5a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eda4badd95add8277d122bf44681dc38283fa72ef91e9402aae8254878f8eeb2e55b766406931890f4b9e02f1ab89f1c9f907b44a5178c868f5533f4d142bcc4
|
7
|
+
data.tar.gz: 558188e16c440559cb24a9ae9d35d8cc6ea917d33997803ef4f879defa3fece2499b8f157c193d379685a451d04c9cf19995230d354ed71472f90aff7b0bfeaf
|
data/.travis.yml
CHANGED
data/Appraisals
ADDED
data/README.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
# Sidekiq Monitor Stats
|
2
2
|
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/sidekiq-monitor-stats.svg)](http://badge.fury.io/rb/sidekiq-monitor-stats)
|
3
4
|
[![Build Status](https://travis-ci.org/harvesthq/sidekiq-monitor-stats.svg)](https://travis-ci.org/harvesthq/sidekiq-monitor-stats)
|
5
|
+
[![Code Climate](https://codeclimate.com/github/harvesthq/sidekiq-monitor-stats/badges/gpa.svg)](https://codeclimate.com/github/harvesthq/sidekiq-monitor-stats)
|
4
6
|
|
5
7
|
Add an endpoint to your running application that is running Sidekiq that
|
6
8
|
returns useful data in JSON format.
|
@@ -51,19 +53,29 @@ This is an example of the output you'll get:
|
|
51
53
|
{
|
52
54
|
"hostname":"kip1.example.com",
|
53
55
|
"pid":23324,
|
56
|
+
"tag": "foo",
|
57
|
+
"started_at": "2015-04-10T13:04:22+00:00",
|
54
58
|
"queues":[
|
55
59
|
"high"
|
56
60
|
],
|
61
|
+
"labels": [
|
62
|
+
"reliable"
|
63
|
+
],
|
57
64
|
"concurrency":5,
|
58
65
|
"busy":2
|
59
66
|
},
|
60
67
|
{
|
61
68
|
"hostname":"kip2.example.com",
|
62
69
|
"pid":23390,
|
70
|
+
"tag": "foo",
|
71
|
+
"started_at": "2015-04-10T13:04:22+00:00",
|
63
72
|
"queues":[
|
64
73
|
"default",
|
65
74
|
"low"
|
66
75
|
],
|
76
|
+
"labels": [
|
77
|
+
"reliable"
|
78
|
+
],
|
67
79
|
"concurrency":5,
|
68
80
|
"busy":5
|
69
81
|
}
|
@@ -85,3 +97,9 @@ through in parallel. The `busy` is how many of those are in use.
|
|
85
97
|
If you plan on using this for your monitoring, the `latency` is a much
|
86
98
|
better metric than the `backlog`, and you can use the total `concurrency` and
|
87
99
|
total `busy` to know how much of your available workforce is in use.
|
100
|
+
|
101
|
+
## Sensu Scripts
|
102
|
+
|
103
|
+
[These sensu scripts](https://github.com/sensu-plugins/sensu-plugins-sidekiq) are designed to work with this gem to provide sane monitoring. The check script will raise warnings if the latency gets above certain threshold, and the metrics script will record useful metrics to help you figure out how your sidekiq is doing and if you need more workers.
|
104
|
+
|
105
|
+
If you're using some other monitoring tool they are good inspiration to know how this gem was intended to be used.
|
@@ -0,0 +1,56 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ..
|
3
|
+
specs:
|
4
|
+
sidekiq-monitor-stats (0.0.1)
|
5
|
+
sidekiq
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
appraisal (2.2.0)
|
11
|
+
bundler
|
12
|
+
rake
|
13
|
+
thor (>= 0.14.0)
|
14
|
+
byebug (9.0.6)
|
15
|
+
concurrent-ruby (1.0.5)
|
16
|
+
connection_pool (2.2.1)
|
17
|
+
metaclass (0.0.4)
|
18
|
+
minitest (5.10.1)
|
19
|
+
mocha (1.2.1)
|
20
|
+
metaclass (~> 0.0.1)
|
21
|
+
rack (1.6.5)
|
22
|
+
rack-protection (1.5.3)
|
23
|
+
rack
|
24
|
+
rack-test (0.6.3)
|
25
|
+
rack (>= 1.0)
|
26
|
+
rake (10.5.0)
|
27
|
+
redis (3.3.3)
|
28
|
+
sidekiq (4.2.9)
|
29
|
+
concurrent-ruby (~> 1.0)
|
30
|
+
connection_pool (~> 2.2, >= 2.2.0)
|
31
|
+
rack-protection (>= 1.5.0)
|
32
|
+
redis (~> 3.2, >= 3.2.1)
|
33
|
+
sinatra (1.4.8)
|
34
|
+
rack (~> 1.5)
|
35
|
+
rack-protection (~> 1.4)
|
36
|
+
tilt (>= 1.3, < 3)
|
37
|
+
thor (0.19.4)
|
38
|
+
tilt (2.0.7)
|
39
|
+
|
40
|
+
PLATFORMS
|
41
|
+
ruby
|
42
|
+
|
43
|
+
DEPENDENCIES
|
44
|
+
appraisal
|
45
|
+
bundler (~> 1.7)
|
46
|
+
byebug
|
47
|
+
minitest (>= 5.0.0)
|
48
|
+
mocha
|
49
|
+
rack-test
|
50
|
+
rake (~> 10.0)
|
51
|
+
sidekiq (< 5.0)
|
52
|
+
sidekiq-monitor-stats!
|
53
|
+
sinatra
|
54
|
+
|
55
|
+
BUNDLED WITH
|
56
|
+
1.14.6
|
@@ -0,0 +1,56 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ..
|
3
|
+
specs:
|
4
|
+
sidekiq-monitor-stats (0.0.1)
|
5
|
+
sidekiq
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
appraisal (2.2.0)
|
11
|
+
bundler
|
12
|
+
rake
|
13
|
+
thor (>= 0.14.0)
|
14
|
+
byebug (9.0.6)
|
15
|
+
concurrent-ruby (1.0.5)
|
16
|
+
connection_pool (2.2.1)
|
17
|
+
metaclass (0.0.4)
|
18
|
+
minitest (5.10.1)
|
19
|
+
mocha (1.2.1)
|
20
|
+
metaclass (~> 0.0.1)
|
21
|
+
rack (1.6.5)
|
22
|
+
rack-protection (1.5.3)
|
23
|
+
rack
|
24
|
+
rack-test (0.6.3)
|
25
|
+
rack (>= 1.0)
|
26
|
+
rake (10.5.0)
|
27
|
+
redis (3.3.3)
|
28
|
+
sidekiq (5.0.0)
|
29
|
+
concurrent-ruby (~> 1.0)
|
30
|
+
connection_pool (~> 2.2, >= 2.2.0)
|
31
|
+
rack-protection (>= 1.5.0)
|
32
|
+
redis (~> 3.3, >= 3.3.3)
|
33
|
+
sinatra (1.4.8)
|
34
|
+
rack (~> 1.5)
|
35
|
+
rack-protection (~> 1.4)
|
36
|
+
tilt (>= 1.3, < 3)
|
37
|
+
thor (0.19.4)
|
38
|
+
tilt (2.0.7)
|
39
|
+
|
40
|
+
PLATFORMS
|
41
|
+
ruby
|
42
|
+
|
43
|
+
DEPENDENCIES
|
44
|
+
appraisal
|
45
|
+
bundler (~> 1.7)
|
46
|
+
byebug
|
47
|
+
minitest (>= 5.0.0)
|
48
|
+
mocha
|
49
|
+
rack-test
|
50
|
+
rake (~> 10.0)
|
51
|
+
sidekiq (< 6.0)
|
52
|
+
sidekiq-monitor-stats!
|
53
|
+
sinatra
|
54
|
+
|
55
|
+
BUNDLED WITH
|
56
|
+
1.14.6
|
data/lib/sidekiq/monitor/web.rb
CHANGED
@@ -7,11 +7,17 @@ module Sidekiq
|
|
7
7
|
app.get "/monitor-stats" do
|
8
8
|
monitor_stats = Monitor::Stats.new
|
9
9
|
|
10
|
-
|
11
|
-
Sidekiq.dump_json(
|
10
|
+
data = {
|
12
11
|
queues: monitor_stats.queue_metrics,
|
13
12
|
processes: monitor_stats.process_metrics
|
14
|
-
|
13
|
+
}
|
14
|
+
|
15
|
+
if Sidekiq::VERSION >= "5.0.0"
|
16
|
+
json(data)
|
17
|
+
else
|
18
|
+
content_type :json
|
19
|
+
Sidekiq.dump_json(data)
|
20
|
+
end
|
15
21
|
end
|
16
22
|
end
|
17
23
|
end
|
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "sidekiq-monitor-stats"
|
7
|
-
spec.version = "0.0.
|
7
|
+
spec.version = "0.0.2"
|
8
8
|
spec.authors = ["Albert Llop"]
|
9
9
|
spec.email = ["albert@getharvest.com"]
|
10
10
|
spec.summary = %q{Add an endpoint to your running application that is running Sidekiq that returns useful data in JSON format.}
|
@@ -22,5 +22,6 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.add_development_dependency "sinatra"
|
23
23
|
spec.add_development_dependency "rack-test"
|
24
24
|
spec.add_development_dependency "mocha"
|
25
|
+
spec.add_development_dependency "appraisal"
|
25
26
|
spec.add_dependency "sidekiq"
|
26
27
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidekiq-monitor-stats
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Albert Llop
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-04-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -94,6 +94,20 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: appraisal
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
112
|
name: sidekiq
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -117,10 +131,15 @@ extra_rdoc_files: []
|
|
117
131
|
files:
|
118
132
|
- ".gitignore"
|
119
133
|
- ".travis.yml"
|
134
|
+
- Appraisals
|
120
135
|
- Gemfile
|
121
136
|
- LICENSE.txt
|
122
137
|
- README.md
|
123
138
|
- Rakefile
|
139
|
+
- gemfiles/sidekiq_4.gemfile
|
140
|
+
- gemfiles/sidekiq_4.gemfile.lock
|
141
|
+
- gemfiles/sidekiq_5.gemfile
|
142
|
+
- gemfiles/sidekiq_5.gemfile.lock
|
124
143
|
- lib/sidekiq/monitor/stats.rb
|
125
144
|
- lib/sidekiq/monitor/web.rb
|
126
145
|
- sidekiq-monitor-stats.gemspec
|
@@ -147,7 +166,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
147
166
|
version: '0'
|
148
167
|
requirements: []
|
149
168
|
rubyforge_project:
|
150
|
-
rubygems_version: 2.
|
169
|
+
rubygems_version: 2.6.11
|
151
170
|
signing_key:
|
152
171
|
specification_version: 4
|
153
172
|
summary: Add an endpoint to your running application that is running Sidekiq that
|