From bcb586bee2e5637869d7a310de738ae9daf6c683 Mon Sep 17 00:00:00 2001 From: Chris Piraino Date: Wed, 2 Sep 2020 10:24:23 -0500 Subject: [PATCH] Set metrics reporting interval to 9 seconds This is below the 10 second interval that lib/telemetry.go implements as its aggregation interval, ensuring that we always report these metrics. --- agent/consul/config.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/agent/consul/config.go b/agent/consul/config.go index 955fb49d66..4316475651 100644 --- a/agent/consul/config.go +++ b/agent/consul/config.go @@ -593,9 +593,12 @@ func DefaultConfig() *Config { }, }, + // Stay under the 10 second aggregation interval of + // go-metrics. This ensures we always report the + // usage metrics in each cycle. + MetricsReportingInterval: 9 * time.Second, ServerHealthInterval: 2 * time.Second, AutopilotInterval: 10 * time.Second, - MetricsReportingInterval: 10 * time.Second, DefaultQueryTime: 300 * time.Second, MaxQueryTime: 600 * time.Second,