profoundjs-swagger-stats 1.1.3 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/dashboards/prometheus/swagger-stats dashboard v3.json +1269 -0
  3. package/examples/authtest/authtest.js +5 -10
  4. package/examples/fastify/fasifytest.js +24 -5
  5. package/examples/hapijstest/hapijstest.js +17 -2
  6. package/examples/restify/restifytest.js +16 -1
  7. package/examples/spectest/spectest.js +7 -9
  8. package/examples/testapp/petstore.json +1699 -0
  9. package/examples/testapp/testapp.js +6 -62
  10. package/lib/sws-api-swagger.yaml +1 -1
  11. package/lib/swsAPIStats.js +6 -1
  12. package/lib/swsAuth.js +140 -0
  13. package/lib/swsElasticEmitter.js +103 -45
  14. package/lib/swsHapi.js +29 -34
  15. package/lib/swsInterface.js +40 -189
  16. package/lib/swsProcessor.js +1 -1
  17. package/lib/swsReqResStats.js +1 -1
  18. package/lib/swsUtil.js +7 -21
  19. package/lib/swssettings.js +8 -2
  20. package/package.json +90 -91
  21. package/schema/elasticsearch/api_index_template.json +1 -1
  22. package/schema/elasticsearch/api_index_template_7x.json +185 -0
  23. package/scripts/elasticsearch/elastic7/docker-compose.yml +6 -17
  24. package/scripts/elasticsearch/elastic8/docker-compose.yml +34 -0
  25. package/ux/css/app.dc22c4da.css +7 -0
  26. package/ux/css/chunk-vendors.a6da6d7a.css +10 -0
  27. package/ux/fonts/KFOkCnqEu92Fr1MmgVxIIzQ.4aa2e698.woff +0 -0
  28. package/ux/fonts/KFOlCnqEu92Fr1MmEU9fBBc-.40bcb2b8.woff +0 -0
  29. package/ux/fonts/KFOlCnqEu92Fr1MmSU5fBBc-.ea60988b.woff +0 -0
  30. package/ux/fonts/KFOlCnqEu92Fr1MmWUlfBBc-.0774a8b7.woff +0 -0
  31. package/ux/fonts/KFOlCnqEu92Fr1MmYUtfBBc-.bcb7c7e2.woff +0 -0
  32. package/ux/fonts/KFOmCnqEu92Fr1Mu4mxM.d3907d0c.woff +0 -0
  33. package/ux/fonts/fa-brands-400.1a575a41.woff +0 -0
  34. package/ux/fonts/fa-brands-400.ed311c7a.woff2 +0 -0
  35. package/ux/fonts/fa-regular-400.b91d376b.woff2 +0 -0
  36. package/ux/fonts/fa-regular-400.d1d7e3b4.woff +0 -0
  37. package/ux/fonts/fa-solid-900.d745348d.woff +0 -0
  38. package/ux/fonts/fa-solid-900.d824df7e.woff2 +0 -0
  39. package/ux/fonts/flUhRq6tzZclQEJ-Vdg-IuiaDsNa.3e1afe59.woff +0 -0
  40. package/ux/fonts/flUhRq6tzZclQEJ-Vdg-IuiaDsNcIhQ8tQ.a4160421.woff2 +0 -0
  41. package/ux/index.html +1 -1
  42. package/ux/js/app.d095d0d6.js +1 -0
  43. package/ux/js/chunk-2d0b90b4.afe783bc.js +8 -0
  44. package/ux/js/chunk-2d0daf1e.a05fda31.js +11 -0
  45. package/ux/js/chunk-461883cd.a2aa4876.js +82 -0
  46. package/ux/js/chunk-vendors.4f167dc9.js +39 -0
  47. package/ux/logo.png +0 -0
  48. package/.editorconfig +0 -21
  49. package/.travis.yml +0 -23
  50. package/dashboards/prometheus/swagger-stats dashboard.json +0 -1118
  51. package/dist/css/sws.min.css +0 -18
  52. package/dist/fonts/FontAwesome.otf +0 -0
  53. package/dist/fonts/fontawesome-webfont.eot +0 -0
  54. package/dist/fonts/fontawesome-webfont.svg +0 -2671
  55. package/dist/fonts/fontawesome-webfont.ttf +0 -0
  56. package/dist/fonts/fontawesome-webfont.woff +0 -0
  57. package/dist/fonts/fontawesome-webfont.woff2 +0 -0
  58. package/dist/fonts/glyphicons-halflings-regular.eot +0 -0
  59. package/dist/fonts/glyphicons-halflings-regular.svg +0 -288
  60. package/dist/fonts/glyphicons-halflings-regular.ttf +0 -0
  61. package/dist/fonts/glyphicons-halflings-regular.woff +0 -0
  62. package/dist/fonts/glyphicons-halflings-regular.woff2 +0 -0
  63. package/dist/images/favicon.png +0 -0
  64. package/dist/js/sws.min.js +0 -1
  65. package/gulpfile.js +0 -103
  66. package/karma.conf.js +0 -153
  67. package/ux/css/app.71245b0e.css +0 -7
  68. package/ux/css/chunk-vendors.809c52d1.css +0 -10
  69. package/ux/fonts/KFOkCnqEu92Fr1MmgVxIIzQ.5cb7edfc.woff +0 -0
  70. package/ux/fonts/KFOlCnqEu92Fr1MmEU9fBBc-.87284894.woff +0 -0
  71. package/ux/fonts/KFOlCnqEu92Fr1MmSU5fBBc-.b00849e0.woff +0 -0
  72. package/ux/fonts/KFOlCnqEu92Fr1MmWUlfBBc-.adcde98f.woff +0 -0
  73. package/ux/fonts/KFOlCnqEu92Fr1MmYUtfBBc-.bb1e4dc6.woff +0 -0
  74. package/ux/fonts/KFOmCnqEu92Fr1Mu4mxM.60fa3c06.woff +0 -0
  75. package/ux/fonts/fa-brands-400.c5e0f14f.woff +0 -0
  76. package/ux/fonts/fa-brands-400.cccc9d29.woff2 +0 -0
  77. package/ux/fonts/fa-regular-400.c4f508e7.woff +0 -0
  78. package/ux/fonts/fa-regular-400.f5f2566b.woff2 +0 -0
  79. package/ux/fonts/fa-solid-900.333bae20.woff +0 -0
  80. package/ux/fonts/fa-solid-900.44d537ab.woff2 +0 -0
  81. package/ux/fonts/flUhRq6tzZclQEJ-Vdg-IuiaDsNa.29b882f0.woff +0 -0
  82. package/ux/fonts/flUhRq6tzZclQEJ-Vdg-IuiaDsNcIhQ8tQ.0509ab09.woff2 +0 -0
  83. package/ux/js/app.0159ef6a.js +0 -1
  84. package/ux/js/chunk-2d0b90b4.92f1ea49.js +0 -8
  85. package/ux/js/chunk-461883cd.442efb25.js +0 -76
  86. package/ux/js/chunk-vendors.31d3ce30.js +0 -33
  87. /package/ux/js/{chunk-2d0de2f2.553bf976.js → chunk-2d0de2f2.2848649c.js} +0 -0
