aboutsummaryrefslogtreecommitdiff
path: root/plugin/local/metrics.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/local/metrics.go')
-rw-r--r--plugin/local/metrics.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/plugin/local/metrics.go b/plugin/local/metrics.go
new file mode 100644
index 000000000..361f9ab33
--- /dev/null
+++ b/plugin/local/metrics.go
@@ -0,0 +1,18 @@
+package local
+
+import (
+ "github.com/coredns/coredns/plugin"
+
+ "github.com/prometheus/client_golang/prometheus"
+ "github.com/prometheus/client_golang/prometheus/promauto"
+)
+
+var (
+ // LocalhostCount report the number of times we've seen a localhost.<domain> query.
+ LocalhostCount = promauto.NewCounter(prometheus.CounterOpts{
+ Namespace: plugin.Namespace,
+ Subsystem: "local",
+ Name: "localhost_requests_total",
+ Help: "Counter of localhost.<domain> requests.",
+ })
+)