Welcome to mirror list, hosted at ThFree Co, Russian Federation.

template_app_gitlab_http.yaml « gitlab_http « app « templates - github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: bf9907d41903c80412f54a4e750f79d8296b3e29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
zabbix_export:
  version: '6.4'
  date: '2022-10-25T10:16:23Z'
  template_groups:
    -
      uuid: a571c0d144b14fd4a87a9d9b2aa9fcd6
      name: Templates/Applications
  templates:
    -
      uuid: f445dac89ff74deabaae9dcb84815998
      template: 'GitLab by HTTP'
      name: 'GitLab by HTTP'
      description: |
        Get GitLab metrics by HTTP agent from Prometheus metrics endpoint.
        
        To access the metrics, the client IP address must be explicitly allowed. See https://docs.gitlab.com/ee/administration/monitoring/ip_whitelist.html.
        Or second method, using token variable from http://your.gitlab.address/admin/health_check (fill {$GITLAB.HEALTH.TOKEN} macro with variable path like "?token=your_token").
        Don't forget change macros {$GITLAB.URL}.
        Some metrics may not be collected depending on your Gitlab instance version and configuration. See (Gitlab's documentation[)https://docs.gitlab.com/ee/administration/monitoring/prometheus/gitlab_metrics.html] for further information about its metric collection.
        
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback
        
        Template tooling version used: 0.42
      groups:
        -
          name: Templates/Applications
      items:
        -
          uuid: 43a26551b0a6460cac3c43138ec5fd33
          name: 'GitLab: Cache: Misses rate, total'
          type: DEPENDENT
          key: gitlab.cache.misses_total.rate
          delay: '0'
          history: 7d
          value_type: FLOAT
          description: 'The cache read miss count.'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - '$[?(@.name=="gitlab_cache_misses_total")].value.sum()'
            -
              type: CHANGE_PER_SECOND
              parameters:
                - ''
          master_item:
            key: gitlab.get_metrics
          tags:
            -
              tag: component
              value: cache
        -
          uuid: 9c507412d4544a37bdad49ba47c48302
          name: 'GitLab: Cache: Operations rate, total'
          type: DEPENDENT
          key: gitlab.cache.operations_total.rate
          delay: '0'
          history: 7d
          value_type: FLOAT
          description: 'The count of cache operations.'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - '$[?(@.name=="gitlab_cache_operations_total")].value.sum()'
            -
              type: CHANGE_PER_SECOND
              parameters:
                - ''
          master_item:
            key: gitlab.get_metrics
          tags:
            -
              tag: component
              value: cache
        -
          uuid: 2d46dc855ca741839cfe1a19e0dc892f
          name: 'GitLab: Database: Connection pool, busy'
          type: DEPENDENT
          key: gitlab.database.connection_pool_busy
          delay: '0'
          history: 7d
          description: 'Connections to the main database in use where the owner is still alive.'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - '$[?(@.name=="gitlab_database_connection_pool_busy" && @.labels.class == "ActiveRecord::Base")].value.sum()'
          master_item:
            key: gitlab.get_metrics
          tags:
            -
              tag: component
              value: database
        -
          uuid: 6ee7a1d3ab20463d83602b751381d821
          name: 'GitLab: Database: Connection pool, current'
          type: DEPENDENT
          key: gitlab.database.connection_pool_connections
          delay: '0'
          history: 7d
          description: 'Current connections to the main database in the pool.'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - '$[?(@.name=="gitlab_database_connection_pool_connections" && @.labels.class == "ActiveRecord::Base")].value.sum()'
          master_item:
            key: gitlab.get_metrics
          tags:
            -
              tag: component
              value: database
        -
          uuid: 561a1f54c98d4a2b828fe644961404be
          name: 'GitLab: Database: Connection pool, dead'
          type: DEPENDENT
          key: gitlab.database.connection_pool_dead
          delay: '0'
          history: 7d
          description: 'Connections to the main database in use where the owner is not alive.'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - '$[?(@.name=="gitlab_database_connection_pool_dead" && @.labels.class == "ActiveRecord::Base")].value.sum()'
          master_item:
            key: gitlab.get_metrics
          tags:
            -
              tag: component
              value: database
        -
          uuid: 3a0b5c8de88b41fa9ebf6f3fca63833e
          name: 'GitLab: Database: Connection pool, idle'
          type: DEPENDENT
          key: gitlab.database.connection_pool_idle
          delay: '0'
          history: 7d
          description: 'Connections to the main database not in use.'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - '$[?(@.name=="gitlab_database_connection_pool_idle" && @.labels.class == "ActiveRecord::Base")].value.sum()'
          master_item:
            key: gitlab.get_metrics
          tags:
            -
              tag: component
              value: database
        -
          uuid: fd1458232de34981a9a00be820e123f1
          name: 'GitLab: Database: Connection pool, size'
          type: DEPENDENT
          key: gitlab.database.connection_pool_size
          delay: '0'
          history: 7d
          description: 'Total connection to the main database pool capacity.'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - '$[?(@.name=="gitlab_database_connection_pool_size" && @.labels.class == "ActiveRecord::Base")].value.sum()'
          master_item:
            key: gitlab.get_metrics
          tags:
            -
              tag: component
              value: database
        -
          uuid: 501a2f646ced4207a32a24e900310440
          name: 'GitLab: Database: Connection pool, waiting'
          type: DEPENDENT
          key: gitlab.database.connection_pool_waiting
          delay: '0'
          history: 7d
          description: 'Threads currently waiting on this queue.'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - '$[?(@.name=="gitlab_database_connection_pool_waiting" && @.labels.class == "ActiveRecord::Base")].value.sum()'
          master_item:
            key: gitlab.get_metrics
          tags:
            -
              tag: component
              value: database
        -
          uuid: 71a5f82d11914b12a86008bfd488fb1e
          name: 'GitLab: Version'
          type: DEPENDENT
          key: gitlab.deployments.version
          delay: '0'
          history: 7d
          trends: '0'
          value_type: CHAR
          description: 'Version of the GitLab instance.'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - '$[?(@.name=="deployments")].labels.version.first()'
            -
              type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
          master_item:
            key: gitlab.get_metrics
          tags:
            -
              tag: component
              value: application
          triggers:
            -
              uuid: 88d7ceb3a683436da666e8802b2d29b5
              expression: 'last(/GitLab by HTTP/gitlab.deployments.version,#1)<>last(/GitLab by HTTP/gitlab.deployments.version,#2) and length(last(/GitLab by HTTP/gitlab.deployments.version))>0'
              name: 'GitLab: Version has changed'
              event_name: 'GitLab: Version has changed (new version: {ITEM.VALUE})'
              priority: INFO
              description: 'The GitLab version has changed. Perform Ack to close.'
              manual_close: 'YES'
              tags:
                -
                  tag: scope
                  value: notice
        -
          uuid: 3e409938aba24445a11012bcbf8aa113
          name: 'GitLab: User CAPTCHA logins failed, total'
          type: DEPENDENT
          key: gitlab.failed_login_captcha_total
          delay: '0'
          history: 7d
          description: 'Counter of failed CAPTCHA attempts during login.'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - '$[?(@.name=="failed_login_captcha_total")].value.first()'
              error_handler: DISCARD_VALUE
          master_item:
            key: gitlab.get_metrics
          tags:
            -
              tag: component
              value: sessions
        -
          uuid: 2aa509b84dc14026b8ff8ed473add2d2
          name: 'GitLab: Get instance metrics'
          type: HTTP_AGENT
          key: gitlab.get_metrics
          history: '0'
          trends: '0'
          value_type: TEXT
          preprocessing:
            -
              type: CHECK_NOT_SUPPORTED
              parameters:
                - ''
            -
              type: PROMETHEUS_TO_JSON
              parameters:
                - ''
          url: '{$GITLAB.URL}/-/metrics{$GITLAB.HEALTH.TOKEN}'
          tags:
            -
              tag: component
              value: raw
        -
          uuid: 3ff4d9793af94d339ca225aaf9200554
          name: 'GitLab: HTTP requests rate, 4xx'
          type: DEPENDENT
          key: gitlab.http.requests.4xx.rate
          delay: '0'
          history: 7d
          value_type: FLOAT
          units: rps
          description: 'Number of handle failures of requests with code 4XX.'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - '$[?(@.name=="http_requests_total" && @.labels.status =~ ''4..'' )].value.sum()'
              error_handler: DISCARD_VALUE
            -
              type: CHANGE_PER_SECOND
              parameters:
                - ''
          master_item:
            key: gitlab.get_metrics
          tags:
            -
              tag: component
              value: requests
            -
              tag: http-code
              value: 4xx
        -
          uuid: d0fa18012d6a4b0ba6620b0ef6cb9aef
          name: 'GitLab: HTTP requests rate, 5xx'
          type: DEPENDENT
          key: gitlab.http.requests.5xx.rate
          delay: '0'
          history: 7d
          value_type: FLOAT
          units: rps
          description: 'Number of handle failures of requests with HTTP-code 5xx.'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - '$[?(@.name=="http_requests_total" && @.labels.status =~ ''5..'' )].value.sum()'
              error_handler: DISCARD_VALUE
            -
              type: CHANGE_PER_SECOND
              parameters:
                - ''
          master_item:
            key: gitlab.get_metrics
          tags:
            -
              tag: component
              value: requests
            -
              tag: http-code
              value: 5xx
          triggers:
            -
              uuid: 7021e3b0b49a4990a1d8ce356b7ae130
              expression: 'min(/GitLab by HTTP/gitlab.http.requests.5xx.rate,5m)>{$GITLAB.HTTP.FAIL.MAX.WARN}'
              name: 'GitLab: Too many HTTP requests failures'
              event_name: 'GitLab: Too many HTTP requests failures (over {$GITLAB.HTTP.FAIL.MAX.WARN} for 5m)'''
              priority: WARNING
              description: '"Too many requests failed on GitLab instance with 5xx HTTP code"'
              tags:
                -
                  tag: scope
                  value: availability
        -
          uuid: 2d739e4bedb24b50ab6adfdfdeb39da9
          name: 'GitLab: HTTP requests rate, total'
          type: DEPENDENT
          key: gitlab.http.requests.rate
          delay: '0'
          history: 7d
          value_type: FLOAT
          units: rps
          description: 'Number of requests received into the system.'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - '$[?(@.name=="http_requests_total")].value.sum()'
            -
              type: CHANGE_PER_SECOND
              parameters:
                - ''
          master_item:
            key: gitlab.get_metrics
          tags:
            -
              tag: component
              value: requests
        -
          uuid: c48920e302ff4b9ab16f45b67775b440
          name: 'GitLab: Application server status'
          type: HTTP_AGENT
          key: gitlab.liveness
          history: 7d
          description: 'Checks whether the application server is running. This probe is used to know if Rails Controllers are not deadlocked due to a multi-threading.'
          valuemap:
            name: 'GitLab healthcheck'
          preprocessing:
            -
              type: CHECK_NOT_SUPPORTED
              parameters:
                - ''
              error_handler: CUSTOM_VALUE
              error_handler_params: '{"status": "failed"}'
            -
              type: JSONPATH
              parameters:
                - $.status
            -
              type: BOOL_TO_DECIMAL
              parameters:
                - ''
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
            -
              type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 30m
          url: '{$GITLAB.URL}/-/liveness{$GITLAB.HEALTH.TOKEN}'
          tags:
            -
              tag: component
              value: health
          triggers:
            -
              uuid: 2f1eb8d6c89a4d8cbda0e951d3f6a109
              expression: 'last(/GitLab by HTTP/gitlab.liveness)=0'
              name: 'GitLab: Liveness check was failed'
              priority: HIGH
              description: 'The application server is not running or Rails Controllers are deadlocked.'
              tags:
                -
                  tag: scope
                  value: availability
        -
          uuid: 7ef7142babfd4bc2b5b25be541c0511f
          name: 'GitLab: Pipelines: Auto DevOps pipelines, total'
          type: DEPENDENT
          key: gitlab.pipeline.auto_devops_completed.total
          delay: '0'
          history: 7d
          description: 'Counter of completed Auto DevOps pipelines.'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - '$[?(@.name=="auto_devops_pipelines_completed_total")].value.sum()'
              error_handler: DISCARD_VALUE
          master_item:
            key: gitlab.get_metrics
          tags:
            -
              tag: component
              value: pipelines
        -
          uuid: 0ffa0a5c108644508252a03469e4f394
          name: 'GitLab: Pipelines: Auto DevOps pipelines, failed'
          type: DEPENDENT
          key: gitlab.pipeline.auto_devops_completed_total.failed
          delay: '0'
          history: 7d
          description: 'Counter of completed Auto DevOps pipelines with status "failed".'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - '$[?(@.name=="auto_devops_pipelines_completed_total" && @.labels.status == "failed")].value.sum()'
              error_handler: DISCARD_VALUE
          master_item:
            key: gitlab.get_metrics
          tags:
            -
              tag: component
              value: pipelines
        -
          uuid: f4265a3167a245c4998958106f6ee265
          name: 'GitLab: Pipelines: Created, total'
          type: DEPENDENT
          key: gitlab.pipeline.created_total
          delay: '0'
          history: 7d
          description: 'Counter of pipelines created.'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - '$[?(@.name=="pipelines_created_total")].value.sum()'
              error_handler: DISCARD_VALUE
          master_item:
            key: gitlab.get_metrics
          tags:
            -
              tag: component
              value: pipelines
        -
          uuid: 23cb22f8f81e461c86f72a92cdfde7a5
          name: 'GitLab: Pipelines: CI/CD creation duration'
          type: DEPENDENT
          key: gitlab.pipeline.pipeline_creation
          delay: '0'
          history: 7d
          value_type: FLOAT
          units: s
          description: 'The sum of the time in seconds it takes to create a CI/CD pipeline.'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - '$[?(@.name=="gitlab_ci_pipeline_creation_duration_seconds_sum")].value.first()'
              error_handler: DISCARD_VALUE
          master_item:
            key: gitlab.get_metrics
          tags:
            -
              tag: component
              value: pipelines
        -
          uuid: 91c3acbb82524244a1ac400587641ffa
          name: 'GitLab: Pipelines: Pipelines: CI/CD creation count'
          type: DEPENDENT
          key: gitlab.pipeline.pipeline_creation.count
          delay: '0'
          history: 7d
          value_type: FLOAT
          description: 'The count of the time it takes to create a CI/CD pipeline.'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - '$[?(@.name=="gitlab_ci_pipeline_creation_duration_seconds_count")].value.first()'
              error_handler: DISCARD_VALUE
          master_item:
            key: gitlab.get_metrics
          tags:
            -
              tag: component
              value: pipelines
        -
          uuid: c80453c338814951a9e97d9f37e7d68f
          name: 'GitLab: Pipelines: Processing events, total'
          type: DEPENDENT
          key: gitlab.pipeline.processing_events_total
          delay: '0'
          history: 7d
          description: 'Total amount of pipeline processing events.'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - '$[?(@.name=="gitlab_ci_pipeline_processing_events_total")].value.first()'
              error_handler: DISCARD_VALUE
          master_item:
            key: gitlab.get_metrics
          tags:
            -
              tag: component
              value: pipelines
        -
          uuid: 794a8d7f474d490c96e714dac810140d
          name: 'GitLab: Instance readiness check'
          type: HTTP_AGENT
          key: gitlab.readiness
          history: 7d
          description: 'The readiness probe checks whether the GitLab instance is ready to accept traffic via Rails Controllers.'
          valuemap:
            name: 'GitLab healthcheck'
          preprocessing:
            -
              type: CHECK_NOT_SUPPORTED
              parameters:
                - ''
              error_handler: CUSTOM_VALUE
              error_handler_params: '{"master_check":[{"status":"failed"}]}'
            -
              type: JSONPATH
              parameters:
                - '$.master_check[0].status'
            -
              type: BOOL_TO_DECIMAL
              parameters:
                - ''
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
            -
              type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 30m
          url: '{$GITLAB.URL}/-/readiness{$GITLAB.HEALTH.TOKEN}'
          tags:
            -
              tag: component
              value: health
          triggers:
            -
              uuid: 11ff325698534dcd8bbaa12c86704069
              expression: 'last(/GitLab by HTTP/gitlab.readiness)=0'
              name: 'GitLab: Gitlab instance is not able to accept traffic'
              priority: HIGH
              dependencies:
                -
                  name: 'GitLab: Liveness check was failed'
                  expression: 'last(/GitLab by HTTP/gitlab.liveness)=0'
              tags:
                -
                  tag: scope
                  value: availability
        -
          uuid: 173b8d5e108f471fbf4c1267dcb9cc37
          name: 'GitLab: Redis: Client exceptions rate, cache'
          type: DEPENDENT
          key: gitlab.redis.client_exceptions.cache.rate
          delay: '0'
          history: 7d
          value_type: FLOAT
          description: 'Number of Redis client exceptions per second. (Instance: cache)'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - '$[?(@.name=="gitlab_redis_client_exceptions_total" && @.labels.storage == "cache")].value.first()'
              error_handler: DISCARD_VALUE
            -
              type: CHANGE_PER_SECOND
              parameters:
                - ''
          master_item:
            key: gitlab.get_metrics
          tags:
            -
              tag: component
              value: redis
          triggers:
            -
              uuid: a7e460f174fd4e16b2358fd3867390b4
              expression: 'min(/GitLab by HTTP/gitlab.redis.client_exceptions.cache.rate,5m)>{$GITLAB.REDIS.FAIL.MAX.WARN}'
              name: 'GitLab: Too many Redis cache client exceptions'
              event_name: 'GitLab: Too many Redis cache client exceptions (over {$GITLAB.REDIS.FAIL.MAX.WARN} for 5m)'
              priority: WARNING
              description: '"Too many  Redis client exceptions during the requests to  Redis instance cache."'
              tags:
                -
                  tag: scope
                  value: availability
        -
          uuid: 0bff591252dc4cc497527afb1f7d96b2
          name: 'GitLab: Redis: Client exceptions rate, queues'
          type: DEPENDENT
          key: gitlab.redis.client_exceptions.queues.rate
          delay: '0'
          history: 7d
          value_type: FLOAT
          description: 'Number of Redis client exceptions per second. (Instance: queues)'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - '$[?(@.name=="gitlab_redis_client_exceptions_total" && @.labels.storage == "queues")].value.first()'
              error_handler: DISCARD_VALUE
            -
              type: CHANGE_PER_SECOND
              parameters:
                - ''
          master_item:
            key: gitlab.get_metrics
          tags:
            -
              tag: component
              value: redis
          triggers:
            -
              uuid: 36ec79901f324f27992ea68274eedb71
              expression: 'min(/GitLab by HTTP/gitlab.redis.client_exceptions.queues.rate,5m)>{$GITLAB.REDIS.FAIL.MAX.WARN}'
              name: 'GitLab: Too many Redis queues client exceptions'
              event_name: 'GitLab: Too many Redis queues client exceptions (over {$GITLAB.REDIS.FAIL.MAX.WARN} for 5m)'
              priority: WARNING
              description: '"Too many  Redis client exceptions during the requests to  Redis instance queues."'
              tags:
                -
                  tag: scope
                  value: availability
        -
          uuid: 800b429ea1d044e6a685bc51706f8547
          name: 'GitLab: Redis: client exceptions rate, shared_state'
          type: DEPENDENT
          key: gitlab.redis.client_exceptions.shared_state.rate
          delay: '0'
          history: 7d
          value_type: FLOAT
          description: 'Number of Redis client exceptions per second. (Instance: shared_state)'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - '$[?(@.name=="gitlab_redis_client_exceptions_total" && @.labels.storage == "shared_state")].value.first()'
              error_handler: DISCARD_VALUE
            -
              type: CHANGE_PER_SECOND
              parameters:
                - ''
          master_item:
            key: gitlab.get_metrics
          tags:
            -
              tag: component
              value: redis
          triggers:
            -
              uuid: b475d6ecbc564f9b8f7fe9b24bcdf013
              expression: 'min(/GitLab by HTTP/gitlab.redis.client_exceptions.shared_state.rate,5m)>{$GITLAB.REDIS.FAIL.MAX.WARN}'
              name: 'GitLab: Too many Redis shared_state client exceptions'
              event_name: 'GitLab: Too many Redis shared_state client exceptions (over {$GITLAB.REDIS.FAIL.MAX.WARN} for 5m)'
              priority: WARNING
              description: '"Too many  Redis client exceptions during the requests to  Redis instance shared_state."'
              tags:
                -
                  tag: scope
                  value: availability
        -
          uuid: 7dcc638e1c174dd5975f85551211a3ba
          name: 'GitLab: Redis: Client requests rate, cache'
          type: DEPENDENT
          key: gitlab.redis.client_requests.cache.rate
          delay: '0'
          history: 7d
          value_type: FLOAT
          units: rps
          description: 'Number of Redis client requests per second. (Instance: cache)'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - '$[?(@.name=="gitlab_redis_client_requests_total" && @.labels.storage == "cache")].value.first()'
              error_handler: DISCARD_VALUE
            -
              type: CHANGE_PER_SECOND
              parameters:
                - ''
          master_item:
            key: gitlab.get_metrics
          tags:
            -
              tag: component
              value: redis
        -
          uuid: f613303925db46958d181c379e22f942
          name: 'GitLab: Redis: Client requests rate, queues'
          type: DEPENDENT
          key: gitlab.redis.client_requests.queues.rate
          delay: '0'
          history: 7d
          value_type: FLOAT
          units: rps
          description: 'Number of Redis client requests per second. (Instance: queues)'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - '$[?(@.name=="gitlab_redis_client_requests_total" && @.labels.storage == "queues")].value.first()'
              error_handler: DISCARD_VALUE
            -
              type: CHANGE_PER_SECOND
              parameters:
                - ''
          master_item:
            key: gitlab.get_metrics
          tags:
            -
              tag: component
              value: redis
        -
          uuid: 3ae46654b46e4c769a7308879bc64890
          name: 'GitLab: Redis: Client requests rate, shared_state'
          type: DEPENDENT
          key: gitlab.redis.client_requests.shared_state.rate
          delay: '0'
          history: 7d
          value_type: FLOAT
          units: rps
          description: 'Number of Redis client requests per second. (Instance: shared_state)'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - '$[?(@.name=="gitlab_redis_client_requests_total" && @.labels.storage == "shared_state")].value.first()'
              error_handler: DISCARD_VALUE
            -
              type: CHANGE_PER_SECOND
              parameters:
                - ''
          master_item:
            key: gitlab.get_metrics
          tags:
            -
              tag: component
              value: redis
        -
          uuid: 950d48c3b5034e769b2bf6a7110ece02
          name: 'GitLab: Ruby: File descriptors opened, avg'
          type: DEPENDENT
          key: gitlab.ruby.file_descriptors.avg
          delay: '0'
          history: 7d
          value_type: FLOAT
          description: 'Average number of opened file descriptors.'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - '$[?(@.name=="ruby_file_descriptors")].value.avg()'
          master_item:
            key: gitlab.get_metrics
          tags:
            -
              tag: component
              value: fds
        -
          uuid: 67ed35c3f5f444b2b10fb462838758ac
          name: 'GitLab: Ruby: File descriptors opened, max'
          type: DEPENDENT
          key: gitlab.ruby.file_descriptors.max
          delay: '0'
          history: 7d
          value_type: FLOAT
          description: 'Maximum number of opened file descriptors.'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - '$[?(@.name=="ruby_file_descriptors")].value.max()'
          master_item:
            key: gitlab.get_metrics
          tags:
            -
              tag: component
              value: fds
        -
          uuid: b1576e2b47bd448293c3e88885bfc87e
          name: 'GitLab: Ruby: File descriptors opened, min'
          type: DEPENDENT
          key: gitlab.ruby.file_descriptors.min
          delay: '0'
          history: 7d
          value_type: FLOAT
          description: 'Minimum number of opened file descriptors.'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - '$[?(@.name=="ruby_file_descriptors")].value.min()'
          master_item:
            key: gitlab.get_metrics
          tags:
            -
              tag: component
              value: fds
        -
          uuid: 98feff3bfe0d4a9ea88733ae8fef8769
          name: 'GitLab: Ruby: CPU  usage per second'
          type: DEPENDENT
          key: gitlab.ruby.process_cpu_seconds.rate
          delay: '0'
          history: 7d
          value_type: FLOAT
          units: s
          description: 'Average CPU time util in seconds.'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - '$[?(@.name=="ruby_process_cpu_seconds_total")].value.avg()'
              error_handler: DISCARD_VALUE
            -
              type: CHANGE_PER_SECOND
              parameters:
                - ''
          master_item:
            key: gitlab.get_metrics
          tags:
            -
              tag: component
              value: cpu
        -
          uuid: 91ed44c1738745119e892eadb88b417f
          name: 'GitLab: Ruby: File descriptors, max'
          type: DEPENDENT
          key: gitlab.ruby.process_max_fds
          delay: '0'
          history: 7d
          value_type: FLOAT
          description: 'Maximum number of open file descriptors per process.'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - '$[?(@.name=="ruby_process_max_fds")].value.avg()'
          master_item:
            key: gitlab.get_metrics
          tags:
            -
              tag: component
              value: fds
        -
          uuid: 8de84a159b864ed791c07835aa0ec39a
          name: 'GitLab: Ruby: RSS memory, avg'
          type: DEPENDENT
          key: gitlab.ruby.process_resident_memory_bytes.avg
          delay: '0'
          history: 7d
          value_type: FLOAT
          units: B
          description: 'Average RSS Memory usage in bytes.'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - '$[?(@.name=="ruby_process_resident_memory_bytes")].value.avg()'
          master_item:
            key: gitlab.get_metrics
          tags:
            -
              tag: component
              value: memory
        -
          uuid: 27285f7d3c344d68b7945edde3cb8ecf
          name: 'GitLab: Ruby: RSS memory, max'
          type: DEPENDENT
          key: gitlab.ruby.process_resident_memory_bytes.max
          delay: '0'
          history: 7d
          value_type: FLOAT
          units: B
          description: 'Maximum RSS Memory usage in bytes.'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - '$[?(@.name=="ruby_process_resident_memory_bytes")].value.max()'
          master_item:
            key: gitlab.get_metrics
          tags:
            -
              tag: component
              value: memory
        -
          uuid: 0cf8d21bcb8d4fb7880784dc82ba8229
          name: 'GitLab: Ruby: RSS memory, min'
          type: DEPENDENT
          key: gitlab.ruby.process_resident_memory_bytes.min
          delay: '0'
          history: 7d
          value_type: FLOAT
          units: B
          description: 'Minimum RSS Memory usage in bytes.'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - '$[?(@.name=="ruby_process_resident_memory_bytes")].value.min()'
          master_item:
            key: gitlab.get_metrics
          tags:
            -
              tag: component
              value: memory
        -
          uuid: 68267621a5e14494bf57225e71e05ff4
          name: 'GitLab: Ruby: First process start time'
          type: DEPENDENT
          key: gitlab.ruby.process_start_time_seconds.first
          delay: '0'
          history: 7d
          units: unixtime
          description: 'Minimum UNIX timestamp of ruby processes start time.'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - '$[?(@.name=="ruby_process_start_time_seconds")].value.min()'
            -
              type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
          master_item:
            key: gitlab.get_metrics
          tags:
            -
              tag: component
              value: application
        -
          uuid: be88084e9b544af68f78c013caf6b59a
          name: 'GitLab: Ruby: Last process start time'
          type: DEPENDENT
          key: gitlab.ruby.process_start_time_seconds.last
          delay: '0'
          history: 7d
          units: unixtime
          description: 'Maximum UNIX timestamp ruby processes start time.'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - '$[?(@.name=="ruby_process_start_time_seconds")].value.max()'
            -
              type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
          master_item:
            key: gitlab.get_metrics
          tags:
            -
              tag: component
              value: application
        -
          uuid: f23849bd9716444f8bf65d3964e3be15
          name: 'GitLab: Ruby: Running_threads'
          type: DEPENDENT
          key: gitlab.ruby.threads_running
          delay: '0'
          history: 7d
          description: 'Number of running Ruby threads.'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - '$[?(@.name=="gitlab_ruby_threads_running_threads")].value.sum()'
          master_item:
            key: gitlab.get_metrics
          tags:
            -
              tag: component
              value: system
          triggers:
            -
              uuid: e24496a9499447b2bbdf70f85bbf2113
              expression: 'nodata(/GitLab by HTTP/gitlab.ruby.threads_running,30m)=1'
              name: 'GitLab: Failed to fetch info data'
              event_name: 'GitLab: Failed to fetch info data (or no data for 30m)'
              priority: WARNING
              description: 'Zabbix has not received a metrics data for the last 30 minutes'
              manual_close: 'YES'
              dependencies:
                -
                  name: 'GitLab: Liveness check was failed'
                  expression: 'last(/GitLab by HTTP/gitlab.liveness)=0'
              tags:
                -
                  tag: scope
                  value: availability
        -
          uuid: 56af56ccc23d44bcb636871229fbcde2
          name: 'GitLab: User CAPTCHA logins, total'
          type: DEPENDENT
          key: gitlab.successful_login_captcha_total
          delay: '0'
          history: 7d
          description: 'Counter of successful CAPTCHA attempts during login.'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - '$[?(@.name=="successful_login_captcha_total")].value.first()'
              error_handler: DISCARD_VALUE
          master_item:
            key: gitlab.get_metrics
          tags:
            -
              tag: component
              value: sessions
        -
          uuid: 95deb1dc93d34935930b154d1222c8a4
          name: 'GitLab: Transactions per second'
          type: DEPENDENT
          key: gitlab.transactions.rate
          delay: '0'
          history: 7d
          value_type: FLOAT
          units: rps
          description: 'Transactions per second (gitlab_transaction_* metrics).'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - '$[?(@.name=~"gitlab_transaction_.*_count_total")].value.sum()'
              error_handler: DISCARD_VALUE
            -
              type: CHANGE_PER_SECOND
              parameters:
                - ''
          master_item:
            key: gitlab.get_metrics
          tags:
            -
              tag: component
              value: transactions
        -
          uuid: d1a346edc81d487da115105333e8992d
          name: 'GitLab: Upload file does not exist'
          type: DEPENDENT
          key: gitlab.upload_file_does_not_exist
          delay: '0'
          history: 7d
          description: 'Number of times an upload record could not find its file.'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - '$[?(@.name=="upload_file_does_not_exist")].value.first()'
              error_handler: DISCARD_VALUE
          master_item:
            key: gitlab.get_metrics
          tags:
            -
              tag: component
              value: application
        -
          uuid: 62c9c5a8886e431bb04c40a8045fe207
          name: 'GitLab: User logins, total'
          type: DEPENDENT
          key: gitlab.user_session_logins_total
          delay: '0'
          history: 7d
          description: 'Counter of how many users have logged in since GitLab was started or restarted.'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - '$[?(@.name=="user_session_logins_total")].value.first()'
              error_handler: DISCARD_VALUE
          master_item:
            key: gitlab.get_metrics
          tags:
            -
              tag: component
              value: sessions
      discovery_rules:
        -
          uuid: acd3e31daa8f497bb1ce0f91d104d928
          name: 'Puma metrics discovery'
          type: HTTP_AGENT
          key: gitlab.puma.discovery
          delay: 3h
          description: 'Discovery of Puma specific metrics when Puma is used.'
          item_prototypes:
            -
              uuid: 6b6ebfe9326247c8a57fb8c96125bcee
              name: 'GitLab: Active connections'
              type: DEPENDENT
              key: 'gitlab.puma.active_connections[{#SINGLETON}]'
              delay: '0'
              history: 7d
              description: 'Number of puma threads processing a request.'
              preprocessing:
                -
                  type: JSONPATH
                  parameters:
                    - '$[?(@.name==''puma_active_connections'')].value.sum()'
              master_item:
                key: gitlab.get_metrics
              tags:
                -
                  tag: component
                  value: puma
            -
              uuid: 14194f273b4e47d98cfdcbefff64cc68
              name: 'GitLab: Idle threads'
              type: DEPENDENT
              key: 'gitlab.puma.idle_threads[{#SINGLETON}]'
              delay: '0'
              history: 7d
              description: 'The number of spawned puma threads which are not processing a request.'
              preprocessing:
                -
                  type: JSONPATH
                  parameters:
                    - '$[?(@.name==''puma_idle_threads'')].value.sum()'
              master_item:
                key: gitlab.get_metrics
              tags:
                -
                  tag: component
                  value: puma
            -
              uuid: 33a1be2938e24ce2a3fb650efa4f98d6
              name: 'GitLab: Killer terminations, total'
              type: DEPENDENT
              key: 'gitlab.puma.killer_terminations_total[{#SINGLETON}]'
              delay: '0'
              history: 7d
              description: 'The number of workers terminated by PumaWorkerKiller.'
              preprocessing:
                -
                  type: JSONPATH
                  parameters:
                    - '$[?(@.name==''puma_killer_terminations_total'')].value.sum()'
                  error_handler: DISCARD_VALUE
              master_item:
                key: gitlab.get_metrics
              tags:
                -
                  tag: component
                  value: puma
            -
              uuid: 7d93438afd73422d90b03e78b1c0f998
              name: 'GitLab: Max threads'
              type: DEPENDENT
              key: 'gitlab.puma.max_threads[{#SINGLETON}]'
              delay: '0'
              history: 7d
              description: 'The maximum number of puma worker threads.'
              preprocessing:
                -
                  type: JSONPATH
                  parameters:
                    - '$[?(@.name==''puma_max_threads'')].value.sum()'
              master_item:
                key: gitlab.get_metrics
              tags:
                -
                  tag: component
                  value: puma
            -
              uuid: fe381c99c2464e95bac63da2df994b8a
              name: 'GitLab: Pool capacity'
              type: DEPENDENT
              key: 'gitlab.puma.pool_capacity[{#SINGLETON}]'
              delay: '0'
              history: 7d
              description: 'The number of requests the puma worker is capable of taking right now.'
              preprocessing:
                -
                  type: JSONPATH
                  parameters:
                    - '$[?(@.name==''puma_pool_capacity'')].value.sum()'
              master_item:
                key: gitlab.get_metrics
              tags:
                -
                  tag: component
                  value: puma
            -
              uuid: 8c375d8323f9459a8b2a6254b7afed5b
              name: 'GitLab: Queued connections'
              type: DEPENDENT
              key: 'gitlab.puma.queued_connections[{#SINGLETON}]'
              delay: '0'
              history: 7d
              description: 'The number of connections in that puma worker''s "todo" set waiting for a worker thread.'
              preprocessing:
                -
                  type: JSONPATH
                  parameters:
                    - '$[?(@.name==''puma_queued_connections'')].value.sum()'
              master_item:
                key: gitlab.get_metrics
              tags:
                -
                  tag: component
                  value: puma
              trigger_prototypes:
                -
                  uuid: 356c8dc915d84382b3f8dfe45b901f46
                  expression: 'min(/GitLab by HTTP/gitlab.puma.queued_connections[{#SINGLETON}],15m)>{$GITLAB.PUMA.QUEUE.MAX.WARN}'
                  name: 'GitLab: Puma is queueing requests'
                  event_name: 'GitLab: Puma is queueing requests (over {$GITLAB.PUMA.QUEUE.MAX.WARN}% for 15m)'
                  priority: WARNING
                  tags:
                    -
                      tag: scope
                      value: performance
            -
              uuid: 02b27e8a68884f399a8359ed6967d614
              name: 'GitLab: Running threads'
              type: DEPENDENT
              key: 'gitlab.puma.running[{#SINGLETON}]'
              delay: '0'
              history: 7d
              description: 'The number of running puma threads.'
              preprocessing:
                -
                  type: JSONPATH
                  parameters:
                    - '$[?(@.name==''puma_running'')].value.sum()'
              master_item:
                key: gitlab.get_metrics
              tags:
                -
                  tag: component
                  value: puma
            -
              uuid: b43e4275dd64427bb6eb4890c556c513
              name: 'GitLab: Running workers'
              type: DEPENDENT
              key: 'gitlab.puma.running_workers[{#SINGLETON}]'
              delay: '0'
              history: 7d
              description: 'The number of booted puma workers.'
              preprocessing:
                -
                  type: JSONPATH
                  parameters:
                    - '$[?(@.name==''puma_running_workers'')].value.sum()'
              master_item:
                key: gitlab.get_metrics
              tags:
                -
                  tag: component
                  value: puma
            -
              uuid: 0169db2581ba48579edc911cad4b41d7
              name: 'GitLab: Stale workers'
              type: DEPENDENT
              key: 'gitlab.puma.stale_workers[{#SINGLETON}]'
              delay: '0'
              history: 7d
              description: 'The number of old puma workers.'
              preprocessing:
                -
                  type: JSONPATH
                  parameters:
                    - '$[?(@.name==''puma_stale_workers'')].value.sum()'
              master_item:
                key: gitlab.get_metrics
              tags:
                -
                  tag: component
                  value: puma
            -
              uuid: 19e0149a6de846c7a39b305037469ecb
              name: 'GitLab: Workers'
              type: DEPENDENT
              key: 'gitlab.puma.workers[{#SINGLETON}]'
              delay: '0'
              history: 7d
              description: 'Total number of puma workers.'
              preprocessing:
                -
                  type: JSONPATH
                  parameters:
                    - '$[?(@.name==''puma_workers'')].value.sum()'
              master_item:
                key: gitlab.get_metrics
              tags:
                -
                  tag: component
                  value: puma
          trigger_prototypes:
            -
              uuid: b69fe81449bd4b6cb6dfddeb333e8898
              expression: 'min(/GitLab by HTTP/gitlab.puma.active_connections[{#SINGLETON}],5m)/last(/GitLab by HTTP/gitlab.puma.max_threads[{#SINGLETON}])*100>{$GITLAB.PUMA.UTILIZATION.MAX.WARN}'
              name: 'GitLab: Puma instance thread utilization is too high'
              event_name: 'GitLab: Puma instance thread utilization is too high (over {$GITLAB.PUMA.UTILIZATION.MAX.WARN}% for 5m)'
              priority: WARNING
              tags:
                -
                  tag: scope
                  value: capacity
          url: '{$GITLAB.URL}/-/metrics{$GITLAB.HEALTH.TOKEN}'
          preprocessing:
            -
              type: PROMETHEUS_TO_JSON
              parameters:
                - puma_workers
            -
              type: JAVASCRIPT
              parameters:
                - 'return JSON.stringify(value != "[]" ? [{''{#SINGLETON}'': ''''}] : []);'
        -
          uuid: 912723d1837641cf9b84996788bd6b54
          name: 'Unicorn metrics discovery'
          type: HTTP_AGENT
          key: gitlab.unicorn.discovery
          delay: 3h
          description: 'DiscoveryUnicorn specific metrics, when Unicorn is used.'
          item_prototypes:
            -
              uuid: 7461ee7fad7f4597825644b80cce2ec2
              name: 'GitLab: Unicorn: Active connections'
              type: DEPENDENT
              key: 'gitlab.unicorn.active_connections[{#SINGLETON}]'
              delay: '0'
              history: 7d
              description: 'The number of active Unicorn connections.'
              preprocessing:
                -
                  type: JSONPATH
                  parameters:
                    - '$[?(@.name==''unicorn_active_connections'')].value.sum()'
              master_item:
                key: gitlab.get_metrics
              tags:
                -
                  tag: component
                  value: unicorn
            -
              uuid: 31e0f545c6c6428c8f9f46426cb97ca7
              name: 'GitLab: Unicorn: Queued connections'
              type: DEPENDENT
              key: 'gitlab.unicorn.queued_connections[{#SINGLETON}]'
              delay: '0'
              history: 7d
              description: 'The number of queued Unicorn connections.'
              preprocessing:
                -
                  type: JSONPATH
                  parameters:
                    - '$[?(@.name==''unicorn_queued_connections'')].value.sum()'
              master_item:
                key: gitlab.get_metrics
              tags:
                -
                  tag: component
                  value: unicorn
              trigger_prototypes:
                -
                  uuid: 84142d0996c0420c8b07c7e17d1b9a47
                  expression: 'min(/GitLab by HTTP/gitlab.unicorn.queued_connections[{#SINGLETON}],5m)>{$GITLAB.UNICORN.QUEUE.MAX.WARN}'
                  name: 'GitLab: Unicorn is queueing requests'
                  event_name: 'GitLab: Unicorn is queueing requests (over {$GITLAB.UNICORN.QUEUE.MAX.WARN}% for 5m)'
                  priority: WARNING
                  tags:
                    -
                      tag: scope
                      value: performance
            -
              uuid: 44a12fd548b742069cae53a78f7f8ab0
              name: 'GitLab: Unicorn: Workers'
              type: DEPENDENT
              key: 'gitlab.unicorn.unicorn_workers[{#SINGLETON}]'
              delay: '0'
              history: 7d
              description: 'The number of Unicorn workers'
              preprocessing:
                -
                  type: JSONPATH
                  parameters:
                    - '$[?(@.name==''unicorn_workers'')].value.sum()'
              master_item:
                key: gitlab.get_metrics
              tags:
                -
                  tag: component
                  value: unicorn
          trigger_prototypes:
            -
              uuid: 731bf8eb456c49739a3fcd7aec24c7d7
              expression: 'min(/GitLab by HTTP/gitlab.unicorn.active_connections[{#SINGLETON}],5m)/last(/GitLab by HTTP/gitlab.unicorn.unicorn_workers[{#SINGLETON}])*100>{$GITLAB.UNICORN.UTILIZATION.MAX.WARN}'
              name: 'GitLab: Unicorn worker utilization is too high'
              event_name: 'GitLab: Unicorn worker utilization is too high (over {$GITLAB.UNICORN.UTILIZATION.MAX.WARN}% for 5m)'
              priority: WARNING
              tags:
                -
                  tag: scope
                  value: capacity
          url: '{$GITLAB.URL}/-/metrics{$GITLAB.HEALTH.TOKEN}'
          preprocessing:
            -
              type: PROMETHEUS_TO_JSON
              parameters:
                - unicorn_workers
              error_handler: DISCARD_VALUE
            -
              type: JAVASCRIPT
              parameters:
                - 'return JSON.stringify(value != "[]" ? [{''{#SINGLETON}'': ''''}] : []);'
      tags:
        -
          tag: class
          value: application
        -
          tag: target
          value: gitlab
      macros:
        -
          macro: '{$GITLAB.HEALTH.TOKEN}'
          description: 'The token path for Gitlab health check. Example `?token=your_token`'
        -
          macro: '{$GITLAB.HTTP.FAIL.MAX.WARN}'
          value: '2'
          description: 'The maximum number of HTTP request failures for a trigger expression.'
        -
          macro: '{$GITLAB.OPEN.FDS.MAX.WARN}'
          value: '90'
          description: 'The maximum percentage of used file descriptors for a trigger expression.'
        -
          macro: '{$GITLAB.PUMA.QUEUE.MAX.WARN}'
          value: '1'
          description: 'The maximum number of Puma queued requests for a trigger expression.'
        -
          macro: '{$GITLAB.PUMA.UTILIZATION.MAX.WARN}'
          value: '90'
          description: 'The maximum percentage of Puma thread utilization for a trigger expression.'
        -
          macro: '{$GITLAB.REDIS.FAIL.MAX.WARN}'
          value: '2'
          description: 'The maximum number of Redis client exceptions for a trigger expression.'
        -
          macro: '{$GITLAB.UNICORN.QUEUE.MAX.WARN}'
          value: '1'
          description: 'The maximum number of Unicorn queued requests for a trigger expression.'
        -
          macro: '{$GITLAB.UNICORN.UTILIZATION.MAX.WARN}'
          value: '90'
          description: 'The maximum percentage of Unicorn workers utilization for a trigger expression.'
        -
          macro: '{$GITLAB.URL}'
          value: 'http://localhost'
          description: 'URL of a GitLab instance.'
      valuemaps:
        -
          uuid: 3b40391bb8b6472e9c3fd8e1f001fe04
          name: 'GitLab healthcheck'
          mappings:
            -
              value: '0'
              newvalue: Failed
            -
              value: '1'
              newvalue: Ok
  triggers:
    -
      uuid: 4ac37991b2ca4edd9329fff1e752b05b
      expression: 'min(/GitLab by HTTP/gitlab.ruby.file_descriptors.max,5m)/last(/GitLab by HTTP/gitlab.ruby.process_max_fds)*100>{$GITLAB.OPEN.FDS.MAX.WARN}'
      name: 'GitLab: Current number of open files is too high'
      event_name: 'GitLab: Current number of open files is too high (over {$GITLAB.OPEN.FDS.MAX.WARN}% for 5m)'
      priority: WARNING
      tags:
        -
          tag: scope
          value: capacity
  graphs:
    -
      uuid: f6c30e56b54e478ea2708e302197b83b
      name: 'GitLab: Database: Connection pool'
      graph_items:
        -
          color: 1A7C11
          item:
            host: 'GitLab by HTTP'
            key: gitlab.database.connection_pool_busy
        -
          sortorder: '1'
          color: 2774A4
          item:
            host: 'GitLab by HTTP'
            key: gitlab.database.connection_pool_connections
        -
          sortorder: '2'
          color: F63100
          item:
            host: 'GitLab by HTTP'
            key: gitlab.database.connection_pool_dead
        -
          sortorder: '3'
          color: A54F10
          item:
            host: 'GitLab by HTTP'
            key: gitlab.database.connection_pool_idle
        -
          sortorder: '4'
          color: FC6EA3
          item:
            host: 'GitLab by HTTP'
            key: gitlab.database.connection_pool_waiting
        -
          sortorder: '5'
          drawtype: BOLD_LINE
          color: 6C59DC
          item:
            host: 'GitLab by HTTP'
            key: gitlab.database.connection_pool_waiting
    -
      uuid: ebffb6f63cf5400ab6a518612c5e857f
      name: 'GitLab: HTTP requests rate'
      graph_items:
        -
          color: 1A7C11
          item:
            host: 'GitLab by HTTP'
            key: gitlab.http.requests.4xx.rate
        -
          sortorder: '1'
          color: 2774A4
          item:
            host: 'GitLab by HTTP'
            key: gitlab.http.requests.5xx.rate
        -
          sortorder: '2'
          color: F63100
          item:
            host: 'GitLab by HTTP'
            key: gitlab.http.requests.rate
    -
      uuid: 14d4a4cc843e4c15bd72b680c18ffdd6
      name: 'GitLab: Redis requests rate'
      graph_items:
        -
          drawtype: BOLD_LINE
          color: 1A7C11
          item:
            host: 'GitLab by HTTP'
            key: gitlab.redis.client_requests.shared_state.rate
        -
          sortorder: '1'
          drawtype: BOLD_LINE
          color: 2774A4
          item:
            host: 'GitLab by HTTP'
            key: gitlab.redis.client_requests.cache.rate
        -
          sortorder: '2'
          drawtype: BOLD_LINE
          color: F63100
          item:
            host: 'GitLab by HTTP'
            key: gitlab.redis.client_requests.queues.rate
        -
          sortorder: '3'
          color: A54F10
          yaxisside: RIGHT
          item:
            host: 'GitLab by HTTP'
            key: gitlab.redis.client_exceptions.shared_state.rate
        -
          sortorder: '4'
          color: FC6EA3
          yaxisside: RIGHT
          item:
            host: 'GitLab by HTTP'
            key: gitlab.redis.client_exceptions.cache.rate
        -
          sortorder: '5'
          color: 6C59DC
          yaxisside: RIGHT
          item:
            host: 'GitLab by HTTP'
            key: gitlab.redis.client_exceptions.queues.rate
    -
      uuid: 2eafabff82a240258c50a77655f77fd9
      name: 'GitLab: Ruby: File descriptors'
      graph_items:
        -
          color: 1A7C11
          item:
            host: 'GitLab by HTTP'
            key: gitlab.ruby.file_descriptors.avg
        -
          sortorder: '1'
          color: 2774A4
          item:
            host: 'GitLab by HTTP'
            key: gitlab.ruby.file_descriptors.max
        -
          sortorder: '2'
          color: F63100
          item:
            host: 'GitLab by HTTP'
            key: gitlab.ruby.file_descriptors.min
        -
          sortorder: '3'
          drawtype: BOLD_LINE
          color: A54F10
          item:
            host: 'GitLab by HTTP'
            key: gitlab.ruby.process_max_fds
    -
      uuid: 1c6b8a24e76f4b7390e8e8742afbedec
      name: 'GitLab: Ruby: RSS memory'
      graph_items:
        -
          color: 1A7C11
          item:
            host: 'GitLab by HTTP'
            key: gitlab.ruby.process_resident_memory_bytes.avg
        -
          sortorder: '1'
          color: 2774A4
          item:
            host: 'GitLab by HTTP'
            key: gitlab.ruby.process_resident_memory_bytes.min
        -
          sortorder: '2'
          color: F63100
          item:
            host: 'GitLab by HTTP'
            key: gitlab.ruby.process_resident_memory_bytes.max