github.com/crowdsecurity/crowdsec@v1.6.1/pkg/acquisition/modules/appsec/metrics.go (about) 1 package appsecacquisition 2 3 import "github.com/prometheus/client_golang/prometheus" 4 5 var AppsecGlobalParsingHistogram = prometheus.NewHistogramVec( 6 prometheus.HistogramOpts{ 7 Help: "Time spent processing a request by the Application Security Engine.", 8 Name: "cs_appsec_parsing_time_seconds", 9 Buckets: []float64{0.0001, 0.00025, 0.0005, 0.001, 0.0025, 0.0050, 0.01, 0.025, 0.05, 0.1, 0.25}, 10 }, 11 []string{"source", "appsec_engine"}, 12 ) 13 14 var AppsecInbandParsingHistogram = prometheus.NewHistogramVec( 15 prometheus.HistogramOpts{ 16 Help: "Time spent processing a request by the inband Application Security Engine.", 17 Name: "cs_appsec_inband_parsing_time_seconds", 18 Buckets: []float64{0.0001, 0.00025, 0.0005, 0.001, 0.0025, 0.0050, 0.01, 0.025, 0.05, 0.1, 0.25}, 19 }, 20 []string{"source", "appsec_engine"}, 21 ) 22 23 var AppsecOutbandParsingHistogram = prometheus.NewHistogramVec( 24 prometheus.HistogramOpts{ 25 Help: "Time spent processing a request by the Application Security Engine.", 26 Name: "cs_appsec_outband_parsing_time_seconds", 27 Buckets: []float64{0.0001, 0.00025, 0.0005, 0.001, 0.0025, 0.0050, 0.01, 0.025, 0.05, 0.1, 0.25}, 28 }, 29 []string{"source", "appsec_engine"}, 30 ) 31 32 var AppsecReqCounter = prometheus.NewCounterVec( 33 prometheus.CounterOpts{ 34 Name: "cs_appsec_reqs_total", 35 Help: "Total events processed by the Application Security Engine.", 36 }, 37 []string{"source", "appsec_engine"}, 38 ) 39 40 var AppsecBlockCounter = prometheus.NewCounterVec( 41 prometheus.CounterOpts{ 42 Name: "cs_appsec_block_total", 43 Help: "Total events blocked by the Application Security Engine.", 44 }, 45 []string{"source", "appsec_engine"}, 46 ) 47 48 var AppsecRuleHits = prometheus.NewCounterVec( 49 prometheus.CounterOpts{ 50 Name: "cs_appsec_rule_hits", 51 Help: "Count of triggered rule, by rule_name, type (inband/outofband), appsec_engine and source", 52 }, 53 []string{"rule_name", "type", "appsec_engine", "source"}, 54 )