-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx-httpcode-exporter.go
1984 lines (1090 loc) · 32.9 KB
/
nginx-httpcode-exporter.go
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
package main
import (
"os"
"log"
"net/http"
"strings"
"time"
"math"
"strconv"
"github.com/pariseed/tail"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
)
var code100 = []int{}
var code100count = 0
var code101 = []int{}
var code101count = 0
var code102 = []int{}
var code102count = 0
var code103 = []int{}
var code103count = 0
var code200 = []int{}
var code200count = 0
var code201 = []int{}
var code201count = 0
var code202 = []int{}
var code202count = 0
var code203 = []int{}
var code203count = 0
var code204 = []int{}
var code204count = 0
var code205 = []int{}
var code205count = 0
var code206 = []int{}
var code206count = 0
var code207 = []int{}
var code207count = 0
var code208 = []int{}
var code208count = 0
var code226 = []int{}
var code226count = 0
var code300 = []int{}
var code300count = 0
var code301 = []int{}
var code301count = 0
var code302 = []int{}
var code302count = 0
var code303 = []int{}
var code303count = 0
var code304 = []int{}
var code304count = 0
var code305 = []int{}
var code305count = 0
var code306 = []int{}
var code306count = 0
var code307 = []int{}
var code307count = 0
var code308 = []int{}
var code308count = 0
var code400 = []int{}
var code400count = 0
var code401 = []int{}
var code401count = 0
var code402 = []int{}
var code402count = 0
var code403 = []int{}
var code403count = 0
var code404 = []int{}
var code404count = 0
var code405 = []int{}
var code405count = 0
var code406 = []int{}
var code406count = 0
var code407 = []int{}
var code407count = 0
var code408 = []int{}
var code408count = 0
var code409 = []int{}
var code409count = 0
var code410 = []int{}
var code410count = 0
var code411 = []int{}
var code411count = 0
var code412 = []int{}
var code412count = 0
var code413 = []int{}
var code413count = 0
var code414 = []int{}
var code414count = 0
var code415 = []int{}
var code415count = 0
var code416 = []int{}
var code416count = 0
var code417 = []int{}
var code417count = 0
var code418 = []int{}
var code418count = 0
var code421 = []int{}
var code421count = 0
var code422 = []int{}
var code422count = 0
var code423 = []int{}
var code423count = 0
var code424 = []int{}
var code424count = 0
var code425 = []int{}
var code425count = 0
var code426 = []int{}
var code426count = 0
var code427 = []int{}
var code427count = 0
var code428 = []int{}
var code428count = 0
var code429 = []int{}
var code429count = 0
var code431 = []int{}
var code431count = 0
var code451 = []int{}
var code451count = 0
var code500 = []int{}
var code500count = 0
var code501 = []int{}
var code501count = 0
var code502 = []int{}
var code502count = 0
var code503 = []int{}
var code503count = 0
var code504 = []int{}
var code504count = 0
var code505 = []int{}
var code505count = 0
var code506 = []int{}
var code506count = 0
var code507 = []int{}
var code507count = 0
var code508 = []int{}
var code508count = 0
var code510 = []int{}
var code510count = 0
var code511 = []int{}
var code511count = 0
var code700 = []int{}
var code700count = 0
var start = 0
func getlog() {
start = 1
t, err := tail.TailFile("/var/log/nginx/nginx-access.log", tail.Config{Follow: true})
if err != nil {
// handle error
os.Exit(1)
}
for line := range t.Lines {
words := strings.Split(line.Text, " ")
code, _ := strconv.Atoi(words[3])
if (code == 100) {
code100 = append(code100, code)
} else if (code == 101) {
code101 = append(code101, code)
} else if (code == 102) {
code102 = append(code102, code)
} else if (code == 103) {
code103 = append(code103, code)
} else if (code == 200) {
code200 = append(code200, code)
} else if (code == 201) {
code201 = append(code201, code)
} else if (code == 202) {
code202 = append(code202, code)
} else if (code == 203) {
code203 = append(code203, code)
} else if (code == 204) {
code204 = append(code204, code)
} else if (code == 205) {
code205 = append(code205, code)
} else if (code == 206) {
code206 = append(code206, code)
} else if (code == 207) {
code207 = append(code207, code)
} else if (code == 208) {
code208 = append(code208, code)
} else if (code == 226) {
code226 = append(code226, code)
} else if (code == 300) {
code300 = append(code300, code)
} else if (code == 301) {
code301 = append(code301, code)
} else if (code == 302) {
code302 = append(code302, code)
} else if (code == 303) {
code303 = append(code303, code)
} else if (code == 304) {
code304 = append(code304, code)
} else if (code == 305) {
code305 = append(code305, code)
} else if (code == 306) {
code306 = append(code306, code)
} else if (code == 307) {
code307 = append(code307, code)
} else if (code == 308) {
code308 = append(code308, code)
} else if (code == 400) {
code400 = append(code400, code)
} else if (code == 401) {
code401 = append(code401, code)
} else if (code == 402) {
code402 = append(code402, code)
} else if (code == 403) {
code403 = append(code403, code)
} else if (code == 404) {
code404 = append(code404, code)
} else if (code == 405) {
code405 = append(code405, code)
} else if (code == 406) {
code406 = append(code406, code)
} else if (code == 407) {
code407 = append(code407, code)
} else if (code == 408) {
code408 = append(code408, code)
} else if (code == 409) {
code409 = append(code409, code)
} else if (code == 410) {
code410 = append(code410, code)
} else if (code == 411) {
code411 = append(code411, code)
} else if (code == 412) {
code412 = append(code412, code)
} else if (code == 413) {
code413 = append(code413, code)
} else if (code == 414) {
code414 = append(code414, code)
} else if (code == 415) {
code415 = append(code415, code)
} else if (code == 416) {
code416 = append(code416, code)
} else if (code == 417) {
code417 = append(code417, code)
} else if (code == 418) {
code418 = append(code418, code)
} else if (code == 421) {
code421 = append(code421, code)
} else if (code == 422) {
code422 = append(code422, code)
} else if (code == 423) {
code423 = append(code423, code)
} else if (code == 424) {
code424 = append(code424, code)
} else if (code == 425) {
code425 = append(code425, code)
} else if (code == 426) {
code426 = append(code426, code)
} else if (code == 427) {
code427 = append(code427, code)
} else if (code == 428) {
code428 = append(code428, code)
} else if (code == 429) {
code429 = append(code429, code)
} else if (code == 431) {
code431 = append(code431, code)
} else if (code == 451) {
code451 = append(code451, code)
} else if (code == 500) {
code500 = append(code500, code)
} else if (code == 501) {
code501 = append(code501, code)
} else if (code == 502) {
code502 = append(code502, code)
} else if (code == 503) {
code503 = append(code503, code)
} else if (code == 504) {
code504 = append(code504, code)
} else if (code == 505) {
code505 = append(code505, code)
} else if (code == 506) {
code506 = append(code506, code)
} else if (code == 507) {
code507 = append(code507, code)
} else if (code == 508) {
code508 = append(code508, code)
} else if (code == 510) {
code510 = append(code510, code)
} else if (code == 511) {
code511 = append(code511, code)
} else if (code == 700) {
code700 = append(code700, code)
}
}
}
var HTTP_100_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_100_CODE",
Help: "number of nginx http 100 status code"})
var HTTP_101_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_101_CODE",
Help: "number of nginx http 101 status code"})
var HTTP_102_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_102_CODE",
Help: "number of nginx http 102 status code"})
var HTTP_103_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_103_CODE",
Help: "number of nginx http 103 status code"})
var HTTP_200_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_200_CODE",
Help: "number of nginx http 200 status code"})
var HTTP_201_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_201_CODE",
Help: "number of nginx http 201 status code"})
var HTTP_202_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_202_CODE",
Help: "number of nginx http 202 status code"})
var HTTP_203_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_203_CODE",
Help: "number of nginx http 203 status code"})
var HTTP_204_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_204_CODE",
Help: "number of nginx http 204 status code"})
var HTTP_205_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_205_CODE",
Help: "number of nginx http 205 status code"})
var HTTP_206_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_206_CODE",
Help: "number of nginx http 206 status code"})
var HTTP_207_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_207_CODE",
Help: "number of nginx http 207 status code"})
var HTTP_208_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_208_CODE",
Help: "number of nginx http 208 status code"})
var HTTP_226_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_226_CODE",
Help: "number of nginx http 226 status code"})
var HTTP_300_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_300_CODE",
Help: "number of nginx http 300 status code"})
var HTTP_301_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_301_CODE",
Help: "number of nginx http 301 status code"})
var HTTP_302_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_302_CODE",
Help: "number of nginx http 302 status code"})
var HTTP_303_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_303_CODE",
Help: "number of nginx http 303 status code"})
var HTTP_304_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_304_CODE",
Help: "number of nginx http 304 status code"})
var HTTP_305_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_305_CODE",
Help: "number of nginx http 305 status code"})
var HTTP_306_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_306_CODE",
Help: "number of nginx http 306 status code"})
var HTTP_307_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_307_CODE",
Help: "number of nginx http 307 status code"})
var HTTP_308_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_308_CODE",
Help: "number of nginx http 308 status code"})
var HTTP_400_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_400_CODE",
Help: "number of nginx http 400 status code"})
var HTTP_401_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_401_CODE",
Help: "number of nginx http 401 status code"})
var HTTP_402_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_402_CODE",
Help: "number of nginx http 402 status code"})
var HTTP_403_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_403_CODE",
Help: "number of nginx http 403 status code"})
var HTTP_404_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_404_CODE",
Help: "number of nginx http 404 status code"})
var HTTP_405_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_405_CODE",
Help: "number of nginx http 405 status code"})
var HTTP_406_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_406_CODE",
Help: "number of nginx http 406 status code"})
var HTTP_407_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_407_CODE",
Help: "number of nginx http 407 status code"})
var HTTP_408_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_408_CODE",
Help: "number of nginx http 408 status code"})
var HTTP_409_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_409_CODE",
Help: "number of nginx http 409 status code"})
var HTTP_410_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_410_CODE",
Help: "number of nginx http 410 status code"})
var HTTP_411_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_411_CODE",
Help: "number of nginx http 411 status code"})
var HTTP_412_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_412_CODE",
Help: "number of nginx http 412 status code"})
var HTTP_413_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_413_CODE",
Help: "number of nginx http 413 status code"})
var HTTP_414_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_414_CODE",
Help: "number of nginx http 414 status code"})
var HTTP_415_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_415_CODE",
Help: "number of nginx http 415 status code"})
var HTTP_416_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_416_CODE",
Help: "number of nginx http 416 status code"})
var HTTP_417_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_417_CODE",
Help: "number of nginx http 417 status code"})
var HTTP_418_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_418_CODE",
Help: "number of nginx http 418 status code"})
var HTTP_421_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_421_CODE",
Help: "number of nginx http 421 status code"})
var HTTP_422_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_422_CODE",
Help: "number of nginx http 422 status code"})
var HTTP_423_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_423_CODE",
Help: "number of nginx http 423 status code"})
var HTTP_424_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_424_CODE",
Help: "number of nginx http 424 status code"})
var HTTP_425_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_425_CODE",
Help: "number of nginx http 425 status code"})
var HTTP_426_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_426_CODE",
Help: "number of nginx http 426 status code"})
var HTTP_427_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_427_CODE",
Help: "number of nginx http 427 status code"})
var HTTP_428_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_428_CODE",
Help: "number of nginx http 428 status code"})
var HTTP_429_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_429_CODE",
Help: "number of nginx http 429 status code"})
var HTTP_431_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_431_CODE",
Help: "number of nginx http 431 status code"})
var HTTP_451_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_451_CODE",
Help: "number of nginx http 451 status code"})
var HTTP_500_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_500_CODE",
Help: "number of nginx http 500 status code"})
var HTTP_501_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_501_CODE",
Help: "number of nginx http 501 status code"})
var HTTP_502_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_502_CODE",
Help: "number of nginx http 502 status code"})
var HTTP_503_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_503_CODE",
Help: "number of nginx http 503 status code"})
var HTTP_504_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_504_CODE",
Help: "number of nginx http 504 status code"})
var HTTP_505_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_505_CODE",
Help: "number of nginx http 505 status code"})
var HTTP_506_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_506_CODE",
Help: "number of nginx http 506 status code"})
var HTTP_507_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_507_CODE",
Help: "number of nginx http 507 status code"})
var HTTP_508_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_508_CODE",
Help: "number of nginx http 508 status code"})
var HTTP_510_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_510_CODE",
Help: "number of nginx http 510 status code"})
var HTTP_511_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_511_CODE",
Help: "number of nginx http 511 status code"})
var HTTP_700_CODE = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "HTTP_700_CODE",
Help: "number of nginx http 700 status code"})
func init() {
// Metrics have to be registered to be exposed:
prometheus.MustRegister(HTTP_100_CODE)
prometheus.MustRegister(HTTP_101_CODE)
prometheus.MustRegister(HTTP_102_CODE)
prometheus.MustRegister(HTTP_103_CODE)
prometheus.MustRegister(HTTP_200_CODE)
prometheus.MustRegister(HTTP_201_CODE)
prometheus.MustRegister(HTTP_202_CODE)
prometheus.MustRegister(HTTP_203_CODE)
prometheus.MustRegister(HTTP_204_CODE)
prometheus.MustRegister(HTTP_205_CODE)
prometheus.MustRegister(HTTP_206_CODE)
prometheus.MustRegister(HTTP_207_CODE)
prometheus.MustRegister(HTTP_208_CODE)
prometheus.MustRegister(HTTP_226_CODE)
prometheus.MustRegister(HTTP_300_CODE)
prometheus.MustRegister(HTTP_301_CODE)
prometheus.MustRegister(HTTP_302_CODE)
prometheus.MustRegister(HTTP_303_CODE)
prometheus.MustRegister(HTTP_304_CODE)
prometheus.MustRegister(HTTP_305_CODE)
prometheus.MustRegister(HTTP_306_CODE)
prometheus.MustRegister(HTTP_307_CODE)
prometheus.MustRegister(HTTP_308_CODE)
prometheus.MustRegister(HTTP_400_CODE)
prometheus.MustRegister(HTTP_401_CODE)
prometheus.MustRegister(HTTP_402_CODE)
prometheus.MustRegister(HTTP_403_CODE)
prometheus.MustRegister(HTTP_404_CODE)
prometheus.MustRegister(HTTP_405_CODE)
prometheus.MustRegister(HTTP_406_CODE)
prometheus.MustRegister(HTTP_407_CODE)
prometheus.MustRegister(HTTP_408_CODE)
prometheus.MustRegister(HTTP_409_CODE)
prometheus.MustRegister(HTTP_410_CODE)
prometheus.MustRegister(HTTP_411_CODE)
prometheus.MustRegister(HTTP_412_CODE)
prometheus.MustRegister(HTTP_413_CODE)
prometheus.MustRegister(HTTP_414_CODE)
prometheus.MustRegister(HTTP_415_CODE)
prometheus.MustRegister(HTTP_416_CODE)
prometheus.MustRegister(HTTP_417_CODE)
prometheus.MustRegister(HTTP_418_CODE)
prometheus.MustRegister(HTTP_421_CODE)
prometheus.MustRegister(HTTP_422_CODE)
prometheus.MustRegister(HTTP_423_CODE)
prometheus.MustRegister(HTTP_424_CODE)
prometheus.MustRegister(HTTP_425_CODE)
prometheus.MustRegister(HTTP_426_CODE)
prometheus.MustRegister(HTTP_427_CODE)
prometheus.MustRegister(HTTP_428_CODE)
prometheus.MustRegister(HTTP_429_CODE)
prometheus.MustRegister(HTTP_431_CODE)
prometheus.MustRegister(HTTP_451_CODE)
prometheus.MustRegister(HTTP_500_CODE)
prometheus.MustRegister(HTTP_501_CODE)
prometheus.MustRegister(HTTP_502_CODE)
prometheus.MustRegister(HTTP_503_CODE)
prometheus.MustRegister(HTTP_504_CODE)
prometheus.MustRegister(HTTP_505_CODE)
prometheus.MustRegister(HTTP_506_CODE)
prometheus.MustRegister(HTTP_507_CODE)
prometheus.MustRegister(HTTP_508_CODE)
prometheus.MustRegister(HTTP_510_CODE)
prometheus.MustRegister(HTTP_511_CODE)
prometheus.MustRegister(HTTP_700_CODE)
}
func commit100() {
diff := math.Abs(float64(code100count)-float64(len(code100)))
HTTP_100_CODE.Set(diff)
code100count = len(code100)
code100 = code100[:0]
}
func commit101() {
diff := math.Abs(float64(code101count)-float64(len(code101)))
HTTP_101_CODE.Set(diff)
code101count = len(code101)
code101 = code101[:0]
}
func commit102() {
diff := math.Abs(float64(code102count)-float64(len(code102)))
HTTP_102_CODE.Set(diff)
code102count = len(code102)
code102 = code102[:0]
}
func commit103() {
diff := math.Abs(float64(code103count)-float64(len(code103)))
HTTP_103_CODE.Set(diff)
code103count = len(code103)
code103 = code103[:0]
}
func commit200() {
diff := math.Abs(float64(code200count)-float64(len(code200)))
HTTP_200_CODE.Set(diff)
code200count = len(code200)
code200 = code200[:0]
}
func commit201() {
diff := math.Abs(float64(code201count)-float64(len(code201)))
HTTP_201_CODE.Set(diff)
code201count = len(code201)
code201 = code201[:0]
}
func commit202() {
diff := math.Abs(float64(code202count)-float64(len(code202)))
HTTP_202_CODE.Set(diff)
code202count = len(code202)
code202 = code202[:0]
}
func commit203() {
diff := math.Abs(float64(code203count)-float64(len(code203)))
HTTP_203_CODE.Set(diff)
code203count = len(code203)
code203 = code203[:0]
}
func commit204() {
diff := math.Abs(float64(code204count)-float64(len(code204)))
HTTP_204_CODE.Set(diff)
code204count = len(code204)
code204 = code204[:0]
}
func commit205() {
diff := math.Abs(float64(code205count)-float64(len(code205)))
HTTP_205_CODE.Set(diff)
code205count = len(code205)
code205 = code205[:0]
}
func commit206() {
diff := math.Abs(float64(code206count)-float64(len(code206)))
HTTP_206_CODE.Set(diff)
code206count = len(code206)
code206 = code206[:0]
}
func commit207() {
diff := math.Abs(float64(code207count)-float64(len(code207)))
HTTP_207_CODE.Set(diff)
code207count = len(code207)
code207 = code207[:0]
}
func commit208() {
diff := math.Abs(float64(code208count)-float64(len(code208)))
HTTP_208_CODE.Set(diff)
code208count = len(code208)
code208 = code208[:0]
}
func commit226() {
diff := math.Abs(float64(code226count)-float64(len(code226)))
HTTP_226_CODE.Set(diff)
code226count = len(code226)
code226 = code226[:0]
}
func commit300() {
diff := math.Abs(float64(code300count)-float64(len(code300)))
HTTP_300_CODE.Set(diff)
code300count = len(code300)
code300 = code300[:0]
}
func commit301() {
diff := math.Abs(float64(code301count)-float64(len(code301)))
HTTP_301_CODE.Set(diff)
code301count = len(code301)
code301 = code301[:0]
}
func commit302() {
diff := math.Abs(float64(code302count)-float64(len(code302)))
HTTP_302_CODE.Set(diff)
code302count = len(code302)
code302 = code302[:0]