sidekiq-prometheus-exporter 0.1.9 → 0.1.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +5 -5
  2. data/.github/FUNDING.yml +12 -0
  3. data/.gitignore +3 -1
  4. data/.rubocop.yml +28 -28
  5. data/.travis.yml +76 -14
  6. data/Appraisals +17 -4
  7. data/README.md +121 -28
  8. data/Rakefile +73 -0
  9. data/docker/Dockerfile +24 -0
  10. data/docker/README.md +55 -0
  11. data/docker/config.ru +38 -0
  12. data/examples/docker-compose.yml +2 -2
  13. data/examples/screenshot.png +0 -0
  14. data/examples/{sidekiq.json → sidekiq-dashboard.grafana-6.json} +10 -52
  15. data/examples/sidekiq-dashboard.grafana-7.json +845 -0
  16. data/gemfiles/sidekiq_3.3.1.gemfile +2 -1
  17. data/gemfiles/sidekiq_3.3.1.gemfile.lock +49 -48
  18. data/gemfiles/sidekiq_3.x.gemfile +2 -1
  19. data/gemfiles/sidekiq_3.x.gemfile.lock +47 -46
  20. data/gemfiles/sidekiq_4.x.gemfile +1 -1
  21. data/gemfiles/sidekiq_4.x.gemfile.lock +38 -38
  22. data/gemfiles/sidekiq_5.x.gemfile +1 -1
  23. data/gemfiles/sidekiq_5.x.gemfile.lock +40 -39
  24. data/gemfiles/sidekiq_6.x.gemfile +8 -0
  25. data/gemfiles/sidekiq_6.x.gemfile.lock +100 -0
  26. data/gemfiles/sidekiq_head.gemfile +9 -0
  27. data/gemfiles/sidekiq_head.gemfile.lock +116 -0
  28. data/helm/sidekiq-prometheus-exporter/.helmignore +22 -0
  29. data/helm/sidekiq-prometheus-exporter/Chart.yaml +6 -0
  30. data/helm/sidekiq-prometheus-exporter/README.md +87 -0
  31. data/helm/sidekiq-prometheus-exporter/templates/NOTES.txt +15 -0
  32. data/helm/sidekiq-prometheus-exporter/templates/_helpers.tpl +109 -0
  33. data/helm/sidekiq-prometheus-exporter/templates/clusterrole.yaml +20 -0
  34. data/helm/sidekiq-prometheus-exporter/templates/clusterrolebinding.yaml +17 -0
  35. data/helm/sidekiq-prometheus-exporter/templates/deployment.yaml +62 -0
  36. data/helm/sidekiq-prometheus-exporter/templates/service.yaml +17 -0
  37. data/helm/sidekiq-prometheus-exporter/templates/serviceaccount.yaml +9 -0
  38. data/helm/sidekiq-prometheus-exporter/templates/servicemonitor.yaml +26 -0
  39. data/helm/sidekiq-prometheus-exporter/values.yaml +133 -0
  40. data/lib/sidekiq/prometheus/exporter.rb +12 -1
  41. data/lib/sidekiq/prometheus/exporter/exporters.rb +5 -1
  42. data/lib/sidekiq/prometheus/exporter/scheduler.rb +48 -0
  43. data/lib/sidekiq/prometheus/exporter/standard.rb +1 -1
  44. data/lib/sidekiq/prometheus/exporter/templates/scheduler.erb +12 -0
  45. data/lib/sidekiq/prometheus/exporter/templates/standard.erb +5 -5
  46. data/lib/sidekiq/prometheus/exporter/version.rb +1 -1
  47. data/sidekiq-prometheus-exporter.gemspec +4 -4
  48. metadata +38 -16
data/Rakefile CHANGED
@@ -4,3 +4,76 @@ require 'rspec/core/rake_task'
4
4
  RSpec::Core::RakeTask.new(:spec)
5
5
 
6
6
  task default: :spec
