gitlab-monitor 4.0.1 → 4.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -3
- data/README.md +19 -3
- data/config/gitlab-monitor.yml.example +1 -1
- data/gitlab-monitor.gemspec +0 -1
- data/lib/gitlab_monitor/cli.rb +1 -0
- data/lib/gitlab_monitor/sidekiq.rb +22 -0
- data/lib/gitlab_monitor/version.rb +1 -1
- metadata +1 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9199f368bd88c06bef846fd0a8b9b4b6394f147386e9f25997940aa0d50e58cf
|
4
|
+
data.tar.gz: 823b5a40f17cde2e279cb4626cf685cc495099d1555b0e408d12e7a5c2a9bfca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 01c5da7205425bd24c6f2c8855be1ae685cbd50b04bf891875ca1d4d8a613df33679a817e17572506207aac62f4c0095a416d8d30ff0260d078dea570e081851
|
7
|
+
data.tar.gz: cb8e628f1f530c034741b17ebeee1987fc3f19f6b2393b914340a8802aa989326085281addec3fd2b71a14375d732bd60bcc579e4672952506bcb0b3691bc145
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
gitlab-monitor (4.0
|
4
|
+
gitlab-monitor (4.1.0)
|
5
5
|
connection_pool (~> 2.2.1)
|
6
6
|
pg (~> 1.1)
|
7
7
|
quantile (~> 0.2.0)
|
@@ -26,7 +26,6 @@ GEM
|
|
26
26
|
rack-protection (2.0.5)
|
27
27
|
rack
|
28
28
|
rainbow (2.1.0)
|
29
|
-
rake (12.3.2)
|
30
29
|
redis (3.3.5)
|
31
30
|
redis-namespace (1.6.0)
|
32
31
|
redis (>= 3.0.4)
|
@@ -68,7 +67,6 @@ PLATFORMS
|
|
68
67
|
|
69
68
|
DEPENDENCIES
|
70
69
|
gitlab-monitor!
|
71
|
-
rake
|
72
70
|
rspec (~> 3.5)
|
73
71
|
rspec-expectations (~> 3.7.0)
|
74
72
|
rubocop (~> 0.42)
|
data/README.md
CHANGED
@@ -50,9 +50,25 @@ metrics.
|
|
50
50
|
* `process_smaps_private_dirty_bytes`
|
51
51
|
* `process_smaps_swap_bytes`
|
52
52
|
* `process_smaps_pss_bytes`
|
53
|
-
1. [Sidekiq](lib/gitlab_monitor/sidekiq.rb)
|
54
|
-
|
55
|
-
|
53
|
+
1. [Sidekiq](lib/gitlab_monitor/sidekiq.rb)
|
54
|
+
* Stats
|
55
|
+
* `sidekiq_jobs_processed_total`
|
56
|
+
* `sidekiq_jobs_failed_total`
|
57
|
+
* `sidekiq_jobs_enqueued_size`
|
58
|
+
* `sidekiq_jobs_scheduled_size`
|
59
|
+
* `sidekiq_jobs_retry_size`
|
60
|
+
* `sidekiq_jobs_dead_size`
|
61
|
+
* `sidekiq_default_queue_latency_seconds`
|
62
|
+
* `sidekiq_processes_size`
|
63
|
+
* `sidekiq_workers_size`
|
64
|
+
* Queues
|
65
|
+
* `sidekiq_queue_size`
|
66
|
+
* `sidekiq_queue_paused`
|
67
|
+
* `sidekiq_queue_latency_seconds`
|
68
|
+
* Jobs
|
69
|
+
* `sidekiq_enqueued_jobs`
|
70
|
+
* `sidekiq_running_jobs`
|
71
|
+
* `sidekiq_to_be_retried_jobs`
|
56
72
|
|
57
73
|
### Setup with GitLab Development Kit
|
58
74
|
|
data/gitlab-monitor.gemspec
CHANGED
@@ -28,7 +28,6 @@ Gem::Specification.new do |s|
|
|
28
28
|
s.add_runtime_dependency "redis-namespace", "~> 1.6.0"
|
29
29
|
s.add_runtime_dependency "connection_pool", "~> 2.2.1"
|
30
30
|
|
31
|
-
s.add_development_dependency "rake"
|
32
31
|
s.add_development_dependency "rspec", "~> 3.7.0"
|
33
32
|
s.add_development_dependency "rspec-expectations", "~> 3.7.0"
|
34
33
|
end
|
data/lib/gitlab_monitor/cli.rb
CHANGED
@@ -21,6 +21,25 @@ module GitLab
|
|
21
21
|
ensure_queue_job_stats_script_loaded
|
22
22
|
end
|
23
23
|
|
24
|
+
def probe_stats
|
25
|
+
return self unless connected?
|
26
|
+
|
27
|
+
stats = Sidekiq::Stats.new
|
28
|
+
|
29
|
+
@metrics.add("sidekiq_jobs_processed_total", stats.processed)
|
30
|
+
@metrics.add("sidekiq_jobs_failed_total", stats.failed)
|
31
|
+
@metrics.add("sidekiq_jobs_enqueued_size", stats.enqueued)
|
32
|
+
@metrics.add("sidekiq_jobs_scheduled_size", stats.scheduled_size)
|
33
|
+
@metrics.add("sidekiq_jobs_retry_size", stats.retry_size)
|
34
|
+
@metrics.add("sidekiq_jobs_dead_size", stats.dead_size)
|
35
|
+
|
36
|
+
@metrics.add("sidekiq_default_queue_latency_seconds", stats.default_queue_latency)
|
37
|
+
@metrics.add("sidekiq_processes_size", stats.processes_size)
|
38
|
+
@metrics.add("sidekiq_workers_size", stats.workers_size)
|
39
|
+
|
40
|
+
self
|
41
|
+
end
|
42
|
+
|
24
43
|
def probe_queues
|
25
44
|
return self unless connected?
|
26
45
|
|
@@ -92,6 +111,9 @@ module GitLab
|
|
92
111
|
end
|
93
112
|
|
94
113
|
def probe_dead
|
114
|
+
puts "[DEPRECATED] probe_dead is now considered obsolete and will be removed in future major versions,"\
|
115
|
+
" please use probe_stats instead"
|
116
|
+
|
95
117
|
return self unless connected?
|
96
118
|
|
97
119
|
@metrics.add("sidekiq_dead_jobs", Sidekiq::Stats.new.dead_size)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitlab-monitor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0
|
4
|
+
version: 4.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pablo Carranza
|
@@ -108,20 +108,6 @@ dependencies:
|
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: 2.2.1
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: rake
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - ">="
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: '0'
|
118
|
-
type: :development
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - ">="
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: '0'
|
125
111
|
- !ruby/object:Gem::Dependency
|
126
112
|
name: rspec
|
127
113
|
requirement: !ruby/object:Gem::Requirement
|