2019-09-04 23:43:45 +08:00
|
|
|
package acl
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"github.com/coredns/coredns/plugin"
|
|
|
|
|
|
|
|
|
|
"github.com/prometheus/client_golang/prometheus"
|
2020-07-25 23:06:28 +08:00
|
|
|
"github.com/prometheus/client_golang/prometheus/promauto"
|
2019-09-04 23:43:45 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
var (
|
|
|
|
|
// RequestBlockCount is the number of DNS requests being blocked.
|
2020-07-25 23:06:28 +08:00
|
|
|
RequestBlockCount = promauto.NewCounterVec(prometheus.CounterOpts{
|
2019-09-04 23:43:45 +08:00
|
|
|
Namespace: plugin.Namespace,
|
2020-03-31 20:03:18 +02:00
|
|
|
Subsystem: pluginName,
|
|
|
|
|
Name: "blocked_requests_total",
|
2019-09-04 23:43:45 +08:00
|
|
|
Help: "Counter of DNS requests being blocked.",
|
2022-09-12 22:35:59 +02:00
|
|
|
}, []string{"server", "zone", "view"})
|
2021-02-01 09:52:23 -05:00
|
|
|
// RequestFilterCount is the number of DNS requests being filtered.
|
|
|
|
|
RequestFilterCount = promauto.NewCounterVec(prometheus.CounterOpts{
|
|
|
|
|
Namespace: plugin.Namespace,
|
|
|
|
|
Subsystem: pluginName,
|
|
|
|
|
Name: "filtered_requests_total",
|
|
|
|
|
Help: "Counter of DNS requests being filtered.",
|
2022-09-12 22:35:59 +02:00
|
|
|
}, []string{"server", "zone", "view"})
|
2019-09-04 23:43:45 +08:00
|
|
|
// RequestAllowCount is the number of DNS requests being Allowed.
|
2020-07-25 23:06:28 +08:00
|
|
|
RequestAllowCount = promauto.NewCounterVec(prometheus.CounterOpts{
|
2019-09-04 23:43:45 +08:00
|
|
|
Namespace: plugin.Namespace,
|
2020-03-31 20:03:18 +02:00
|
|
|
Subsystem: pluginName,
|
|
|
|
|
Name: "allowed_requests_total",
|
2019-09-04 23:43:45 +08:00
|
|
|
Help: "Counter of DNS requests being allowed.",
|
2022-09-12 22:35:59 +02:00
|
|
|
}, []string{"server", "view"})
|
2022-11-01 17:16:55 +08:00
|
|
|
// RequestDropCount is the number of DNS requests being dropped.
|
|
|
|
|
RequestDropCount = promauto.NewCounterVec(prometheus.CounterOpts{
|
|
|
|
|
Namespace: plugin.Namespace,
|
|
|
|
|
Subsystem: pluginName,
|
|
|
|
|
Name: "dropped_requests_total",
|
|
|
|
|
Help: "Counter of DNS requests being dropped.",
|
|
|
|
|
}, []string{"server", "zone", "view"})
|
2019-09-04 23:43:45 +08:00
|
|
|
)
|