Track memory used by DoH buffers (#72)
This commit is contained in:
parent
e284f508b4
commit
ab17c00752
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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+)$"),
|
||||
}
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue