Azure monitor Containers and prometheus integration 401 Unauthorized
Hi, team
I am setting up monitoring and alert system for my applications using prometheus.
In reference to below MSDN documentation . Executed steps document in the reference which needs more details.
I have AKS cluster with application deployed. It requires basic auth to access metrics, e.g. http://user@Anonymous @10.240.1.78:8001/wls-exporter/metrics
I configured prometheus with basic auth, following https://prometheus.io/docs/guides/basic-auth/, like:
basic_auth:
username: user
password: secret
Prometheus can scrape the metrics from the application.
I used the YAML file from https://aka.ms/container-azm-ms-agentconfig to integrate metrics from Prometheus to Azure Monitoring.
I tried url "http://user@Anonymous @10.240.1.78:8001/wls-exporter/metrics" and "http://10.240.1.78:8001/wls-exporter/metrics". Both case got 401 Unauthorized error.
Error in plugin: http://10.240.1.78:8001/wls-exporter/metrics returned HTTP status 401 Unauthorized
How to set the basic auth?