On Fri, Nov 22, 2019 at 11:25:44AM +0100, Christopher Faulet wrote:
> URI delimiters must not be encoded, except if you want to escape it. So,
> your first url is not equivalent to the second one. The encoded question
> mark is part of the path in the first url, it is not the query-string
> delimiter.

wow I learned something today :)
and there is indeed a specific parameter for this precise reason you
mentioned. The end config looks like:

  - job_name: 'lb-metrics'
    metrics_path: '/metrics'
    params:
      scope: ['global', 'frontend', 'backend']
    consul_sd_configs:
      - server: localhost:8500
        services:
          - lb
    relabel_configs:
      - source_labels: ['__meta_consul_dc']
        target_label: 'dc'
      - source_labels: ['__address__', '__meta_consul_service_id']
        target_label: 'instance'

and this time it works; I'm reassured :)

> But, cause of your remark, I re-read the function code and it revealed a
> bug. The query-string is decoded before parsing. Only parameters names and
> values must be decoded. Thus, a fix is still required.

good, I will handle the fix.

Thanks,
-- 
William

Reply via email to