diff --git a/integration_test.go b/integration_test.go index f0530ef..f9c604e 100644 --- a/integration_test.go +++ b/integration_test.go @@ -44,7 +44,14 @@ func TestIntegration(t *testing.T) { } // Check some expected metrics are present - for _, metric := range []string{"go_info", "unbound_queries_total", "unbound_response_time_seconds", "unbound_cache_hits_total"} { + for _, metric := range []string{ + "go_info", + "unbound_queries_total", + "unbound_response_time_seconds", + "unbound_cache_hits_total", + "unbound_query_https_total", + "unbound_memory_doh_bytes", + } { if _, ok := metrics[metric]; !ok { t.Errorf("Expected metric is missing: %s", metric) } diff --git a/unbound_exporter.go b/unbound_exporter.go index ee925cf..291bb00 100644 --- a/unbound_exporter.go +++ b/unbound_exporter.go @@ -196,7 +196,7 @@ var ( "^num\\.query\\.tls\\.resume$"), newUnboundMetric( "query_https_total", - "Total number of queries that were made using HTTPS towards the Unbound server.", + "Total number of DoH queries that were made towards the Unbound server.", prometheus.CounterValue, nil, "^num\\.query\\.https$"), @@ -325,8 +325,13 @@ var ( "Total number of triggered Response Policy Zone actions, by type.", prometheus.CounterValue, []string{"type"}, - "^num\\.rpz\\.action\\.rpz-([\\w-]+)$", - ), + "^num\\.rpz\\.action\\.rpz-([\\w-]+)$"), + newUnboundMetric( + "memory_doh_bytes", + "Memory used by DoH buffers, in bytes.", + prometheus.GaugeValue, + []string{"buffer"}, + "^mem\\.http\\.(\\w+)$"), } )