@@ -1,1118 +0,0 @@
1
- {
2
- "__inputs": [
3
- {
4
- "name": "DS_PROMETHEUS",
5
- "label": "Prometheus",
6
- "description": "",
7
- "type": "datasource",
8
- "pluginId": "prometheus",
9
- "pluginName": "Prometheus"
10
- }
11
- ],
12
- "__requires": [
13
- {
14
- "type": "grafana",
15
- "id": "grafana",
16
- "name": "Grafana",
17
- "version": "4.6.1"
18
- },
19
- {
20
- "type": "panel",
21
- "id": "graph",
22
- "name": "Graph",
23
- "version": ""
24
- },
25
- {
26
- "type": "datasource",
27
- "id": "prometheus",
28
- "name": "Prometheus",
29
- "version": "1.0.0"
30
- },
31
- {
32
- "type": "panel",
33
- "id": "singlestat",
34
- "name": "Singlestat",
35
- "version": ""
36
- }
37
- ],
38
- "annotations": {
39
- "list": [
40
- {
41
- "builtIn": 1,
42
- "datasource": "-- Grafana --",
43
- "enable": true,
44
- "hide": true,
45
- "iconColor": "rgba(0, 211, 255, 1)",
46
- "name": "Annotations & Alerts",
47
- "type": "dashboard"
48
- }
49
- ]
50
- },
51
- "editable": true,
52
- "gnetId": null,
53
- "graphTooltip": 0,
54
- "hideControls": false,
55
- "id": null,
56
- "links": [],
57
- "refresh": "10s",
58
- "rows": [
59
- {
60
- "collapse": false,
61
- "height": 183,
62
- "panels": [
63
- {
64
- "cacheTimeout": null,
65
- "colorBackground": false,
66
- "colorValue": false,
67
- "colors": [
68
- "rgba(245, 54, 54, 0.9)",
69
- "rgba(237, 129, 40, 0.89)",
70
- "rgba(50, 172, 45, 0.97)"
71
- ],
72
- "datasource": "${DS_PROMETHEUS}",
73
- "format": "none",
74
- "gauge": {
75
- "maxValue": 100,
76
- "minValue": 0,
77
- "show": false,
78
- "thresholdLabels": false,
79
- "thresholdMarkers": true
80
- },
81
- "id": 1,
82
- "interval": null,
83
- "links": [],
84
- "mappingType": 1,
85
- "mappingTypes": [
86
- {
87
- "name": "value to text",
88
- "value": 1
89
- },
90
- {
91
- "name": "range to text",
92
- "value": 2
93
- }
94
- ],
95
- "maxDataPoints": 100,
96
- "nullPointMode": "connected",
97
- "nullText": null,
98
- "postfix": "",
99
- "postfixFontSize": "50%",
100
- "prefix": "",
101
- "prefixFontSize": "50%",
102
- "rangeMaps": [
103
- {
104
- "from": "null",
105
- "text": "N/A",
106
- "to": "null"
107
- }
108
- ],
109
- "span": 2,
110
- "sparkline": {
111
- "fillColor": "rgba(31, 118, 189, 0.18)",
112
- "full": false,
113
- "lineColor": "rgb(31, 120, 193)",
114
- "show": false
115
- },
116
- "tableColumn": "",
117
- "targets": [
118
- {
119
- "expr": "api_all_request_total",
120
- "format": "time_series",
121
- "intervalFactor": 2,
122
- "refId": "A",
123
- "step": 20
124
- }
125
- ],
126
- "thresholds": "",
127
- "title": "Requests",
128
- "type": "singlestat",
129
- "valueFontSize": "80%",
130
- "valueMaps": [
131
- {
132
- "op": "=",
133
- "text": "N/A",
134
- "value": "null"
135
- }
136
- ],
137
- "valueName": "current"
138
- },
139
- {
140
- "cacheTimeout": null,
141
- "colorBackground": false,
142
- "colorValue": false,
143
- "colors": [
144
- "rgba(245, 54, 54, 0.9)",
145
- "rgba(237, 129, 40, 0.89)",
146
- "rgba(50, 172, 45, 0.97)"
147
- ],
148
- "datasource": "${DS_PROMETHEUS}",
149
- "format": "none",
150
- "gauge": {
151
- "maxValue": 100,
152
- "minValue": 0,
153
- "show": false,
154
- "thresholdLabels": false,
155
- "thresholdMarkers": true
156
- },
157
- "id": 2,
158
- "interval": null,
159
- "links": [],
160
- "mappingType": 1,
161
- "mappingTypes": [
162
- {
163
- "name": "value to text",
164
- "value": 1
165
- },
166
- {
167
- "name": "range to text",
168
- "value": 2
169
- }
170
- ],
171
- "maxDataPoints": 100,
172
- "nullPointMode": "connected",
173
- "nullText": null,
174
- "postfix": "",
175
- "postfixFontSize": "50%",
176
- "prefix": "",
177
- "prefixFontSize": "50%",
178
- "rangeMaps": [
179
- {
180
- "from": "null",
181
- "text": "N/A",
182
- "to": "null"
183
- }
184
- ],
185
- "span": 2,
186
- "sparkline": {
187
- "fillColor": "rgba(31, 118, 189, 0.18)",
188
- "full": false,
189
- "lineColor": "rgb(31, 120, 193)",
190
- "show": true
191
- },
192
- "tableColumn": "",
193
- "targets": [
194
- {
195
- "expr": "(\n sum(irate(api_request_duration_milliseconds_bucket{le=\"25\",code=~\"^2..$\"}[1m]))\n+\n (sum(irate(api_request_duration_milliseconds_bucket{le=\"100\",code=~\"^2..$\"}[1m])) / 2)\n) / sum(irate(api_request_duration_milliseconds_count[1m]))",
196
- "format": "time_series",
197
- "intervalFactor": 2,
198
- "legendFormat": "",
199
- "refId": "A",
200
- "step": 20
201
- }
202
- ],
203
- "thresholds": "",
204
- "title": "Apdex Score",
205
- "type": "singlestat",
206
- "valueFontSize": "80%",
207
- "valueMaps": [
208
- {
209
- "op": "=",
210
- "text": "N/A",
211
- "value": "null"
212
- }
213
- ],
214
- "valueName": "current"
215
- },
216
- {
217
- "cacheTimeout": null,
218
- "colorBackground": false,
219
- "colorValue": false,
220
- "colors": [
221
- "rgba(50, 172, 45, 0.97)",
222
- "rgba(237, 129, 40, 0.89)",
223
- "rgba(245, 54, 54, 0.9)"
224
- ],
225
- "datasource": "${DS_PROMETHEUS}",
226
- "format": "none",
227
- "gauge": {
228
- "maxValue": 100,
229
- "minValue": 0,
230
- "show": true,
231
- "thresholdLabels": false,
232
- "thresholdMarkers": true
233
- },
234
- "id": 3,
235
- "interval": null,
236
- "links": [],
237
- "mappingType": 1,
238
- "mappingTypes": [
239
- {
240
- "name": "value to text",
241
- "value": 1
242
- },
243
- {
244
- "name": "range to text",
245
- "value": 2
246
- }
247
- ],
248
- "maxDataPoints": 100,
249
- "nullPointMode": "connected",
250
- "nullText": null,
251
- "postfix": "",
252
- "postfixFontSize": "50%",
253
- "prefix": "",
254
- "prefixFontSize": "50%",
255
- "rangeMaps": [
256
- {
257
- "from": "null",
258
- "text": "N/A",
259
- "to": "null"
260
- }
261
- ],
262
- "span": 2,
263
- "sparkline": {
264
- "fillColor": "rgba(31, 118, 189, 0.18)",
265
- "full": false,
266
- "lineColor": "rgb(31, 120, 193)",
267
- "show": false
268
- },
269
- "tableColumn": "",
270
- "targets": [
271
- {
272
- "expr": "( api_all_errors_total / api_all_request_total ) * 100",
273
- "format": "time_series",
274
- "intervalFactor": 2,
275
- "legendFormat": "",
276
- "refId": "A",
277
- "step": 20
278
- }
279
- ],
280
- "thresholds": "10,40,50",
281
- "title": "Errors %",
282
- "type": "singlestat",
283
- "valueFontSize": "80%",
284
- "valueMaps": [
285
- {
286
- "op": "=",
287
- "text": "N/A",
288
- "value": "null"
289
- }
290
- ],
291
- "valueName": "current"
292
- },
293
- {
294
- "cacheTimeout": null,
295
- "colorBackground": false,
296
- "colorValue": false,
297
- "colors": [
298
- "rgba(245, 54, 54, 0.9)",
299
- "rgba(237, 129, 40, 0.89)",
300
- "rgba(50, 172, 45, 0.97)"
301
- ],
302
- "datasource": "${DS_PROMETHEUS}",
303
- "format": "none",
304
- "gauge": {
305
- "maxValue": 100,
306
- "minValue": 0,
307
- "show": false,
308
- "thresholdLabels": false,
309
- "thresholdMarkers": true
310
- },
311
- "id": 4,
312
- "interval": null,
313
- "links": [],
314
- "mappingType": 1,
315
- "mappingTypes": [
316
- {
317
- "name": "value to text",
318
- "value": 1
319
- },
320
- {
321
- "name": "range to text",
322
- "value": 2
323
- }
324
- ],
325
- "maxDataPoints": 100,
326
- "nullPointMode": "connected",
327
- "nullText": null,
328
- "postfix": "",
329
- "postfixFontSize": "50%",
330
- "prefix": "",
331
- "prefixFontSize": "50%",
332
- "rangeMaps": [
333
- {
334
- "from": "null",
335
- "text": "N/A",
336
- "to": "null"
337
- }
338
- ],
339
- "span": 2,
340
- "sparkline": {
341
- "fillColor": "rgba(31, 118, 189, 0.18)",
342
- "full": false,
343
- "lineColor": "rgb(31, 120, 193)",
344
- "show": true
345
- },
346
- "tableColumn": "",
347
- "targets": [
348
- {
349
- "expr": "api_all_request_in_processing_total",
350
- "format": "time_series",
351
- "intervalFactor": 2,
352
- "refId": "A",
353
- "step": 20
354
- }
355
- ],
356
- "thresholds": "",
357
- "title": "Requests in Processing",
358
- "type": "singlestat",
359
- "valueFontSize": "80%",
360
- "valueMaps": [
361
- {
362
- "op": "=",
363
- "text": "N/A",
364
- "value": "null"
365
- }
366
- ],
367
- "valueName": "current"
368
- },
369
- {
370
- "cacheTimeout": null,
371
- "colorBackground": false,
372
- "colorValue": false,
373
- "colors": [
374
- "rgba(50, 172, 45, 0.97)",
375
- "rgba(237, 129, 40, 0.89)",
376
- "rgba(245, 54, 54, 0.9)"
377
- ],
378
- "datasource": "${DS_PROMETHEUS}",
379
- "format": "none",
380
- "gauge": {
381
- "maxValue": 100,
382
- "minValue": 0,
383
- "show": true,
384
- "thresholdLabels": false,
385
- "thresholdMarkers": true
386
- },
387
- "id": 6,
388
- "interval": null,
389
- "links": [],
390
- "mappingType": 1,
391
- "mappingTypes": [
392
- {
393
- "name": "value to text",
394
- "value": 1
395
- },
396
- {
397
- "name": "range to text",
398
- "value": 2
399
- }
400
- ],
401
- "maxDataPoints": 100,
402
- "nullPointMode": "connected",
403
- "nullText": null,
404
- "postfix": "",
405
- "postfixFontSize": "50%",
406
- "prefix": "",
407
- "prefixFontSize": "50%",
408
- "rangeMaps": [
409
- {
410
- "from": "null",
411
- "text": "N/A",
412
- "to": "null"
413
- }
414
- ],
415
- "span": 2,
416
- "sparkline": {
417
- "fillColor": "rgba(31, 118, 189, 0.18)",
418
- "full": false,
419
- "lineColor": "rgb(31, 120, 193)",
420
- "show": true
421
- },
422
- "tableColumn": "",
423
- "targets": [
424
- {
425
- "expr": "nodejs_process_cpu_usage_percentage",
426
- "format": "time_series",
427
- "intervalFactor": 2,
428
- "refId": "A",
429
- "step": 20
430
- }
431
- ],
432
- "thresholds": "5,10,20",
433
- "title": "CPU %",
434
- "type": "singlestat",
435
- "valueFontSize": "80%",
436
- "valueMaps": [
437
- {
438
- "op": "=",
439
- "text": "N/A",
440
- "value": "null"
441
- }
442
- ],
443
- "valueName": "current"
444
- },
445
- {
446
- "cacheTimeout": null,
447
- "colorBackground": false,
448
- "colorValue": false,
449
- "colors": [
450
- "rgba(245, 54, 54, 0.9)",
451
- "rgba(237, 129, 40, 0.89)",
452
- "rgba(50, 172, 45, 0.97)"
453
- ],
454
- "datasource": "${DS_PROMETHEUS}",
455
- "description": "",
456
- "format": "none",
457
- "gauge": {
458
- "maxValue": 100,
459
- "minValue": 0,
460
- "show": false,
461
- "thresholdLabels": false,
462
- "thresholdMarkers": true
463
- },
464
- "id": 5,
465
- "interval": null,
466
- "links": [],
467
- "mappingType": 1,
468
- "mappingTypes": [
469
- {
470
- "name": "value to text",
471
- "value": 1
472
- },
473
- {
474
- "name": "range to text",
475
- "value": 2
476
- }
477
- ],
478
- "maxDataPoints": 100,
479
- "nullPointMode": "connected",
480
- "nullText": null,
481
- "postfix": "",
482
- "postfixFontSize": "50%",
483
- "prefix": "",
484
- "prefixFontSize": "50%",
485
- "rangeMaps": [
486
- {
487
- "from": "null",
488
- "text": "N/A",
489
- "to": "null"
490
- }
491
- ],
492
- "span": 2,
493
- "sparkline": {
494
- "fillColor": "rgba(31, 118, 189, 0.18)",
495
- "full": false,
496
- "lineColor": "rgb(31, 120, 193)",
497
- "show": true
498
- },
499
- "tableColumn": "",
500
- "targets": [
501
- {
502
- "expr": "(nodejs_process_memory_heap_used_bytes)/1048576",
503
- "format": "time_series",
504
- "intervalFactor": 2,
505
- "refId": "A",
506
- "step": 20
507
- }
508
- ],
509
- "thresholds": "",
510
- "title": "Heap Used, Mb",
511
- "transparent": false,
512
- "type": "singlestat",
513
- "valueFontSize": "80%",
514
- "valueMaps": [
515
- {
516
- "op": "=",
517
- "text": "N/A",
518
- "value": "null"
519
- }
520
- ],
521
- "valueName": "current"
522
- }
523
- ],
524
- "repeat": null,
525
- "repeatIteration": null,
526
- "repeatRowId": null,
527
- "showTitle": false,
528
- "title": "Dashboard Row",
529
- "titleSize": "h6"
530
- },
531
- {
532
- "collapse": false,
533
- "height": 265,
534
- "panels": [
535
- {
536
- "aliasColors": {},
537
- "bars": false,
538
- "dashLength": 10,
539
- "dashes": false,
540
- "datasource": "${DS_PROMETHEUS}",
541
- "fill": 1,
542
- "id": 7,
543
- "legend": {
544
- "avg": false,
545
- "current": false,
546
- "max": false,
547
- "min": false,
548
- "show": true,
549
- "total": false,
550
- "values": false
551
- },
552
- "lines": true,
553
- "linewidth": 1,
554
- "links": [],
555
- "nullPointMode": "null",
556
- "percentage": false,
557
- "pointradius": 5,
558
- "points": false,
559
- "renderer": "flot",
560
- "seriesOverrides": [],
561
- "spaceLength": 10,
562
- "span": 6,
563
- "stack": false,
564
- "steppedLine": false,
565
- "targets": [
566
- {
567
- "expr": "sum (irate(api_request_total[1m]))",
568
- "format": "time_series",
569
- "intervalFactor": 4,
570
- "legendFormat": "Request Rate",
571
- "refId": "A",
572
- "step": 4
573
- },
574
- {
575
- "expr": "sum (irate(api_request_total{code=~\"^5..$\"}[1m]))",
576
- "format": "time_series",
577
- "interval": "",
578
- "intervalFactor": 4,
579
- "legendFormat": "5XX Errors Rate",
580
- "refId": "B",
581
- "step": 4
582
- },
583
- {
584
- "expr": "sum (irate(api_request_total{code=~\"^4..$\"}[1m]))",
585
- "format": "time_series",
586
- "intervalFactor": 2,
587
- "legendFormat": "4XX Errors Rate",
588
- "refId": "C",
589
- "step": 2
590
- },
591
- {
592
- "expr": "sum (irate(api_request_total{code=~\"^2..$\"}[1m]))",
593
- "format": "time_series",
594
- "intervalFactor": 2,
595
- "legendFormat": "2XX Success Rate",
596
- "refId": "D",
597
- "step": 2
598
- }
599
- ],
600
- "thresholds": [],
601
- "timeFrom": null,
602
- "timeShift": null,
603
- "title": "Request and Error Rates (per sec)",
604
- "tooltip": {
605
- "shared": true,
606
- "sort": 0,
607
- "value_type": "individual"
608
- },
609
- "type": "graph",
610
- "xaxis": {
611
- "buckets": null,
612
- "mode": "time",
613
- "name": null,
614
- "show": true,
615
- "values": []
616
- },
617
- "yaxes": [
618
- {
619
- "format": "short",
620
- "label": null,
621
- "logBase": 1,
622
- "max": null,
623
- "min": null,
624
- "show": true
625
- },
626
- {
627
- "format": "short",
628
- "label": null,
629
- "logBase": 1,
630
- "max": null,
631
- "min": null,
632
- "show": true
633
- }
634
- ]
635
- },
636
- {
637
- "aliasColors": {},
638
- "bars": true,
639
- "dashLength": 10,
640
- "dashes": false,
641
- "datasource": "${DS_PROMETHEUS}",
642
- "fill": 1,
643
- "id": 8,
644
- "legend": {
645
- "avg": false,
646
- "current": false,
647
- "max": false,
648
- "min": false,
649
- "show": true,
650
- "total": false,
651
- "values": false
652
- },
653
- "lines": false,
654
- "linewidth": 1,
655
- "links": [],
656
- "nullPointMode": "null",
657
- "percentage": false,
658
- "pointradius": 5,
659
- "points": false,
660
- "renderer": "flot",
661
- "seriesOverrides": [],
662
- "spaceLength": 10,
663
- "span": 6,
664
- "stack": true,
665
- "steppedLine": false,
666
- "targets": [
667
- {
668
- "expr": "sum by(method) (irate(api_request_total[1m]))",
669
- "format": "time_series",
670
- "intervalFactor": 10,
671
- "refId": "A",
672
- "step": 10
673
- }
674
- ],
675
- "thresholds": [],
676
- "timeFrom": null,
677
- "timeShift": null,
678
- "title": "Request rate by Method (per sec)",
679
- "tooltip": {
680
- "shared": true,
681
- "sort": 0,
682
- "value_type": "individual"
683
- },
684
- "type": "graph",
685
- "xaxis": {
686
- "buckets": null,
687
- "mode": "time",
688
- "name": null,
689
- "show": true,
690
- "values": []
691
- },
692
- "yaxes": [
693
- {
694
- "format": "short",
695
- "label": null,
696
- "logBase": 1,
697
- "max": null,
698
- "min": null,
699
- "show": true
700
- },
701
- {
702
- "format": "short",
703
- "label": null,
704
- "logBase": 1,
705
- "max": null,
706
- "min": null,
707
- "show": true
708
- }
709
- ]
710
- }
711
- ],
712
- "repeat": null,
713
- "repeatIteration": null,
714
- "repeatRowId": null,
715
- "showTitle": false,
716
- "title": "Dashboard Row",
717
- "titleSize": "h6"
718
- },
719
- {
720
- "collapse": false,
721
- "height": 248,
722
- "panels": [
723
- {
724
- "aliasColors": {},
725
- "bars": false,
726
- "dashLength": 10,
727
- "dashes": false,
728
- "datasource": "${DS_PROMETHEUS}",
729
- "fill": 1,
730
- "id": 10,
731
- "legend": {
732
- "avg": false,
733
- "current": false,
734
- "max": false,
735
- "min": false,
736
- "show": true,
737
- "total": false,
738
- "values": false
739
- },
740
- "lines": true,
741
- "linewidth": 1,
742
- "links": [],
743
- "nullPointMode": "null",
744
- "percentage": false,
745
- "pointradius": 5,
746
- "points": false,
747
- "renderer": "flot",
748
- "seriesOverrides": [],
749
- "spaceLength": 10,
750
- "span": 6,
751
- "stack": false,
752
- "steppedLine": false,
753
- "targets": [
754
- {
755
- "expr": "(\n sum(irate(api_request_duration_milliseconds_bucket{le=\"25\",code=~\"^2..$\"}[1m]))\n+\n (sum(irate(api_request_duration_milliseconds_bucket{le=\"100\",code=~\"^2..$\"}[1m]))/2)\n) / sum(irate(api_request_duration_milliseconds_count[1m]))",
756
- "format": "time_series",
757
- "intervalFactor": 2,
758
- "legendFormat": "",
759
- "refId": "A",
760
- "step": 2
761
- }
762
- ],
763
- "thresholds": [],
764
- "timeFrom": null,
765
- "timeShift": null,
766
- "title": "Apdex Score: target 25ms, tolerated: 100ms",
767
- "tooltip": {
768
- "shared": true,
769
- "sort": 0,
770
- "value_type": "individual"
771
- },
772
- "type": "graph",
773
- "xaxis": {
774
- "buckets": null,
775
- "mode": "time",
776
- "name": null,
777
- "show": true,
778
- "values": []
779
- },
780
- "yaxes": [
781
- {
782
- "format": "short",
783
- "label": null,
784
- "logBase": 1,
785
- "max": null,
786
- "min": null,
787
- "show": true
788
- },
789
- {
790
- "format": "short",
791
- "label": null,
792
- "logBase": 1,
793
- "max": null,
794
- "min": null,
795
- "show": true
796
- }
797
- ]
798
- },
799
- {
800
- "aliasColors": {},
801
- "bars": false,
802
- "dashLength": 10,
803
- "dashes": false,
804
- "datasource": "${DS_PROMETHEUS}",
805
- "fill": 1,
806
- "id": 9,
807
- "legend": {
808
- "alignAsTable": false,
809
- "avg": false,
810
- "current": false,
811
- "max": false,
812
- "min": false,
813
- "rightSide": false,
814
- "show": true,
815
- "total": false,
816
- "values": false
817
- },
818
- "lines": true,
819
- "linewidth": 1,
820
- "links": [],
821
- "nullPointMode": "null",
822
- "percentage": true,
823
- "pointradius": 5,
824
- "points": false,
825
- "renderer": "flot",
826
- "seriesOverrides": [],
827
- "spaceLength": 10,
828
- "span": 6,
829
- "stack": false,
830
- "steppedLine": false,
831
- "targets": [
832
- {
833
- "expr": "( sum(irate(api_request_duration_milliseconds_bucket{le=\"5\"}[1m])) / sum(irate(api_request_duration_milliseconds_count[1m])) ) * 100",
834
- "format": "time_series",
835
- "intervalFactor": 2,
836
- "legendFormat": "Duration < 5ms (%)",
837
- "refId": "A",
838
- "step": 2
839
- },
840
- {
841
- "expr": "( sum(irate(api_request_duration_milliseconds_bucket{le=\"10\"}[1m])) / sum(irate(api_request_duration_milliseconds_count[1m])) ) * 100",
842
- "format": "time_series",
843
- "intervalFactor": 2,
844
- "legendFormat": "Duration < 10ms (%)",
845
- "refId": "B",
846
- "step": 2
847
- },
848
- {
849
- "expr": "( sum(irate(api_request_duration_milliseconds_bucket{le=\"50\"}[1m])) / sum(irate(api_request_duration_milliseconds_count[1m])) ) * 100",
850
- "format": "time_series",
851
- "intervalFactor": 2,
852
- "legendFormat": "Duration < 50ms (%)",
853
- "refId": "C",
854
- "step": 2
855
- },
856
- {
857
- "expr": "( sum(irate(api_request_duration_milliseconds_bucket{le=\"100\"}[1m])) / sum(irate(api_request_duration_milliseconds_count[1m])) ) * 100",
858
- "format": "time_series",
859
- "intervalFactor": 2,
860
- "legendFormat": "Duration < 100ms (%)",
861
- "refId": "D",
862
- "step": 2
863
- }
864
- ],
865
- "thresholds": [],
866
- "timeFrom": null,
867
- "timeShift": null,
868
- "title": "Request Duration (%)",
869
- "tooltip": {
870
- "shared": true,
871
- "sort": 0,
872
- "value_type": "individual"
873
- },
874
- "type": "graph",
875
- "xaxis": {
876
- "buckets": null,
877
- "mode": "time",
878
- "name": null,
879
- "show": true,
880
- "values": []
881
- },
882
- "yaxes": [
883
- {
884
- "format": "short",
885
- "label": null,
886
- "logBase": 1,
887
- "max": null,
888
- "min": null,
889
- "show": true
890
- },
891
- {
892
- "format": "short",
893
- "label": null,
894
- "logBase": 1,
895
- "max": null,
896
- "min": null,
897
- "show": true
898
- }
899
- ]
900
- }
901
- ],
902
- "repeat": null,
903
- "repeatIteration": null,
904
- "repeatRowId": null,
905
- "showTitle": false,
906
- "title": "Dashboard Row",
907
- "titleSize": "h6"
908
- },
909
- {
910
- "collapse": false,
911
- "height": 261,
912
- "panels": [
913
- {
914
- "aliasColors": {},
915
- "bars": false,
916
- "dashLength": 10,
917
- "dashes": false,
918
- "datasource": "${DS_PROMETHEUS}",
919
- "fill": 1,
920
- "id": 11,
921
- "legend": {
922
- "avg": false,
923
- "current": false,
924
- "max": false,
925
- "min": false,
926
- "show": true,
927
- "total": false,
928
- "values": false
929
- },
930
- "lines": true,
931
- "linewidth": 1,
932
- "links": [],
933
- "nullPointMode": "null",
934
- "percentage": false,
935
- "pointradius": 5,
936
- "points": false,
937
- "renderer": "flot",
938
- "seriesOverrides": [],
939
- "spaceLength": 10,
940
- "span": 6,
941
- "stack": false,
942
- "steppedLine": false,
943
- "targets": [
944
- {
945
- "expr": "topk(3, sum(irate(api_request_total[1m])) by (path))",
946
- "format": "time_series",
947
- "intervalFactor": 2,
948
- "legendFormat": "",
949
- "refId": "A",
950
- "step": 2
951
- }
952
- ],
953
- "thresholds": [],
954
- "timeFrom": null,
955
- "timeShift": null,
956
- "title": "Top 3 API calls (by path)",
957
- "tooltip": {
958
- "shared": true,
959
- "sort": 0,
960
- "value_type": "individual"
961
- },
962
- "transparent": true,
963
- "type": "graph",
964
- "xaxis": {
965
- "buckets": null,
966
- "mode": "time",
967
- "name": null,
968
- "show": true,
969
- "values": []
970
- },
971
- "yaxes": [
972
- {
973
- "format": "short",
974
- "label": null,
975
- "logBase": 1,
976
- "max": null,
977
- "min": null,
978
- "show": true
979
- },
980
- {
981
- "format": "short",
982
- "label": null,
983
- "logBase": 1,
984
- "max": null,
985
- "min": null,
986
- "show": true
987
- }
988
- ]
989
- },
990
- {
991
- "aliasColors": {},
992
- "bars": true,
993
- "dashLength": 10,
994
- "dashes": false,
995
- "datasource": "${DS_PROMETHEUS}",
996
- "fill": 1,
997
- "id": 12,
998
- "legend": {
999
- "alignAsTable": false,
1000
- "avg": false,
1001
- "current": false,
1002
- "hideEmpty": false,
1003
- "hideZero": false,
1004
- "max": false,
1005
- "min": false,
1006
- "rightSide": false,
1007
- "show": true,
1008
- "total": false,
1009
- "values": false
1010
- },
1011
- "lines": false,
1012
- "linewidth": 1,
1013
- "links": [],
1014
- "nullPointMode": "null",
1015
- "percentage": false,
1016
- "pointradius": 5,
1017
- "points": false,
1018
- "renderer": "flot",
1019
- "seriesOverrides": [],
1020
- "spaceLength": 10,
1021
- "span": 6,
1022
- "stack": true,
1023
- "steppedLine": false,
1024
- "targets": [
1025
- {
1026
- "expr": "topk(3, sum(irate(api_request_total{code=~\"^5..$\"}[1m])) by (path))",
1027
- "format": "time_series",
1028
- "intervalFactor": 2,
1029
- "legendFormat": "",
1030
- "refId": "A",
1031
- "step": 2
1032
- }
1033
- ],
1034
- "thresholds": [],
1035
- "timeFrom": null,
1036
- "timeShift": null,
1037
- "title": "Top 3 API Error Calls ( 5XX, by path)",
1038
- "tooltip": {
1039
- "shared": true,
1040
- "sort": 0,
1041
- "value_type": "individual"
1042
- },
1043
- "transparent": true,
1044
- "type": "graph",
1045
- "xaxis": {
1046
- "buckets": null,
1047
- "mode": "time",
1048
- "name": null,
1049
- "show": true,
1050
- "values": []
1051
- },
1052
- "yaxes": [
1053
- {
1054
- "format": "short",
1055
- "label": null,
1056
- "logBase": 1,
1057
- "max": null,
1058
- "min": null,
1059
- "show": true
1060
- },
1061
- {
1062
- "format": "short",
1063
- "label": null,
1064
- "logBase": 1,
1065
- "max": null,
1066
- "min": null,
1067
- "show": true
1068
- }
1069
- ]
1070
- }
1071
- ],
1072
- "repeat": null,
1073
- "repeatIteration": null,
1074
- "repeatRowId": null,
1075
- "showTitle": false,
1076
- "title": "Dashboard Row",
1077
- "titleSize": "h6"
1078
- }
1079
- ],
1080
- "schemaVersion": 14,
1081
- "style": "dark",
1082
- "tags": [],
1083
- "templating": {
1084
- "list": []
1085
- },
1086
- "time": {
1087
- "from": "now-30m",
1088
- "to": "now"
1089
- },
1090
- "timepicker": {
1091
- "refresh_intervals": [
1092
- "5s",
1093
- "10s",
1094
- "30s",
1095
- "1m",
1096
- "5m",
1097
- "15m",
1098
- "30m",
1099
- "1h",
1100
- "2h",
1101
- "1d"
1102
- ],
1103
- "time_options": [
1104
- "5m",
1105
- "15m",
1106
- "1h",
1107
- "6h",
1108
- "12h",
1109
- "24h",
1110
- "2d",
1111
- "7d",
1112
- "30d"
1113
- ]
1114
- },
1115
- "timezone": "",
1116
- "title": "swagger-stats dashboard v2",
1117
- "version": 19
1118
- }