7
+
8
+ # ==============================================================================
9
+
10
+ require 'English'
11
+ require 'fileutils'
12
+ require_relative 'lib/sidekiq/prometheus/exporter/version'
13
+
14
+ def execute(command)
15
+ output = `#{command}`
16
+
17
+ unless $CHILD_STATUS.success?
18
+ warn output
19
+ exit 1
20
+ end
21
+
22
+ output
23
+ end
24
+
25
+ namespace :docker do
26
+ task :release do
27
+ Rake::Task['docker:build'].invoke
28
+ Rake::Task['docker:push'].invoke
29
+ end
30
+
31
+ task :build do
32
+ image = 'strech/sidekiq-prometheus-exporter'
33
+
34
+ Dir.chdir(File.expand_path('./docker')) do
35
+ execute("docker build -t #{image}:#{Sidekiq::Prometheus::Exporter::VERSION} -t #{image}:latest .")
36
+ end
37
+
38
+ puts "Successfully built strech/sidekiq-prometheus-exporter and tagged #{Sidekiq::Prometheus::Exporter::VERSION}, latest"
39
+ end
40
+
41
+ task :push do
42
+ image = 'strech/sidekiq-prometheus-exporter'
43
+
44
+ execute("docker push #{image}:#{Sidekiq::Prometheus::Exporter::VERSION}")
45
+ execute("docker push #{image}:latest")
46
+
47
+ puts "Successfully pushed strech/sidekiq-prometheus-exporter #{Sidekiq::Prometheus::Exporter::VERSION}, latest"
48
+ end
49
+ end
50
+
51
+ namespace :helm do
52
+ desc 'Generate new Helm repo index'
53
+ task :generate do
54
+ archive_dir = File.expand_path("./tmp/archive-#{Time.now.to_i}")
55
+
56
+ Rake::Task['helm:package'].invoke(archive_dir)
57
+ Rake::Task['helm:index'].invoke(archive_dir)
58
+
59
+ puts "New index generated: #{File.join(archive_dir, 'index.yaml')}"
60
+ end
61
+
62
+ task :package, [:directory] do |_, args|
63
+ chart_dir = File.expand_path('./helm/sidekiq-prometheus-exporter')
64
+ archive_dir = args.fetch(:directory) { File.expand_path("./tmp/archive-#{Time.now.to_i}") }
65
+
66
+ FileUtils.mkdir_p(archive_dir)
67
+
68
+ execute("helm package #{chart_dir} -d #{archive_dir}")
69
+ end
70
+
71
+ task :index, [:directory] do |_, args|
72
+ Dir.chdir(args.fetch(:directory)) do
73
+ url = "https://github.com/Strech/sidekiq-prometheus-exporter/releases/download/v#{Sidekiq::Prometheus::Exporter::VERSION}"
74
+
75
+ execute('git show gh-pages:index.yaml > existing-index.yaml')
76
+ execute("helm repo index . --url #{url} --merge existing-index.yaml")
77
+ end
78
+ end
79
+ end
data/docker/Dockerfile ADDED
@@ -0,0 +1,24 @@
1
+ FROM ruby:2.7.1-alpine
2
+
3
+ LABEL maintainer="Sergey Fedorov <oni.strech@gmail.com>"
4
+ LABEL repository="strech/sidekiq-prometheus-exporter"
5
+
6
+ ENV RACK_VERSION 2.0.9
7
+ ENV SIDEKIQ_VERSION 5.2.8
8
+ ENV REDIS_NAMESPACE_VERSION 1.7.0
9
+ ENV SIDEKIQ_PROMETHEUS_EXPORTER_VERSION 0.1.13
10
+
11
+ RUN addgroup -S exporter \
12
+ && adduser -s /bin/false -SDHg exporter exporter \
13
+ && gem install "rack:$RACK_VERSION" \
14
+ && gem install "sidekiq:$SIDEKIQ_VERSION" \
15
+ && gem install "redis-namespace:$REDIS_NAMESPACE_VERSION" \
16
+ && gem install "sidekiq-prometheus-exporter:$SIDEKIQ_PROMETHEUS_EXPORTER_VERSION"
17
+
18
+ USER exporter
19
+ WORKDIR /app
20
+ COPY config.ru config.ru
21
+
22
+ EXPOSE 9292
23
+ ENTRYPOINT [ "rackup" ]
24
+ CMD [ "-p", "9292", "-o", "0.0.0.0", "config.ru" ]
data/docker/README.md ADDED
@@ -0,0 +1,55 @@
1
+ # Official Docker image
2
+
3
+ This is an official Docker image for [sidekiq-prometheus-exporter](https://github.com/Strech/sidekiq-prometheus-exporter)
4
+ gem.
5
+
6
+ It combines some approaches which were already published as images by other
7
+ devs and at the same time brings more flexibility for the stock configuration
8
+ and applies recommended Docker best practices.
9
+
10
+ :warning: The Docker image currently supports **only** standards metrics.
11
+
12
+ ## Supported ENVs
13
+
14
+ Required
15
+
16
+ - `REDIS_URL` - [RFC 3986 generic URI][rfc3986], exclusive with `REDIS_HOST`
17
+ - `REDIS_HOST` - a Redis host, exclusive with `REDIS_URL` (default: `localhost`)
18
+
19
+ Optional
20
+
21
+ - `REDIS_PORT` - a Redis port (default: `6379`)
22
+ - `REDIS_PASSWORD` - a Redis password (if you need one)
23
+ - `REDIS_DB_NUMBER` - a Redis database number (default: `0`)
24
+ - `REDIS_NAMESPACE` - a Redis [namespace][namespace] name (if you have separated sidekiq)
25
+ - `REDIS_SENTINELS` - a list of comma separated Redis urls (like `REDIS_URL`, but for sentinels)
26
+ - `REDIS_SENTINEL_ROLE` - a role within the [sentinel][sentinel] to connect (default: `master`)
27
+
28
+ :bulb: Note, that `REDIS_URL` and `REDIS_HOST` are exclusive. Since `REDIS_HOST` is more
29
+ atomic value it will be checked after `REDIS_URL`.
30
+
31
+ :bulb: `REDIS_SENTINELS` will be parsed with `URI`, because of that it's
32
+ mandatory for them to be formatted with protocol `redis://...`.
33
+
34
+ ## Examples
35
+
36
+ If you don't have a running Redis instance, you can quickly spin an empty to
37
+ practice.
38
+
39
+ ```bash
40
+ $ docker run -d --rm --name redis-instance redis
41
+ ```
42
+
43
+ and then run an exporter
44
+
45
+ ```bash
46
+ $ docker run -it --rm \
47
+ --link redis-instance \
48
+ -p 9292:9292 \
49
+ -e REDIS_URL=redis://redis-instance \
50
+ strech/sidekiq-prometheus-exporter
51
+ ```
52
+
53
+ [rfc3986]: https://www.iana.org/assignments/uri-schemes/prov/redis
54
+ [namespace]: https://github.com/resque/redis-namespace
55
+ [sentinel]: https://github.com/redis/redis-rb/tree/v4.1.3#sentinel-support
data/docker/config.ru ADDED
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'sidekiq'
4
+ require 'sidekiq/prometheus/exporter'
5
+
6
+ config = {}
7
+ config[:url] = ENV['REDIS_URL'] if ENV.key?('REDIS_URL')
8
+
9
+ unless config.key?(:url)
10
+ host = ENV.fetch('REDIS_HOST', 'localhost')
11
+ port = ENV.fetch('REDIS_PORT', 6379)
12
+ db_number = ENV.fetch('REDIS_DB_NUMBER', 0)
13
+ password = ":#{ENV['REDIS_PASSWORD']}" if ENV.key?('REDIS_PASSWORD')
14
+
15
+ config[:url] = "redis://#{password}@#{host}:#{port}/#{db_number}"
16
+ end
17
+
18
+ if ENV.key?('REDIS_NAMESPACE')
19
+ require 'redis-namespace'
20
+
21
+ config[:namespace] = ENV['REDIS_NAMESPACE']
22
+ end
23
+
24
+ if ENV.key?('REDIS_SENTINELS')
25
+ require 'uri'
26
+
27
+ config[:role] = ENV.fetch('REDIS_SENTINEL_ROLE', :master).to_sym
28
+ config[:sentinels] = ENV['REDIS_SENTINELS'].split(',').map do |url|
29
+ uri = URI.parse(url.strip)
30
+ cfg = {host: uri.host || 'localhost', port: uri.port || 26379} # rubocop:disable Style/NumericLiterals
31
+ cfg[:password] = ":#{uri.password}" if uri.password
32
+ cfg
33
+ end
34
+ end
35
+
36
+ Sidekiq.configure_client { |client| client.redis = config }
37
+
38
+ run Sidekiq::Prometheus::Exporter.to_app
@@ -1,5 +1,5 @@
1
1
  ---
2
- version: '3.4'
2
+ version: "3.4"
3
3
 
4
4
  services:
5
5
  metrics:
@@ -31,7 +31,7 @@ services:
31
31
  - metrics
32
32
 
33
33
  grafana:
34
- image: grafana/grafana
34
+ image: grafana/grafana:7.1.1
35
35
  volumes:
36
36
  - grafana-data:/var/lib/grafana
37
37
  ports:
Binary file
@@ -22,11 +22,7 @@
22
22
  "cacheTimeout": null,
23
23
  "colorBackground": false,
24
24
  "colorValue": false,
25
- "colors": [
26
- "#299c46",
27
- "rgba(237, 129, 40, 0.89)",
28
- "#d44a3a"
29
- ],
25
+ "colors": ["#299c46", "rgba(237, 129, 40, 0.89)", "#d44a3a"],
30
26
  "datasource": null,
31
27
  "format": "none",
32
28
  "gauge": {
@@ -102,11 +98,7 @@
102
98
  "cacheTimeout": null,
103
99
  "colorBackground": false,
104
100
  "colorValue": false,
105
- "colors": [
106
- "#d44a3a",
107
- "rgba(237, 129, 40, 0.89)",
108
- "#299c46"
109
- ],
101
+ "colors": ["#d44a3a", "rgba(237, 129, 40, 0.89)", "#299c46"],
110
102
  "datasource": null,
111
103
  "format": "none",
112
104
  "gauge": {
@@ -182,11 +174,7 @@
182
174
  "cacheTimeout": null,
183
175
  "colorBackground": false,
184
176
  "colorValue": true,
185
- "colors": [
186
- "#299c46",
187
- "rgba(237, 129, 40, 0.89)",
188
- "#d44a3a"
189
- ],
177
+ "colors": ["#299c46", "rgba(237, 129, 40, 0.89)", "#d44a3a"],
190
178
  "datasource": null,
191
179
  "format": "none",
192
180
  "gauge": {
@@ -262,11 +250,7 @@
262
250
  "cacheTimeout": null,
263
251
  "colorBackground": false,
264
252
  "colorValue": true,
265
- "colors": [
266
- "#299c46",
267
- "rgba(237, 129, 40, 0.89)",
268
- "#d44a3a"
269
- ],
253
+ "colors": ["#299c46", "rgba(237, 129, 40, 0.89)", "#d44a3a"],
270
254
  "datasource": null,
271
255
  "format": "none",
272
256
  "gauge": {
@@ -342,11 +326,7 @@
342
326
  "cacheTimeout": null,
343
327
  "colorBackground": false,
344
328
  "colorValue": true,
345
- "colors": [
346
- "#299c46",
347
- "rgba(237, 129, 40, 0.89)",
348
- "#d44a3a"
349
- ],
329
+ "colors": ["#299c46", "rgba(237, 129, 40, 0.89)", "#d44a3a"],
350
330
  "datasource": null,
351
331
  "format": "none",
352
332
  "gauge": {
@@ -422,11 +402,7 @@
422
402
  "cacheTimeout": null,
423
403
  "colorBackground": false,
424
404
  "colorValue": false,
425
- "colors": [
426
- "#299c46",
427
- "rgba(237, 129, 40, 0.89)",
428
- "#d44a3a"
429
- ],
405
+ "colors": ["#299c46", "rgba(237, 129, 40, 0.89)", "#d44a3a"],
430
406
  "datasource": null,
431
407
  "format": "none",
432
408
  "gauge": {
@@ -502,11 +478,7 @@
502
478
  "cacheTimeout": null,
503
479
  "colorBackground": false,
504
480
  "colorValue": false,
505
- "colors": [
506
- "#299c46",
507
- "rgba(237, 129, 40, 0.89)",
508
- "#d44a3a"
509
- ],
481
+ "colors": ["#299c46", "rgba(237, 129, 40, 0.89)", "#d44a3a"],
510
482
  "datasource": null,
511
483
  "format": "none",
512
484
  "gauge": {
@@ -582,11 +554,7 @@
582
554
  "cacheTimeout": null,
583
555
  "colorBackground": false,
584
556
  "colorValue": false,
585
- "colors": [
586
- "#299c46",
587
- "rgba(237, 129, 40, 0.89)",
588
- "#d44a3a"
589
- ],
557
+ "colors": ["#299c46", "rgba(237, 129, 40, 0.89)", "#d44a3a"],
590
558
  "datasource": null,
591
559
  "format": "none",
592
560
  "gauge": {
@@ -860,20 +828,10 @@
860
828
  "2h",
861
829
  "1d"
862
830
  ],
863
- "time_options": [
864
- "5m",
865
- "15m",
866
- "1h",
867
- "6h",
868
- "12h",
869
- "24h",
870
- "2d",
871
- "7d",
872
- "30d"
873
- ]
831
+ "time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"]
874
832
  },
875
833
  "timezone": "",
876
- "title": "Sidekiq",
834
+ "title": "Sidekiq Dashboard",
877
835
  "uid": "SwCwV7qkz",
878
836
  "version": 2
879
837
  }
@@ -0,0 +1,845 @@
1
+ {
2
+ "annotations": {
3
+ "list": [
4
+ {
5
+ "builtIn": 1,
6
+ "datasource": "-- Grafana --",
7
+ "enable": true,
8
+ "hide": true,
9
+ "iconColor": "rgba(0, 211, 255, 1)",
10
+ "name": "Annotations & Alerts",
11
+ "type": "dashboard"
12
+ }
13
+ ]
14
+ },
15
+ "editable": true,
16
+ "gnetId": null,
17
+ "graphTooltip": 0,
18
+ "id": 34,
19
+ "links": [],
20
+ "panels": [
21
+ {
22
+ "cacheTimeout": null,
23
+ "datasource": null,
24
+ "fieldConfig": {
25
+ "defaults": {
26
+ "custom": {},
27
+ "mappings": [
28
+ {
29
+ "id": 0,
30
+ "op": "=",
31
+ "text": "N/A",
32
+ "type": 1,
33
+ "value": "null"
34
+ }
35
+ ],
36
+ "nullValueMode": "connected",
37
+ "thresholds": {
38
+ "mode": "absolute",
39
+ "steps": [
40
+ {
41
+ "color": "green",
42
+ "value": null
43
+ },
44
+ {
45
+ "color": "red",
46
+ "value": 80
47
+ }
48
+ ]
49
+ },
50
+ "unit": "none"
51
+ },
52
+ "overrides": []
53
+ },
54
+ "gridPos": {
55
+ "h": 4,
56
+ "w": 3,
57
+ "x": 0,
58
+ "y": 0
59
+ },
60
+ "id": 12,
61
+ "interval": null,
62
+ "links": [],
63
+ "maxDataPoints": 100,
64
+ "options": {
65
+ "colorMode": "value",
66
+ "fieldOptions": {
67
+ "calcs": ["lastNotNull"]
68
+ },
69
+ "graphMode": "area",
70
+ "justifyMode": "auto",
71
+ "orientation": "horizontal",
72
+ "reduceOptions": {
73
+ "calcs": ["mean"],
74
+ "fields": "",
75
+ "values": false
76
+ }
77
+ },
78
+ "pluginVersion": "7.0.4",
79
+ "targets": [
80
+ {
81
+ "expr": "rate(sidekiq_enqueued_jobs[1m])",
82
+ "format": "time_series",
83
+ "instant": true,
84
+ "interval": "",
85
+ "intervalFactor": 1,
86
+ "legendFormat": "",
87
+ "refId": "A"
88
+ }
89
+ ],
90
+ "title": "Enqueuing rate",
91
+ "type": "stat"
92
+ },
93
+ {
94
+ "cacheTimeout": null,
95
+ "datasource": null,
96
+ "fieldConfig": {
97
+ "defaults": {
98
+ "custom": {},
99
+ "mappings": [
100
+ {
101
+ "id": 0,
102
+ "op": "=",
103
+ "text": "N/A",
104
+ "type": 1,
105
+ "value": "null"
106
+ }
107
+ ],
108
+ "nullValueMode": "connected",
109
+ "thresholds": {
110
+ "mode": "absolute",
111
+ "steps": [
112
+ {
113
+ "color": "green",
114
+ "value": null
115
+ },
116
+ {
117
+ "color": "red",
118
+ "value": 80
119
+ }
120
+ ]
121
+ },
122
+ "unit": "none"
123
+ },
124
+ "overrides": []
125
+ },
126
+ "gridPos": {
127
+ "h": 4,
128
+ "w": 3,
129
+ "x": 3,
130
+ "y": 0
131
+ },
132
+ "id": 13,
133
+ "interval": null,
134
+ "links": [],
135
+ "maxDataPoints": 100,
136
+ "options": {
137
+ "colorMode": "value",
138
+ "fieldOptions": {
139
+ "calcs": ["lastNotNull"]
140
+ },
141
+ "graphMode": "area",
142
+ "justifyMode": "auto",
143
+ "orientation": "horizontal",
144
+ "reduceOptions": {
145
+ "calcs": ["mean"],
146
+ "fields": "",
147
+ "values": false
148
+ }
149
+ },
150
+ "pluginVersion": "7.0.4",
151
+ "targets": [
152
+ {
153
+ "expr": "rate(sidekiq_processed_jobs_total[1m])",
154
+ "format": "time_series",
155
+ "instant": true,
156
+ "interval": "",
157
+ "intervalFactor": 1,
158
+ "legendFormat": "",
159
+ "refId": "A"
160
+ }
161
+ ],
162
+ "title": "Processing rate",
163
+ "type": "stat"
164
+ },
165
+ {
166
+ "cacheTimeout": null,
167
+ "datasource": null,
168
+ "fieldConfig": {
169
+ "defaults": {
170
+ "custom": {},
171
+ "mappings": [
172
+ {
173
+ "id": 0,
174
+ "op": "=",
175
+ "text": "N/A",
176
+ "type": 1,
177
+ "value": "null"
178
+ }
179
+ ],
180
+ "nullValueMode": "connected",
181
+ "thresholds": {
182
+ "mode": "absolute",
183
+ "steps": [
184
+ {
185
+ "color": "#299c46",
186
+ "value": null
187
+ },
188
+ {
189
+ "color": "rgba(237, 129, 40, 0.89)",
190
+ "value": 1
191
+ },
192
+ {
193
+ "color": "#d44a3a",
194
+ "value": 10
195
+ }
196
+ ]
197
+ },
198
+ "unit": "none"
199
+ },
200
+ "overrides": []
201
+ },
202
+ "gridPos": {
203
+ "h": 4,
204
+ "w": 3,
205
+ "x": 6,
206
+ "y": 0
207
+ },
208
+ "id": 10,
209
+ "interval": null,
210
+ "links": [],
211
+ "maxDataPoints": 100,
212
+ "options": {
213
+ "colorMode": "value",
214
+ "fieldOptions": {
215
+ "calcs": ["lastNotNull"]
216
+ },
217
+ "graphMode": "area",
218
+ "justifyMode": "auto",
219
+ "orientation": "horizontal",
220
+ "reduceOptions": {
221
+ "calcs": ["mean"],
222
+ "fields": "",
223
+ "values": false
224
+ }
225
+ },
226
+ "pluginVersion": "7.0.4",
227
+ "targets": [
228
+ {
229
+ "expr": "increase(sidekiq_failed_jobs_total[1m])",
230
+ "format": "time_series",
231
+ "instant": true,
232
+ "interval": "",
233
+ "intervalFactor": 1,
234
+ "legendFormat": "",
235
+ "refId": "A"
236
+ }
237
+ ],
238
+ "title": "Failed growth",
239
+ "type": "stat"
240
+ },
241
+ {
242
+ "cacheTimeout": null,
243
+ "datasource": null,
244
+ "fieldConfig": {
245
+ "defaults": {
246
+ "custom": {},
247
+ "mappings": [
248
+ {
249
+ "id": 0,
250
+ "op": "=",
251
+ "text": "N/A",
252
+ "type": 1,
253
+ "value": "null"
254
+ }
255
+ ],
256
+ "nullValueMode": "connected",
257
+ "thresholds": {
258
+ "mode": "absolute",
259
+ "steps": [
260
+ {
261
+ "color": "#299c46",
262
+ "value": null
263
+ },
264
+ {
265
+ "color": "rgba(237, 129, 40, 0.89)",
266
+ "value": 1
267
+ },
268
+ {
269
+ "color": "#d44a3a",
270
+ "value": 10
271
+ }
272
+ ]
273
+ },
274
+ "unit": "none"
275
+ },
276
+ "overrides": []
277
+ },
278
+ "gridPos": {
279
+ "h": 4,
280
+ "w": 3,
281
+ "x": 9,
282
+ "y": 0
283
+ },
284
+ "id": 14,
285
+ "interval": null,
286
+ "links": [],
287
+ "maxDataPoints": 100,
288
+ "options": {
289
+ "colorMode": "value",
290
+ "fieldOptions": {
291
+ "calcs": ["lastNotNull"]
292
+ },
293
+ "graphMode": "area",
294
+ "justifyMode": "auto",
295
+ "orientation": "horizontal",
296
+ "reduceOptions": {
297
+ "calcs": ["mean"],
298
+ "fields": "",
299
+ "values": false
300
+ }
301
+ },
302
+ "pluginVersion": "7.0.4",
303
+ "targets": [
304
+ {
305
+ "expr": "sidekiq_retry_jobs",
306
+ "format": "time_series",
307
+ "instant": true,
308
+ "interval": "",
309
+ "intervalFactor": 1,
310
+ "legendFormat": "",
311
+ "refId": "A"
312
+ }
313
+ ],
314
+ "title": "Retry jobs",
315
+ "type": "stat"
316
+ },
317
+ {
318
+ "cacheTimeout": null,
319
+ "datasource": null,
320
+ "fieldConfig": {
321
+ "defaults": {
322
+ "custom": {},
323
+ "mappings": [
324
+ {
325
+ "id": 0,
326
+ "op": "=",
327
+ "text": "N/A",
328
+ "type": 1,
329
+ "value": "null"
330
+ }
331
+ ],
332
+ "nullValueMode": "connected",
333
+ "thresholds": {
334
+ "mode": "absolute",
335
+ "steps": [
336
+ {
337
+ "color": "#299c46",
338
+ "value": null
339
+ },
340
+ {
341
+ "color": "rgba(237, 129, 40, 0.89)",
342
+ "value": 10
343
+ },
344
+ {
345
+ "color": "#d44a3a",
346
+ "value": 20
347
+ }
348
+ ]
349
+ },
350
+ "unit": "none"
351
+ },
352
+ "overrides": []
353
+ },
354
+ "gridPos": {
355
+ "h": 4,
356
+ "w": 3,
357
+ "x": 12,
358
+ "y": 0
359
+ },
360
+ "id": 8,
361
+ "interval": null,
362
+ "links": [],
363
+ "maxDataPoints": 100,
364
+ "options": {
365
+ "colorMode": "value",
366
+ "fieldOptions": {
367
+ "calcs": ["lastNotNull"]
368
+ },
369
+ "graphMode": "area",
370
+ "justifyMode": "auto",
371
+ "orientation": "horizontal",
372
+ "reduceOptions": {
373
+ "calcs": ["mean"],
374
+ "fields": "",
375
+ "values": false
376
+ }
377
+ },
378
+ "pluginVersion": "7.0.4",
379
+ "targets": [
380
+ {
381
+ "expr": "sidekiq_dead_jobs",
382
+ "format": "time_series",
383
+ "instant": true,
384
+ "interval": "",
385
+ "intervalFactor": 1,
386
+ "legendFormat": "",
387
+ "refId": "A"
388
+ }
389
+ ],
390
+ "title": "Dead jobs",
391
+ "type": "stat"
392
+ },
393
+ {
394
+ "cacheTimeout": null,
395
+ "datasource": null,
396
+ "fieldConfig": {
397
+ "defaults": {
398
+ "custom": {},
399
+ "mappings": [
400
+ {
401
+ "id": 0,
402
+ "op": "=",
403
+ "text": "N/A",
404
+ "type": 1,
405
+ "value": "null"
406
+ }
407
+ ],
408
+ "nullValueMode": "connected",
409
+ "thresholds": {
410
+ "mode": "absolute",
411
+ "steps": [
412
+ {
413
+ "color": "green",
414
+ "value": null
415
+ },
416
+ {
417
+ "color": "red",
418
+ "value": 80
419
+ }
420
+ ]
421
+ },
422
+ "unit": "none"
423
+ },
424
+ "overrides": []
425
+ },
426
+ "gridPos": {
427
+ "h": 4,
428
+ "w": 3,
429
+ "x": 15,
430
+ "y": 0
431
+ },
432
+ "id": 9,
433
+ "interval": null,
434
+ "links": [],
435
+ "maxDataPoints": 100,
436
+ "options": {
437
+ "colorMode": "value",
438
+ "fieldOptions": {
439
+ "calcs": ["lastNotNull"]
440
+ },
441
+ "graphMode": "area",
442
+ "justifyMode": "auto",
443
+ "orientation": "horizontal",
444
+ "reduceOptions": {
445
+ "calcs": ["mean"],
446
+ "fields": "",
447
+ "values": false
448
+ }
449
+ },
450
+ "pluginVersion": "7.0.4",
451
+ "targets": [
452
+ {
453
+ "expr": "sidekiq_enqueued_jobs",
454
+ "format": "time_series",
455
+ "instant": true,
456
+ "interval": "",
457
+ "intervalFactor": 1,
458
+ "legendFormat": "",
459
+ "refId": "A"
460
+ }
461
+ ],
462
+ "title": "Enqueued jobs",
463
+ "type": "stat"
464
+ },
465
+ {
466
+ "cacheTimeout": null,
467
+ "datasource": null,
468
+ "fieldConfig": {
469
+ "defaults": {
470
+ "custom": {},
471
+ "mappings": [
472
+ {
473
+ "id": 0,
474
+ "op": "=",
475
+ "text": "N/A",
476
+ "type": 1,
477
+ "value": "null"
478
+ }
479
+ ],
480
+ "nullValueMode": "connected",
481
+ "thresholds": {
482
+ "mode": "absolute",
483
+ "steps": [
484
+ {
485
+ "color": "green",
486
+ "value": null
487
+ },
488
+ {
489
+ "color": "red",
490
+ "value": 80
491
+ }
492
+ ]
493
+ },
494
+ "unit": "none"
495
+ },
496
+ "overrides": []
497
+ },
498
+ "gridPos": {
499
+ "h": 4,
500
+ "w": 3,
501
+ "x": 18,
502
+ "y": 0
503
+ },
504
+ "id": 4,
505
+ "interval": null,
506
+ "links": [],
507
+ "maxDataPoints": 100,
508
+ "options": {
509
+ "colorMode": "value",
510
+ "fieldOptions": {
511
+ "calcs": ["lastNotNull"]
512
+ },
513
+ "graphMode": "area",
514
+ "justifyMode": "auto",
515
+ "orientation": "horizontal",
516
+ "reduceOptions": {
517
+ "calcs": ["mean"],
518
+ "fields": "",
519
+ "values": false
520
+ }
521
+ },
522
+ "pluginVersion": "7.0.4",
523
+ "targets": [
524
+ {
525
+ "expr": "sidekiq_busy_workers",
526
+ "format": "time_series",
527
+ "instant": true,
528
+ "interval": "",
529
+ "intervalFactor": 1,
530
+ "legendFormat": "",
531
+ "refId": "A"
532
+ }
533
+ ],
534
+ "title": "Busy workers",
535
+ "type": "stat"
536
+ },
537
+ {
538
+ "cacheTimeout": null,
539
+ "datasource": null,
540
+ "fieldConfig": {
541
+ "defaults": {
542
+ "custom": {},
543
+ "mappings": [
544
+ {
545
+ "id": 0,
546
+ "op": "=",
547
+ "text": "N/A",
548
+ "type": 1,
549
+ "value": "null"
550
+ }
551
+ ],
552
+ "nullValueMode": "connected",
553
+ "thresholds": {
554
+ "mode": "absolute",
555
+ "steps": [
556
+ {
557
+ "color": "green",
558
+ "value": null
559
+ },
560
+ {
561
+ "color": "red",
562
+ "value": 80
563
+ }
564
+ ]
565
+ },
566
+ "unit": "none"
567
+ },
568
+ "overrides": []
569
+ },
570
+ "gridPos": {
571
+ "h": 4,
572
+ "w": 3,
573
+ "x": 21,
574
+ "y": 0
575
+ },
576
+ "id": 6,
577
+ "interval": null,
578
+ "links": [],
579
+ "maxDataPoints": 100,
580
+ "options": {
581
+ "colorMode": "value",
582
+ "fieldOptions": {
583
+ "calcs": ["lastNotNull"]
584
+ },
585
+ "graphMode": "area",
586
+ "justifyMode": "auto",
587
+ "orientation": "horizontal",
588
+ "reduceOptions": {
589
+ "calcs": ["mean"],
590
+ "fields": "",
591
+ "values": false
592
+ }
593
+ },
594
+ "pluginVersion": "7.0.4",
595
+ "targets": [
596
+ {
597
+ "expr": "sidekiq_scheduled_jobs",
598
+ "format": "time_series",
599
+ "instant": true,
600
+ "interval": "",
601
+ "intervalFactor": 1,
602
+ "legendFormat": "",
603
+ "refId": "A"
604
+ }
605
+ ],
606
+ "title": "Scheduled jobs",
607
+ "type": "stat"
608
+ },
609
+ {
610
+ "aliasColors": {},
611
+ "bars": false,
612
+ "dashLength": 10,
613
+ "dashes": false,
614
+ "datasource": null,
615
+ "fieldConfig": {
616
+ "defaults": {
617
+ "custom": {}
618
+ },
619
+ "overrides": []
620
+ },
621
+ "fill": 1,
622
+ "fillGradient": 0,
623
+ "gridPos": {
624
+ "h": 14,
625
+ "w": 13,
626
+ "x": 0,
627
+ "y": 4
628
+ },
629
+ "hiddenSeries": false,
630
+ "id": 2,
631
+ "legend": {
632
+ "avg": false,
633
+ "current": false,
634
+ "max": false,
635
+ "min": false,
636
+ "show": true,
637
+ "total": false,
638
+ "values": false
639
+ },
640
+ "lines": true,
641
+ "linewidth": 1,
642
+ "links": [],
643
+ "nullPointMode": "null",
644
+ "options": {
645
+ "dataLinks": []
646
+ },
647
+ "percentage": false,
648
+ "pointradius": 5,
649
+ "points": false,
650
+ "renderer": "flot",
651
+ "seriesOverrides": [
652
+ {
653
+ "alias": "processing rate",
654
+ "color": "#447ebc",
655
+ "fill": 0,
656
+ "yaxis": 2
657
+ }
658
+ ],
659
+ "spaceLength": 10,
660
+ "stack": false,
661
+ "steppedLine": false,
662
+ "targets": [
663
+ {
664
+ "expr": "rate(sidekiq_queue_latency_seconds[1m])",
665
+ "format": "time_series",
666
+ "intervalFactor": 1,
667
+ "legendFormat": "{{name}}",
668
+ "refId": "A"
669
+ },
670
+ {
671
+ "expr": "rate(sidekiq_processed_jobs_total[1m])",
672
+ "format": "time_series",
673
+ "intervalFactor": 1,
674
+ "legendFormat": "processing rate",
675
+ "refId": "B"
676
+ }
677
+ ],
678
+ "thresholds": [],
679
+ "timeFrom": null,
680
+ "timeRegions": [],
681
+ "timeShift": null,
682
+ "title": "Queues latency",
683
+ "tooltip": {
684
+ "shared": true,
685
+ "sort": 0,
686
+ "value_type": "individual"
687
+ },
688
+ "type": "graph",
689
+ "xaxis": {
690
+ "buckets": null,
691
+ "mode": "time",
692
+ "name": null,
693
+ "show": true,
694
+ "values": []
695
+ },
696
+ "yaxes": [
697
+ {
698
+ "format": "s",
699
+ "label": null,
700
+ "logBase": 1,
701
+ "max": null,
702
+ "min": "0",
703
+ "show": true
704
+ },
705
+ {
706
+ "format": "short",
707
+ "label": null,
708
+ "logBase": 1,
709
+ "max": null,
710
+ "min": null,
711
+ "show": false
712
+ }
713
+ ],
714
+ "yaxis": {
715
+ "align": false,
716
+ "alignLevel": null
717
+ }
718
+ },
719
+ {
720
+ "aliasColors": {},
721
+ "bars": false,
722
+ "dashLength": 10,
723
+ "dashes": false,
724
+ "datasource": null,
725
+ "fieldConfig": {
726
+ "defaults": {
727
+ "custom": {}
728
+ },
729
+ "overrides": []
730
+ },
731
+ "fill": 1,
732
+ "fillGradient": 0,
733
+ "gridPos": {
734
+ "h": 14,
735
+ "w": 11,
736
+ "x": 13,
737
+ "y": 4
738
+ },
739
+ "hiddenSeries": false,
740
+ "id": 16,
741
+ "legend": {
742
+ "avg": false,
743
+ "current": false,
744
+ "max": false,
745
+ "min": false,
746
+ "show": true,
747
+ "total": false,
748
+ "values": false
749
+ },
750
+ "lines": true,
751
+ "linewidth": 1,
752
+ "links": [],
753
+ "nullPointMode": "null",
754
+ "options": {
755
+ "dataLinks": []
756
+ },
757
+ "percentage": false,
758
+ "pointradius": 5,
759
+ "points": false,
760
+ "renderer": "flot",
761
+ "seriesOverrides": [],
762
+ "spaceLength": 10,
763
+ "stack": false,
764
+ "steppedLine": false,
765
+ "targets": [
766
+ {
767
+ "expr": "sidekiq_queue_enqueued_jobs",
768
+ "format": "time_series",
769
+ "intervalFactor": 1,
770
+ "legendFormat": "{{name}}",
771
+ "refId": "A"
772
+ }
773
+ ],
774
+ "thresholds": [],
775
+ "timeFrom": null,
776
+ "timeRegions": [],
777
+ "timeShift": null,
778
+ "title": "Queue enqueued jobs",
779
+ "tooltip": {
780
+ "shared": true,
781
+ "sort": 0,
782
+ "value_type": "individual"
783
+ },
784
+ "type": "graph",
785
+ "xaxis": {
786
+ "buckets": null,
787
+ "mode": "time",
788
+ "name": null,
789
+ "show": true,
790
+ "values": []
791
+ },
792
+ "yaxes": [
793
+ {
794
+ "format": "none",
795
+ "label": null,
796
+ "logBase": 1,
797
+ "max": null,
798
+ "min": null,
799
+ "show": true
800
+ },
801
+ {
802
+ "format": "short",
803
+ "label": null,
804
+ "logBase": 1,
805
+ "max": null,
806
+ "min": null,
807
+ "show": false
808
+ }
809
+ ],
810
+ "yaxis": {
811
+ "align": false,
812
+ "alignLevel": null
813
+ }
814
+ }
815
+ ],
816
+ "refresh": "5s",
817
+ "schemaVersion": 25,
818
+ "style": "dark",
819
+ "tags": [],
820
+ "templating": {
821
+ "list": []
822
+ },
823
+ "time": {
824
+ "from": "now-30m",
825
+ "to": "now"
826
+ },
827
+ "timepicker": {
828
+ "refresh_intervals": [
829
+ "10s",
830
+ "30s",
831
+ "1m",
832
+ "5m",
833
+ "15m",
834
+ "30m",
835
+ "1h",
836
+ "2h",
837
+ "1d"
838
+ ],
839
+ "time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"]
840
+ },
841
+ "timezone": "",
842
+ "title": "Sidekiq Dashboard",
843
+ "uid": "SwCwV7qkz",
844
+ "version": 2
845
+ }