helm-charts icon indicating copy to clipboard operation
helm-charts copied to clipboard

Secure Prometheus Server With Basic Password Authentication

Open rajivram89 opened this issue 3 years ago • 3 comments

Hi Team,

I am trying to enable basic authentication to the Prometheus application. I am following the steps as per the Prometheus Documentation [https://prometheus.io/docs/guides/basic-auth/]. I have configured the web-config.xml as per the documentation.

Below is the content of web-config.xml:

basic_auth_users: admin: "##$#$#$#$#$#$#$"

But when I am validating the configuration, it fails and throws me the below error:

[root@Promethus-server prometheus-2.17.0-rc.0.linux-amd64]# ./promtool check config /etc/prometheus/web-config.yml Checking /etc/prometheus/web-config.yml FAILED: parsing YAML file /etc/prometheus/web-config.yml: yaml: unmarshal errors: line 1: field basic_auth_users not found in type config.plain

Can someone help me on this?

Regards Rajiv

rajivram89 avatar Jul 07 '22 15:07 rajivram89

Even I am facing same issue

chegde20121 avatar Jul 15 '22 04:07 chegde20121

As far as I know, promtool check config does not understand web config's scheme. You'd need to use promtool check web-config against a web config file but this argument has been available since ~2.24. Release 2.17 is quite outdated.

zeritti avatar Jul 15 '22 07:07 zeritti

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions.

stale[bot] avatar Sep 20 '22 17:09 stale[bot]

This issue is being automatically closed due to inactivity.

stale[bot] avatar Oct 12 '22 05:10 stale[bot]