You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When calling the agent telemetry endpoint /v1/agent/metrics, metrics can be viewed by default in a json format or using the parameter format=prometheus to receive the metrics in prometheus format. By default, all metrics described in the documentation are available in both json and prometheus format.
However, if the prefix_filter option is set, the configuration seems to only apply to the non-Prometheus view of the metrics. Similarly, filter_default does not have any effect on the prometheus view of metrics.
Check metrics on both the json and prometheus metrics interface to see that serf metrics are the only ones remaining on the non-prometheus result but prometheus still contains other metrics
root@mynode:/home/wolfmd# curl -sS 127.0.0.1:8500/v1/agent/metrics?format=prometheus | head
# HELP consul_acl_ResolveToken This measures the time it takes to resolve an ACL token.
# TYPE consul_acl_ResolveToken summary
consul_acl_ResolveToken{quantile="0.5"} NaN
consul_acl_ResolveToken{quantile="0.9"} NaN
consul_acl_ResolveToken{quantile="0.99"} NaN
consul_acl_ResolveToken_sum 0
consul_acl_ResolveToken_count 0
# HELP consul_acl_authmethod_delete
# TYPE consul_acl_authmethod_delete summary
consul_acl_authmethod_delete{quantile="0.5"} NaN
Consul info for both Client and Server
Agent is running consul 1.17.4. This can be reproduced in agent dev mode
I'm not sure if I should note this here or in a new issue, but setting the metrics_prefix to anything cuts the number of metrics exported in prometheus format down dramatically
Overview of the Issue
When calling the agent telemetry endpoint /v1/agent/metrics, metrics can be viewed by default in a json format or using the parameter format=prometheus to receive the metrics in prometheus format. By default, all metrics described in the documentation are available in both json and prometheus format.
However, if the prefix_filter option is set, the configuration seems to only apply to the non-Prometheus view of the metrics. Similarly, filter_default does not have any effect on the prometheus view of metrics.
Reproduction Steps
Start an agent with a prefix_filter parameter such as removing
consul.serf
metricsconsul agent -dev -node localhost -client 127.0.0.1 -hcl 'telemetry { prometheus_retention_time = "10m", filter_default = false, prefix_filter = ["+consul.serf"] }'
Confirm the configuration is in place on the agent
Consul info for both Client and Server
Agent is running consul 1.17.4. This can be reproduced in agent dev mode
Operating system and Environment details
Running on bare metal Debian
The text was updated successfully, but these errors were encountered: