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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 79da741bdcf83d7f3426383e1aca2bcff38dd0202655773009612c5b5aec3966
4
- data.tar.gz: 1b9d0b3dc70b94faa36a8107511d6a5f6b79631beaf0b32671fc1219c3944bd6
3
+ metadata.gz: 9199f368bd88c06bef846fd0a8b9b4b6394f147386e9f25997940aa0d50e58cf
4
+ data.tar.gz: 823b5a40f17cde2e279cb4626cf685cc495099d1555b0e408d12e7a5c2a9bfca
5
5
  SHA512:
6
- metadata.gz: 34395edd323c27073a4c362d2d80d36d6091f7082dd8f1ca0334b8a772fbaf4cbebf486887458d9692f578c9a1707a6ef0575f9a9e0278c1b85678122c656e2d
7
- data.tar.gz: e3c8ea0c957488c478c4d9fdba65448b805bc0a1bf549527660f6167a22655c5cf73c04c25c7a24db92eaf0acec9d03abb707b1e289e9baee6900103bb99df7e
6
+ metadata.gz: 01c5da7205425bd24c6f2c8855be1ae685cbd50b04bf891875ca1d4d8a613df33679a817e17572506207aac62f4c0095a416d8d30ff0260d078dea570e081851
7
+ data.tar.gz: cb8e628f1f530c034741b17ebeee1987fc3f19f6b2393b914340a8802aa989326085281addec3fd2b71a14375d732bd60bcc579e4672952506bcb0b3691bc145
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gitlab-monitor (4.0.1)
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) -- `sidekiq_queue_size`, `sidekiq_queue_paused`,
54
- `sidekiq_queue_latency_seconds`, `sidekiq_enqueued_jobs`, `sidekiq_dead_jobs`,
55
- `sidekiq_running_jobs`, `sidekiq_to_be_retried_jobs`
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
 
@@ -83,11 +83,11 @@ probes:
83
83
 
84
84
  sidekiq: &sidekiq
85
85
  methods:
86
+ - probe_stats
86
87
  - probe_queues
87
88
  - probe_jobs
88
89
  - probe_workers
89
90
  - probe_retries
90
- - probe_dead
91
91
  opts:
92
92
  redis_url: "redis://localhost:6379"
93
93
  redis_enable_client: true
@@ -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
@@ -274,6 +274,7 @@ module GitLab
274
274
  validate!
275
275
 
276
276
  ::GitLab::Monitor::SidekiqProber.new(redis_url: @redis_url)
277
+ .probe_stats
277
278
  .probe_queues
278
279
  .probe_jobs
279
280
  .probe_workers
@@ -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)
@@ -1,5 +1,5 @@
1
1
  module GitLab
2
2
  module Monitor
3
- VERSION = "4.0.1".freeze
3
+ VERSION = "4.1.0".freeze
4
4
  end
5
5
  end
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.1
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