32 lines
798 B
Go
32 lines
798 B
Go
|
package network
|
||
|
|
||
|
import (
|
||
|
"github.com/prometheus/client_golang/prometheus"
|
||
|
"github.com/prometheus/client_golang/prometheus/promauto"
|
||
|
)
|
||
|
|
||
|
const (
|
||
|
metricNamespace = "bouncer_layer_authn_network"
|
||
|
metricLabelProxy = "proxy"
|
||
|
metricLabelLayer = "layer"
|
||
|
)
|
||
|
|
||
|
var (
|
||
|
metricAuthorizedTotal = promauto.NewCounterVec(
|
||
|
prometheus.CounterOpts{
|
||
|
Name: "authorized_total",
|
||
|
Help: "Bouncer's authn-network layer total authorized accesses",
|
||
|
Namespace: metricNamespace,
|
||
|
},
|
||
|
[]string{metricLabelProxy, metricLabelLayer},
|
||
|
)
|
||
|
metricForbiddenTotal = promauto.NewCounterVec(
|
||
|
prometheus.CounterOpts{
|
||
|
Name: "forbidden_total",
|
||
|
Help: "Bouncer's authn-network layer total forbbiden accesses",
|
||
|
Namespace: metricNamespace,
|
||
|
},
|
||
|
[]string{metricLabelProxy, metricLabelLayer},
|
||
|
)
|
||
|
)
|