question

HaixiaCheng-6065 avatar image
0 Votes"
HaixiaCheng-6065 asked HaixiaCheng-6065 commented

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.

https://docs.microsoft.com/en-us/azure/azure-monitor/insights/container-insights-prometheus-integration

I have AKS cluster with application deployed. It requires basic auth to access metrics, e.g. http://user@psw@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@psw@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?

azure-monitorazure-kubernetes-service
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @HaixiaCheng-6065,

Welcome to Microsoft Q&A platform and thanks for your query.

Please give some more time for Community SME's on the topic or our team review your scenario and get back to you at the earliest.

0 Votes 0 ·

Hi @HaixiaCheng-6065,

Here is an update to your question:

Currently we don’t support basic auth with clear text password. Our core components support it, its just that we haven’t exposed it to user as password will be in plain text.

0 Votes 0 ·

Thanks for your response, do we have a workaround for this kind of usage?

0 Votes 0 ·

0 Answers