I have a metrics path that requires url parameters. I am using relabel_configs
to grab a custom metrics_path
.
relabel_configs:
- source_labels: [__meta_consul_service_metadata_metrics_path]
action: replace
regex: (.+)
replacement: $1
target_label: __metrics_path__
It works and the url makes it to Service discovery which finds this tag:
__meta_consul_service_metadata_metrics_path="/metrics/detailed?family=queue_coarse_metrics&family=queue_consumer_count"
When it converts it into a Target, the Endpoint becomes:
http://10.254.0.8:64885/metrics/detailed%3Ffamily=queue_coarse_metrics&family=queue_consumer_count
Is there some way to escape the question mark (?
) so that it is parsed properly?