I was able to use params configuration in scrape_config to eliminate the url encoding based on this post, however, the resulted url is out of order. The url I need is
/metrics/exporter?endpoint=<IP>&apitoken=<API Token>
However, prometheus displays it as
/metrics/exporter?apitoken=<API_Token>&endpoint=<IP>
As you can see, the field apitoken and endpoint are reversed. As a result, it's not grabbing the data.
Below is the scrape_config snippet:
- job_name: "job1"
params:
endpoint: ['<IP>']
apitoken: ['<API Token>']
metrics_path: "/metrics/exporter"
I believe I'm close to getting it but I'm just not sure where I need to look at. I have already swapped the field endpoint and apitoken in the scrape_config but that doesn't seem to work.