aboutsummaryrefslogtreecommitdiff
path: root/plugin/acl/metrics.go
diff options
context:
space:
mode:
authorGravatar George Shammas <georgyo@gmail.com> 2021-02-01 09:52:23 -0500
committerGravatar GitHub <noreply@github.com> 2021-02-01 06:52:23 -0800
commit117a389e40832cdbee69bd9daa04ca35611082ff (patch)
tree93303c8a557e3118aa529a5742053a1a9a47cb05 /plugin/acl/metrics.go
parentd289b4ea2623dcd0dd13ab7ed88ab764a7408f91 (diff)
downloadcoredns-117a389e40832cdbee69bd9daa04ca35611082ff.tar.gz
coredns-117a389e40832cdbee69bd9daa04ca35611082ff.tar.zst
coredns-117a389e40832cdbee69bd9daa04ca35611082ff.zip
plugin/acl: add the ability to filter records (#4389)
Currently ACLs only allow for allow and block, however it isn't always desirable to set the status code to REFUSED. Often times you want to completely hide the fact that those records even exist. Adding the ability to acl to filter results makes it significantly harder for a third party to know that the records are being masked. Signed-off-by: George Shammas <george@shamm.as>
Diffstat (limited to 'plugin/acl/metrics.go')
-rw-r--r--plugin/acl/metrics.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/plugin/acl/metrics.go b/plugin/acl/metrics.go
index b0357cab1..76f30b5a6 100644
--- a/plugin/acl/metrics.go
+++ b/plugin/acl/metrics.go
@@ -15,6 +15,13 @@ var (
Name: "blocked_requests_total",
Help: "Counter of DNS requests being blocked.",
}, []string{"server", "zone"})
+ // 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.",
+ }, []string{"server", "zone"})
// RequestAllowCount is the number of DNS requests being Allowed.
RequestAllowCount = promauto.NewCounterVec(prometheus.CounterOpts{
Namespace: plugin.Namespace,