profoundjs-swagger-stats 1.1.4 → 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
@@ -0,0 +1,1269 @@
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": "7.2.0"
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
+ "description": "Swagger-Stats Main Dashboard Revision 3",
52
+ "editable": true,
53
+ "gnetId": 3091,
54
+ "graphTooltip": 0,
55
+ "id": null,
56
+ "links": [],
57
+ "panels": [
58
+ {
59
+ "cacheTimeout": null,
60
+ "colorBackground": false,
61
+ "colorValue": false,
62
+ "colors": [
63
+ "rgba(245, 54, 54, 0.9)",
64
+ "rgba(237, 129, 40, 0.89)",
65
+ "rgba(50, 172, 45, 0.97)"
66
+ ],
67
+ "datasource": "${DS_PROMETHEUS}",
68
+ "fieldConfig": {
69
+ "defaults": {
70
+ "custom": {}
71
+ },
72
+ "overrides": []
73
+ },
74
+ "format": "none",
75
+ "gauge": {
76
+ "maxValue": 100,
77
+ "minValue": 0,
78
+ "show": false,
79
+ "thresholdLabels": false,
80
+ "thresholdMarkers": true
81
+ },
82
+ "gridPos": {
83
+ "h": 5,
84
+ "w": 4,
85
+ "x": 0,
86
+ "y": 0
87
+ },
88
+ "id": 1,
89
+ "interval": null,
90
+ "links": [],
91
+ "mappingType": 1,
92
+ "mappingTypes": [
93
+ {
94
+ "name": "value to text",
95
+ "value": 1
96
+ },
97
+ {
98
+ "name": "range to text",
99
+ "value": 2
100
+ }
101
+ ],
102
+ "maxDataPoints": 100,
103
+ "nullPointMode": "connected",
104
+ "nullText": null,
105
+ "postfix": "",
106
+ "postfixFontSize": "50%",
107
+ "prefix": "",
108
+ "prefixFontSize": "50%",
109
+ "rangeMaps": [
110
+ {
111
+ "from": "null",
112
+ "text": "N/A",
113
+ "to": "null"
114
+ }
115
+ ],
116
+ "sparkline": {
117
+ "fillColor": "rgba(31, 118, 189, 0.18)",
118
+ "full": false,
119
+ "lineColor": "rgb(31, 120, 193)",
120
+ "show": false
121
+ },
122
+ "tableColumn": "",
123
+ "targets": [
124
+ {
125
+ "expr": "api_all_request_total",
126
+ "format": "time_series",
127
+ "intervalFactor": 2,
128
+ "refId": "A",
129
+ "step": 20
130
+ }
131
+ ],
132
+ "thresholds": "",
133
+ "title": "Requests",
134
+ "type": "singlestat",
135
+ "valueFontSize": "80%",
136
+ "valueMaps": [
137
+ {
138
+ "op": "=",
139
+ "text": "N/A",
140
+ "value": "null"
141
+ }
142
+ ],
143
+ "valueName": "current"
144
+ },
145
+ {
146
+ "cacheTimeout": null,
147
+ "colorBackground": false,
148
+ "colorValue": false,
149
+ "colors": [
150
+ "rgba(245, 54, 54, 0.9)",
151
+ "rgba(237, 129, 40, 0.89)",
152
+ "rgba(50, 172, 45, 0.97)"
153
+ ],
154
+ "datasource": "${DS_PROMETHEUS}",
155
+ "fieldConfig": {
156
+ "defaults": {
157
+ "custom": {}
158
+ },
159
+ "overrides": []
160
+ },
161
+ "format": "none",
162
+ "gauge": {
163
+ "maxValue": 100,
164
+ "minValue": 0,
165
+ "show": false,
166
+ "thresholdLabels": false,
167
+ "thresholdMarkers": true
168
+ },
169
+ "gridPos": {
170
+ "h": 5,
171
+ "w": 4,
172
+ "x": 4,
173
+ "y": 0
174
+ },
175
+ "id": 2,
176
+ "interval": null,
177
+ "links": [],
178
+ "mappingType": 1,
179
+ "mappingTypes": [
180
+ {
181
+ "name": "value to text",
182
+ "value": 1
183
+ },
184
+ {
185
+ "name": "range to text",
186
+ "value": 2
187
+ }
188
+ ],
189
+ "maxDataPoints": 100,
190
+ "nullPointMode": "connected",
191
+ "nullText": null,
192
+ "postfix": "",
193
+ "postfixFontSize": "50%",
194
+ "prefix": "",
195
+ "prefixFontSize": "50%",
196
+ "rangeMaps": [
197
+ {
198
+ "from": "null",
199
+ "text": "N/A",
200
+ "to": "null"
201
+ }
202
+ ],
203
+ "sparkline": {
204
+ "fillColor": "rgba(31, 118, 189, 0.18)",
205
+ "full": false,
206
+ "lineColor": "rgb(31, 120, 193)",
207
+ "show": true
208
+ },
209
+ "tableColumn": "",
210
+ "targets": [
211
+ {
212
+ "expr": "(\n sum(rate(api_request_duration_milliseconds_bucket{le=\"25\",code=~\"^2..$\"}[1m]))\n+\n sum(rate(api_request_duration_milliseconds_bucket{le=\"100\",code=~\"^2..$\"}[1m]))\n) / 2 / sum(rate(api_request_duration_milliseconds_count[1m]))",
213
+ "format": "time_series",
214
+ "interval": "",
215
+ "intervalFactor": 2,
216
+ "legendFormat": "",
217
+ "refId": "A",
218
+ "step": 20
219
+ }
220
+ ],
221
+ "thresholds": "",
222
+ "title": "Apdex Score",
223
+ "type": "singlestat",
224
+ "valueFontSize": "80%",
225
+ "valueMaps": [
226
+ {
227
+ "op": "=",
228
+ "text": "N/A",
229
+ "value": "null"
230
+ }
231
+ ],
232
+ "valueName": "current"
233
+ },
234
+ {
235
+ "cacheTimeout": null,
236
+ "colorBackground": false,
237
+ "colorValue": false,
238
+ "colors": [
239
+ "rgba(50, 172, 45, 0.97)",
240
+ "rgba(237, 129, 40, 0.89)",
241
+ "rgba(245, 54, 54, 0.9)"
242
+ ],
243
+ "datasource": "${DS_PROMETHEUS}",
244
+ "fieldConfig": {
245
+ "defaults": {
246
+ "custom": {}
247
+ },
248
+ "overrides": []
249
+ },
250
+ "format": "none",
251
+ "gauge": {
252
+ "maxValue": 100,
253
+ "minValue": 0,
254
+ "show": true,
255
+ "thresholdLabels": false,
256
+ "thresholdMarkers": true
257
+ },
258
+ "gridPos": {
259
+ "h": 5,
260
+ "w": 4,
261
+ "x": 8,
262
+ "y": 0
263
+ },
264
+ "id": 3,
265
+ "interval": null,
266
+ "links": [],
267
+ "mappingType": 1,
268
+ "mappingTypes": [
269
+ {
270
+ "name": "value to text",
271
+ "value": 1
272
+ },
273
+ {
274
+ "name": "range to text",
275
+ "value": 2
276
+ }
277
+ ],
278
+ "maxDataPoints": 100,
279
+ "nullPointMode": "connected",
280
+ "nullText": null,
281
+ "postfix": "",
282
+ "postfixFontSize": "50%",
283
+ "prefix": "",
284
+ "prefixFontSize": "50%",
285
+ "rangeMaps": [
286
+ {
287
+ "from": "null",
288
+ "text": "N/A",
289
+ "to": "null"
290
+ }
291
+ ],
292
+ "sparkline": {
293
+ "fillColor": "rgba(31, 118, 189, 0.18)",
294
+ "full": false,
295
+ "lineColor": "rgb(31, 120, 193)",
296
+ "show": false
297
+ },
298
+ "tableColumn": "",
299
+ "targets": [
300
+ {
301
+ "expr": "( api_all_errors_total / api_all_request_total ) * 100",
302
+ "format": "time_series",
303
+ "intervalFactor": 2,
304
+ "legendFormat": "",
305
+ "refId": "A",
306
+ "step": 20
307
+ }
308
+ ],
309
+ "thresholds": "10,40,50",
310
+ "title": "Errors %",
311
+ "type": "singlestat",
312
+ "valueFontSize": "80%",
313
+ "valueMaps": [
314
+ {
315
+ "op": "=",
316
+ "text": "N/A",
317
+ "value": "null"
318
+ }
319
+ ],
320
+ "valueName": "current"
321
+ },
322
+ {
323
+ "cacheTimeout": null,
324
+ "colorBackground": false,
325
+ "colorValue": false,
326
+ "colors": [
327
+ "rgba(245, 54, 54, 0.9)",
328
+ "rgba(237, 129, 40, 0.89)",
329
+ "rgba(50, 172, 45, 0.97)"
330
+ ],
331
+ "datasource": "${DS_PROMETHEUS}",
332
+ "fieldConfig": {
333
+ "defaults": {
334
+ "custom": {}
335
+ },
336
+ "overrides": []
337
+ },
338
+ "format": "none",
339
+ "gauge": {
340
+ "maxValue": 100,
341
+ "minValue": 0,
342
+ "show": false,
343
+ "thresholdLabels": false,
344
+ "thresholdMarkers": true
345
+ },
346
+ "gridPos": {
347
+ "h": 5,
348
+ "w": 4,
349
+ "x": 12,
350
+ "y": 0
351
+ },
352
+ "id": 4,
353
+ "interval": null,
354
+ "links": [],
355
+ "mappingType": 1,
356
+ "mappingTypes": [
357
+ {
358
+ "name": "value to text",
359
+ "value": 1
360
+ },
361
+ {
362
+ "name": "range to text",
363
+ "value": 2
364
+ }
365
+ ],
366
+ "maxDataPoints": 100,
367
+ "nullPointMode": "connected",
368
+ "nullText": null,
369
+ "postfix": "",
370
+ "postfixFontSize": "50%",
371
+ "prefix": "",
372
+ "prefixFontSize": "50%",
373
+ "rangeMaps": [
374
+ {
375
+ "from": "null",
376
+ "text": "N/A",
377
+ "to": "null"
378
+ }
379
+ ],
380
+ "sparkline": {
381
+ "fillColor": "rgba(31, 118, 189, 0.18)",
382
+ "full": false,
383
+ "lineColor": "rgb(31, 120, 193)",
384
+ "show": true
385
+ },
386
+ "tableColumn": "",
387
+ "targets": [
388
+ {
389
+ "expr": "api_all_request_in_processing_total",
390
+ "format": "time_series",
391
+ "intervalFactor": 2,
392
+ "refId": "A",
393
+ "step": 20
394
+ }
395
+ ],
396
+ "thresholds": "",
397
+ "title": "Requests in Processing",
398
+ "type": "singlestat",
399
+ "valueFontSize": "80%",
400
+ "valueMaps": [
401
+ {
402
+ "op": "=",
403
+ "text": "N/A",
404
+ "value": "null"
405
+ }
406
+ ],
407
+ "valueName": "current"
408
+ },
409
+ {
410
+ "cacheTimeout": null,
411
+ "colorBackground": false,
412
+ "colorValue": false,
413
+ "colors": [
414
+ "rgba(50, 172, 45, 0.97)",
415
+ "rgba(237, 129, 40, 0.89)",
416
+ "rgba(245, 54, 54, 0.9)"
417
+ ],
418
+ "datasource": "${DS_PROMETHEUS}",
419
+ "fieldConfig": {
420
+ "defaults": {
421
+ "custom": {}
422
+ },
423
+ "overrides": []
424
+ },
425
+ "format": "none",
426
+ "gauge": {
427
+ "maxValue": 100,
428
+ "minValue": 0,
429
+ "show": true,
430
+ "thresholdLabels": false,
431
+ "thresholdMarkers": true
432
+ },
433
+ "gridPos": {
434
+ "h": 5,
435
+ "w": 4,
436
+ "x": 16,
437
+ "y": 0
438
+ },
439
+ "id": 6,
440
+ "interval": null,
441
+ "links": [],
442
+ "mappingType": 1,
443
+ "mappingTypes": [
444
+ {
445
+ "name": "value to text",
446
+ "value": 1
447
+ },
448
+ {
449
+ "name": "range to text",
450
+ "value": 2
451
+ }
452
+ ],
453
+ "maxDataPoints": 100,
454
+ "nullPointMode": "connected",
455
+ "nullText": null,
456
+ "postfix": "",
457
+ "postfixFontSize": "50%",
458
+ "prefix": "",
459
+ "prefixFontSize": "50%",
460
+ "rangeMaps": [
461
+ {
462
+ "from": "null",
463
+ "text": "N/A",
464
+ "to": "null"
465
+ }
466
+ ],
467
+ "sparkline": {
468
+ "fillColor": "rgba(31, 118, 189, 0.18)",
469
+ "full": false,
470
+ "lineColor": "rgb(31, 120, 193)",
471
+ "show": true
472
+ },
473
+ "tableColumn": "",
474
+ "targets": [
475
+ {
476
+ "expr": "nodejs_process_cpu_usage_percentage",
477
+ "format": "time_series",
478
+ "intervalFactor": 2,
479
+ "refId": "A",
480
+ "step": 20
481
+ }
482
+ ],
483
+ "thresholds": "5,10,20",
484
+ "title": "CPU %",
485
+ "type": "singlestat",
486
+ "valueFontSize": "80%",
487
+ "valueMaps": [
488
+ {
489
+ "op": "=",
490
+ "text": "N/A",
491
+ "value": "null"
492
+ }
493
+ ],
494
+ "valueName": "current"
495
+ },
496
+ {
497
+ "cacheTimeout": null,
498
+ "colorBackground": false,
499
+ "colorValue": false,
500
+ "colors": [
501
+ "rgba(245, 54, 54, 0.9)",
502
+ "rgba(237, 129, 40, 0.89)",
503
+ "rgba(50, 172, 45, 0.97)"
504
+ ],
505
+ "datasource": "${DS_PROMETHEUS}",
506
+ "description": "",
507
+ "fieldConfig": {
508
+ "defaults": {
509
+ "custom": {}
510
+ },
511
+ "overrides": []
512
+ },
513
+ "format": "none",
514
+ "gauge": {
515
+ "maxValue": 100,
516
+ "minValue": 0,
517
+ "show": false,
518
+ "thresholdLabels": false,
519
+ "thresholdMarkers": true
520
+ },
521
+ "gridPos": {
522
+ "h": 5,
523
+ "w": 4,
524
+ "x": 20,
525
+ "y": 0
526
+ },
527
+ "id": 5,
528
+ "interval": null,
529
+ "links": [],
530
+ "mappingType": 1,
531
+ "mappingTypes": [
532
+ {
533
+ "name": "value to text",
534
+ "value": 1
535
+ },
536
+ {
537
+ "name": "range to text",
538
+ "value": 2
539
+ }
540
+ ],
541
+ "maxDataPoints": 100,
542
+ "nullPointMode": "connected",
543
+ "nullText": null,
544
+ "postfix": "",
545
+ "postfixFontSize": "50%",
546
+ "prefix": "",
547
+ "prefixFontSize": "50%",
548
+ "rangeMaps": [
549
+ {
550
+ "from": "null",
551
+ "text": "N/A",
552
+ "to": "null"
553
+ }
554
+ ],
555
+ "sparkline": {
556
+ "fillColor": "rgba(31, 118, 189, 0.18)",
557
+ "full": false,
558
+ "lineColor": "rgb(31, 120, 193)",
559
+ "show": true
560
+ },
561
+ "tableColumn": "",
562
+ "targets": [
563
+ {
564
+ "expr": "(nodejs_process_memory_heap_used_bytes)/1048576",
565
+ "format": "time_series",
566
+ "intervalFactor": 2,
567
+ "refId": "A",
568
+ "step": 20
569
+ }
570
+ ],
571
+ "thresholds": "",
572
+ "title": "Heap Used, Mb",
573
+ "type": "singlestat",
574
+ "valueFontSize": "80%",
575
+ "valueMaps": [
576
+ {
577
+ "op": "=",
578
+ "text": "N/A",
579
+ "value": "null"
580
+ }
581
+ ],
582
+ "valueName": "current"
583
+ },
584
+ {
585
+ "aliasColors": {},
586
+ "bars": false,
587
+ "dashLength": 10,
588
+ "dashes": false,
589
+ "datasource": "${DS_PROMETHEUS}",
590
+ "fieldConfig": {
591
+ "defaults": {
592
+ "custom": {}
593
+ },
594
+ "overrides": []
595
+ },
596
+ "fill": 1,
597
+ "fillGradient": 0,
598
+ "gridPos": {
599
+ "h": 7,
600
+ "w": 12,
601
+ "x": 0,
602
+ "y": 5
603
+ },
604
+ "hiddenSeries": false,
605
+ "id": 7,
606
+ "legend": {
607
+ "avg": false,
608
+ "current": false,
609
+ "max": false,
610
+ "min": false,
611
+ "show": true,
612
+ "total": false,
613
+ "values": false
614
+ },
615
+ "lines": true,
616
+ "linewidth": 1,
617
+ "links": [],
618
+ "nullPointMode": "null",
619
+ "options": {
620
+ "alertThreshold": true
621
+ },
622
+ "percentage": false,
623
+ "pluginVersion": "7.2.0",
624
+ "pointradius": 5,
625
+ "points": false,
626
+ "renderer": "flot",
627
+ "seriesOverrides": [],
628
+ "spaceLength": 10,
629
+ "stack": false,
630
+ "steppedLine": false,
631
+ "targets": [
632
+ {
633
+ "expr": "sum (irate(api_request_total[1m]))",
634
+ "format": "time_series",
635
+ "intervalFactor": 4,
636
+ "legendFormat": "Request Rate",
637
+ "refId": "A",
638
+ "step": 4
639
+ },
640
+ {
641
+ "expr": "sum (irate(api_request_total{code=~\"^5..$\"}[1m]))",
642
+ "format": "time_series",
643
+ "interval": "",
644
+ "intervalFactor": 4,
645
+ "legendFormat": "5XX Errors Rate",
646
+ "refId": "B",
647
+ "step": 4
648
+ },
649
+ {
650
+ "expr": "sum (irate(api_request_total{code=~\"^4..$\"}[1m]))",
651
+ "format": "time_series",
652
+ "intervalFactor": 2,
653
+ "legendFormat": "4XX Errors Rate",
654
+ "refId": "C",
655
+ "step": 2
656
+ },
657
+ {
658
+ "expr": "sum (irate(api_request_total{code=~\"^2..$\"}[1m]))",
659
+ "format": "time_series",
660
+ "intervalFactor": 2,
661
+ "legendFormat": "2XX Success Rate",
662
+ "refId": "D",
663
+ "step": 2
664
+ }
665
+ ],
666
+ "thresholds": [],
667
+ "timeFrom": null,
668
+ "timeRegions": [],
669
+ "timeShift": null,
670
+ "title": "Request and Error Rates (per sec)",
671
+ "tooltip": {
672
+ "shared": true,
673
+ "sort": 0,
674
+ "value_type": "individual"
675
+ },
676
+ "type": "graph",
677
+ "xaxis": {
678
+ "buckets": null,
679
+ "mode": "time",
680
+ "name": null,
681
+ "show": true,
682
+ "values": []
683
+ },
684
+ "yaxes": [
685
+ {
686
+ "format": "short",
687
+ "label": null,
688
+ "logBase": 1,
689
+ "max": null,
690
+ "min": null,
691
+ "show": true
692
+ },
693
+ {
694
+ "format": "short",
695
+ "label": null,
696
+ "logBase": 1,
697
+ "max": null,
698
+ "min": null,
699
+ "show": true
700
+ }
701
+ ],
702
+ "yaxis": {
703
+ "align": false,
704
+ "alignLevel": null
705
+ }
706
+ },
707
+ {
708
+ "aliasColors": {},
709
+ "bars": true,
710
+ "dashLength": 10,
711
+ "dashes": false,
712
+ "datasource": "${DS_PROMETHEUS}",
713
+ "fieldConfig": {
714
+ "defaults": {
715
+ "custom": {}
716
+ },
717
+ "overrides": []
718
+ },
719
+ "fill": 1,
720
+ "fillGradient": 0,
721
+ "gridPos": {
722
+ "h": 7,
723
+ "w": 12,
724
+ "x": 12,
725
+ "y": 5
726
+ },
727
+ "hiddenSeries": false,
728
+ "id": 8,
729
+ "legend": {
730
+ "avg": false,
731
+ "current": false,
732
+ "max": false,
733
+ "min": false,
734
+ "show": true,
735
+ "total": false,
736
+ "values": false
737
+ },
738
+ "lines": false,
739
+ "linewidth": 1,
740
+ "links": [],
741
+ "nullPointMode": "null",
742
+ "options": {
743
+ "alertThreshold": true
744
+ },
745
+ "percentage": false,
746
+ "pluginVersion": "7.2.0",
747
+ "pointradius": 5,
748
+ "points": false,
749
+ "renderer": "flot",
750
+ "seriesOverrides": [],
751
+ "spaceLength": 10,
752
+ "stack": true,
753
+ "steppedLine": false,
754
+ "targets": [
755
+ {
756
+ "expr": "sum by(method) (irate(api_request_total[1m]))",
757
+ "format": "time_series",
758
+ "intervalFactor": 10,
759
+ "refId": "A",
760
+ "step": 10
761
+ }
762
+ ],
763
+ "thresholds": [],
764
+ "timeFrom": null,
765
+ "timeRegions": [],
766
+ "timeShift": null,
767
+ "title": "Request rate by Method (per sec)",
768
+ "tooltip": {
769
+ "shared": true,
770
+ "sort": 0,
771
+ "value_type": "individual"
772
+ },
773
+ "type": "graph",
774
+ "xaxis": {
775
+ "buckets": null,
776
+ "mode": "time",
777
+ "name": null,
778
+ "show": true,
779
+ "values": []
780
+ },
781
+ "yaxes": [
782
+ {
783
+ "format": "short",
784
+ "label": null,
785
+ "logBase": 1,
786
+ "max": null,
787
+ "min": null,
788
+ "show": true
789
+ },
790
+ {
791
+ "format": "short",
792
+ "label": null,
793
+ "logBase": 1,
794
+ "max": null,
795
+ "min": null,
796
+ "show": true
797
+ }
798
+ ],
799
+ "yaxis": {
800
+ "align": false,
801
+ "alignLevel": null
802
+ }
803
+ },
804
+ {
805
+ "aliasColors": {},
806
+ "bars": false,
807
+ "dashLength": 10,
808
+ "dashes": false,
809
+ "datasource": "${DS_PROMETHEUS}",
810
+ "fieldConfig": {
811
+ "defaults": {
812
+ "custom": {}
813
+ },
814
+ "overrides": []
815
+ },
816
+ "fill": 1,
817
+ "fillGradient": 0,
818
+ "gridPos": {
819
+ "h": 7,
820
+ "w": 12,
821
+ "x": 0,
822
+ "y": 12
823
+ },
824
+ "hiddenSeries": false,
825
+ "id": 10,
826
+ "legend": {
827
+ "avg": false,
828
+ "current": false,
829
+ "max": false,
830
+ "min": false,
831
+ "show": true,
832
+ "total": false,
833
+ "values": false
834
+ },
835
+ "lines": true,
836
+ "linewidth": 1,
837
+ "links": [],
838
+ "nullPointMode": "null",
839
+ "options": {
840
+ "alertThreshold": true
841
+ },
842
+ "percentage": false,
843
+ "pluginVersion": "7.2.0",
844
+ "pointradius": 5,
845
+ "points": false,
846
+ "renderer": "flot",
847
+ "seriesOverrides": [],
848
+ "spaceLength": 10,
849
+ "stack": false,
850
+ "steppedLine": false,
851
+ "targets": [
852
+ {
853
+ "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]))",
854
+ "format": "time_series",
855
+ "intervalFactor": 2,
856
+ "legendFormat": "",
857
+ "refId": "A",
858
+ "step": 2
859
+ }
860
+ ],
861
+ "thresholds": [],
862
+ "timeFrom": null,
863
+ "timeRegions": [],
864
+ "timeShift": null,
865
+ "title": "Apdex Score: target 25ms, tolerated: 100ms",
866
+ "tooltip": {
867
+ "shared": true,
868
+ "sort": 0,
869
+ "value_type": "individual"
870
+ },
871
+ "type": "graph",
872
+ "xaxis": {
873
+ "buckets": null,
874
+ "mode": "time",
875
+ "name": null,
876
+ "show": true,
877
+ "values": []
878
+ },
879
+ "yaxes": [
880
+ {
881
+ "format": "short",
882
+ "label": null,
883
+ "logBase": 1,
884
+ "max": null,
885
+ "min": null,
886
+ "show": true
887
+ },
888
+ {
889
+ "format": "short",
890
+ "label": null,
891
+ "logBase": 1,
892
+ "max": null,
893
+ "min": null,
894
+ "show": true
895
+ }
896
+ ],
897
+ "yaxis": {
898
+ "align": false,
899
+ "alignLevel": null
900
+ }
901
+ },
902
+ {
903
+ "aliasColors": {},
904
+ "bars": false,
905
+ "dashLength": 10,
906
+ "dashes": false,
907
+ "datasource": "${DS_PROMETHEUS}",
908
+ "fieldConfig": {
909
+ "defaults": {
910
+ "custom": {}
911
+ },
912
+ "overrides": []
913
+ },
914
+ "fill": 1,
915
+ "fillGradient": 0,
916
+ "gridPos": {
917
+ "h": 7,
918
+ "w": 12,
919
+ "x": 12,
920
+ "y": 12
921
+ },
922
+ "hiddenSeries": false,
923
+ "id": 9,
924
+ "legend": {
925
+ "alignAsTable": false,
926
+ "avg": false,
927
+ "current": false,
928
+ "max": false,
929
+ "min": false,
930
+ "rightSide": false,
931
+ "show": true,
932
+ "total": false,
933
+ "values": false
934
+ },
935
+ "lines": true,
936
+ "linewidth": 1,
937
+ "links": [],
938
+ "nullPointMode": "null",
939
+ "options": {
940
+ "alertThreshold": true
941
+ },
942
+ "percentage": true,
943
+ "pluginVersion": "7.2.0",
944
+ "pointradius": 5,
945
+ "points": false,
946
+ "renderer": "flot",
947
+ "seriesOverrides": [],
948
+ "spaceLength": 10,
949
+ "stack": false,
950
+ "steppedLine": false,
951
+ "targets": [
952
+ {
953
+ "expr": "( sum(irate(api_request_duration_milliseconds_bucket{le=\"5\"}[1m])) / sum(irate(api_request_duration_milliseconds_count[1m])) ) * 100",
954
+ "format": "time_series",
955
+ "intervalFactor": 2,
956
+ "legendFormat": "Duration < 5ms (%)",
957
+ "refId": "A",
958
+ "step": 2
959
+ },
960
+ {
961
+ "expr": "( sum(irate(api_request_duration_milliseconds_bucket{le=\"10\"}[1m])) / sum(irate(api_request_duration_milliseconds_count[1m])) ) * 100",
962
+ "format": "time_series",
963
+ "intervalFactor": 2,
964
+ "legendFormat": "Duration < 10ms (%)",
965
+ "refId": "B",
966
+ "step": 2
967
+ },
968
+ {
969
+ "expr": "( sum(irate(api_request_duration_milliseconds_bucket{le=\"50\"}[1m])) / sum(irate(api_request_duration_milliseconds_count[1m])) ) * 100",
970
+ "format": "time_series",
971
+ "intervalFactor": 2,
972
+ "legendFormat": "Duration < 50ms (%)",
973
+ "refId": "C",
974
+ "step": 2
975
+ },
976
+ {
977
+ "expr": "( sum(irate(api_request_duration_milliseconds_bucket{le=\"100\"}[1m])) / sum(irate(api_request_duration_milliseconds_count[1m])) ) * 100",
978
+ "format": "time_series",
979
+ "intervalFactor": 2,
980
+ "legendFormat": "Duration < 100ms (%)",
981
+ "refId": "D",
982
+ "step": 2
983
+ }
984
+ ],
985
+ "thresholds": [],
986
+ "timeFrom": null,
987
+ "timeRegions": [],
988
+ "timeShift": null,
989
+ "title": "Request Duration (%)",
990
+ "tooltip": {
991
+ "shared": true,
992
+ "sort": 0,
993
+ "value_type": "individual"
994
+ },
995
+ "type": "graph",
996
+ "xaxis": {
997
+ "buckets": null,
998
+ "mode": "time",
999
+ "name": null,
1000
+ "show": true,
1001
+ "values": []
1002
+ },
1003
+ "yaxes": [
1004
+ {
1005
+ "format": "short",
1006
+ "label": null,
1007
+ "logBase": 1,
1008
+ "max": null,
1009
+ "min": null,
1010
+ "show": true
1011
+ },
1012
+ {
1013
+ "format": "short",
1014
+ "label": null,
1015
+ "logBase": 1,
1016
+ "max": null,
1017
+ "min": null,
1018
+ "show": true
1019
+ }
1020
+ ],
1021
+ "yaxis": {
1022
+ "align": false,
1023
+ "alignLevel": null
1024
+ }
1025
+ },
1026
+ {
1027
+ "aliasColors": {},
1028
+ "bars": false,
1029
+ "dashLength": 10,
1030
+ "dashes": false,
1031
+ "datasource": "${DS_PROMETHEUS}",
1032
+ "fieldConfig": {
1033
+ "defaults": {
1034
+ "custom": {}
1035
+ },
1036
+ "overrides": []
1037
+ },
1038
+ "fill": 1,
1039
+ "fillGradient": 0,
1040
+ "gridPos": {
1041
+ "h": 7,
1042
+ "w": 12,
1043
+ "x": 0,
1044
+ "y": 19
1045
+ },
1046
+ "hiddenSeries": false,
1047
+ "id": 11,
1048
+ "legend": {
1049
+ "avg": false,
1050
+ "current": false,
1051
+ "max": false,
1052
+ "min": false,
1053
+ "show": true,
1054
+ "total": false,
1055
+ "values": false
1056
+ },
1057
+ "lines": true,
1058
+ "linewidth": 1,
1059
+ "links": [],
1060
+ "nullPointMode": "null",
1061
+ "options": {
1062
+ "alertThreshold": true
1063
+ },
1064
+ "percentage": false,
1065
+ "pluginVersion": "7.2.0",
1066
+ "pointradius": 5,
1067
+ "points": false,
1068
+ "renderer": "flot",
1069
+ "seriesOverrides": [],
1070
+ "spaceLength": 10,
1071
+ "stack": false,
1072
+ "steppedLine": false,
1073
+ "targets": [
1074
+ {
1075
+ "expr": "topk(3, sum(irate(api_request_total[1m])) by (path))",
1076
+ "format": "time_series",
1077
+ "intervalFactor": 2,
1078
+ "legendFormat": "",
1079
+ "refId": "A",
1080
+ "step": 2
1081
+ }
1082
+ ],
1083
+ "thresholds": [],
1084
+ "timeFrom": null,
1085
+ "timeRegions": [],
1086
+ "timeShift": null,
1087
+ "title": "Top 3 API calls (by path)",
1088
+ "tooltip": {
1089
+ "shared": true,
1090
+ "sort": 0,
1091
+ "value_type": "individual"
1092
+ },
1093
+ "transparent": true,
1094
+ "type": "graph",
1095
+ "xaxis": {
1096
+ "buckets": null,
1097
+ "mode": "time",
1098
+ "name": null,
1099
+ "show": true,
1100
+ "values": []
1101
+ },
1102
+ "yaxes": [
1103
+ {
1104
+ "format": "short",
1105
+ "label": null,
1106
+ "logBase": 1,
1107
+ "max": null,
1108
+ "min": null,
1109
+ "show": true
1110
+ },
1111
+ {
1112
+ "format": "short",
1113
+ "label": null,
1114
+ "logBase": 1,
1115
+ "max": null,
1116
+ "min": null,
1117
+ "show": true
1118
+ }
1119
+ ],
1120
+ "yaxis": {
1121
+ "align": false,
1122
+ "alignLevel": null
1123
+ }
1124
+ },
1125
+ {
1126
+ "aliasColors": {},
1127
+ "bars": true,
1128
+ "dashLength": 10,
1129
+ "dashes": false,
1130
+ "datasource": "${DS_PROMETHEUS}",
1131
+ "fieldConfig": {
1132
+ "defaults": {
1133
+ "custom": {}
1134
+ },
1135
+ "overrides": []
1136
+ },
1137
+ "fill": 1,
1138
+ "fillGradient": 0,
1139
+ "gridPos": {
1140
+ "h": 7,
1141
+ "w": 12,
1142
+ "x": 12,
1143
+ "y": 19
1144
+ },
1145
+ "hiddenSeries": false,
1146
+ "id": 12,
1147
+ "legend": {
1148
+ "alignAsTable": false,
1149
+ "avg": false,
1150
+ "current": false,
1151
+ "hideEmpty": false,
1152
+ "hideZero": false,
1153
+ "max": false,
1154
+ "min": false,
1155
+ "rightSide": false,
1156
+ "show": true,
1157
+ "total": false,
1158
+ "values": false
1159
+ },
1160
+ "lines": false,
1161
+ "linewidth": 1,
1162
+ "links": [],
1163
+ "nullPointMode": "null",
1164
+ "options": {
1165
+ "alertThreshold": true
1166
+ },
1167
+ "percentage": false,
1168
+ "pluginVersion": "7.2.0",
1169
+ "pointradius": 5,
1170
+ "points": false,
1171
+ "renderer": "flot",
1172
+ "seriesOverrides": [],
1173
+ "spaceLength": 10,
1174
+ "stack": true,
1175
+ "steppedLine": false,
1176
+ "targets": [
1177
+ {
1178
+ "expr": "topk(3, sum(irate(api_request_total{code=~\"^5..$\"}[1m])) by (path))",
1179
+ "format": "time_series",
1180
+ "intervalFactor": 2,
1181
+ "legendFormat": "",
1182
+ "refId": "A",
1183
+ "step": 2
1184
+ }
1185
+ ],
1186
+ "thresholds": [],
1187
+ "timeFrom": null,
1188
+ "timeRegions": [],
1189
+ "timeShift": null,
1190
+ "title": "Top 3 API Error Calls ( 5XX, by path)",
1191
+ "tooltip": {
1192
+ "shared": true,
1193
+ "sort": 0,
1194
+ "value_type": "individual"
1195
+ },
1196
+ "transparent": true,
1197
+ "type": "graph",
1198
+ "xaxis": {
1199
+ "buckets": null,
1200
+ "mode": "time",
1201
+ "name": null,
1202
+ "show": true,
1203
+ "values": []
1204
+ },
1205
+ "yaxes": [
1206
+ {
1207
+ "format": "short",
1208
+ "label": null,
1209
+ "logBase": 1,
1210
+ "max": null,
1211
+ "min": null,
1212
+ "show": true
1213
+ },
1214
+ {
1215
+ "format": "short",
1216
+ "label": null,
1217
+ "logBase": 1,
1218
+ "max": null,
1219
+ "min": null,
1220
+ "show": true
1221
+ }
1222
+ ],
1223
+ "yaxis": {
1224
+ "align": false,
1225
+ "alignLevel": null
1226
+ }
1227
+ }
1228
+ ],
1229
+ "refresh": "10s",
1230
+ "schemaVersion": 26,
1231
+ "style": "dark",
1232
+ "tags": [],
1233
+ "templating": {
1234
+ "list": []
1235
+ },
1236
+ "time": {
1237
+ "from": "now-15m",
1238
+ "to": "now"
1239
+ },
1240
+ "timepicker": {
1241
+ "refresh_intervals": [
1242
+ "5s",
1243
+ "10s",
1244
+ "30s",
1245
+ "1m",
1246
+ "5m",
1247
+ "15m",
1248
+ "30m",
1249
+ "1h",
1250
+ "2h",
1251
+ "1d"
1252
+ ],
1253
+ "time_options": [
1254
+ "5m",
1255
+ "15m",
1256
+ "1h",
1257
+ "6h",
1258
+ "12h",
1259
+ "24h",
1260
+ "2d",
1261
+ "7d",
1262
+ "30d"
1263
+ ]
1264
+ },
1265
+ "timezone": "",
1266
+ "title": "swagger-stats dashboard v3",
1267
+ "uid": "IcqsUmcGz",
1268
+ "version": 3
1269
+ }