mirror of https://github.com/status-im/consul.git
Add a test for legacy metrics with a whitelist filter
This commit is contained in:
parent
c728564994
commit
a3e9ac5840
|
@ -1658,11 +1658,29 @@ func TestConfigFlagsAndEdgecases(t *testing.T) {
|
|||
`},
|
||||
patch: func(rt *RuntimeConfig) {
|
||||
rt.DataDir = dataDir
|
||||
rt.TelemetryAllowedPrefixes = append([]string{"foo"}, rt.TelemetryAllowedPrefixes...)
|
||||
rt.TelemetryBlockedPrefixes = append([]string{"bar"}, rt.TelemetryBlockedPrefixes...)
|
||||
rt.TelemetryAllowedPrefixes = []string{"foo"}
|
||||
rt.TelemetryBlockedPrefixes = []string{"bar", "consul.consul"}
|
||||
},
|
||||
warns: []string{`Filter rule must begin with either '+' or '-': "nix"`},
|
||||
},
|
||||
{
|
||||
desc: "telemetry.enable_deprecated_names adds allow rule for whitelist",
|
||||
flags: []string{
|
||||
`-data-dir=` + dataDir,
|
||||
},
|
||||
json: []string{`{
|
||||
"telemetry": { "enable_deprecated_names": true, "filter_default": false }
|
||||
}`},
|
||||
hcl: []string{`
|
||||
telemetry = { enable_deprecated_names = true filter_default = false }
|
||||
`},
|
||||
patch: func(rt *RuntimeConfig) {
|
||||
rt.DataDir = dataDir
|
||||
rt.TelemetryFilterDefault = false
|
||||
rt.TelemetryAllowedPrefixes = []string{"consul.consul"}
|
||||
rt.TelemetryBlockedPrefixes = []string{}
|
||||
},
|
||||
},
|
||||
{
|
||||
desc: "encrypt has invalid key",
|
||||
flags: []string{
|
||||
|
|
|
@ -447,24 +447,6 @@ These metrics give insight into the health of the cluster as a whole.
|
|||
<td>events / interval</td>
|
||||
<td>counter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>`consul.dns.domain_query.<agent>`</td>
|
||||
<td>This tracks how long it takes to service forward DNS lookups on the given Consul agent.</td>
|
||||
<td>ms</td>
|
||||
<td>timer</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>`consul.dns.ptr_query.<agent>`</td>
|
||||
<td>This tracks how long it takes to service reverse DNS lookups on the given Consul agent.</td>
|
||||
<td>ms</td>
|
||||
<td>timer</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>`consul.dns.stale_queries`</td>
|
||||
<td>Available in Consul 0.7.1 and later, this increments when an agent serves a DNS query based on information from a server that is more than 5 seconds out of date.</td>
|
||||
<td>queries</td>
|
||||
<td>counter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>`consul.http.<verb>.<path>`</td>
|
||||
<td>This tracks how long it takes to service the given HTTP request for the given verb and path. Paths do not include details like service or key names, for these an underscore will be present as a placeholder (eg. `consul.http.GET.v1.kv._`)</td>
|
||||
|
|
Loading…
Reference in New Issue