Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grafana: internal metrics endpoint not accessible from browser if basic auth is enabled #86902

Open
wasim-nihal opened this issue Apr 25, 2024 · 0 comments · May be fixed by #86904
Open

grafana: internal metrics endpoint not accessible from browser if basic auth is enabled #86902

wasim-nihal opened this issue Apr 25, 2024 · 0 comments · May be fixed by #86904

Comments

@wasim-nihal
Copy link
Contributor

What happened?

#################################### Internal Grafana Metrics ############
# Metrics available at HTTP URL /metrics and /metrics/plugins/:pluginId
[metrics]
enabled              = true
interval_seconds     = 10
# Disable total stats (stat_totals_*) metrics to be generated
disable_total_stats = false
# The interval at which the total stats collector will update the stats. Default is 1800 seconds.
total_stats_collector_interval_seconds = 1800

#If both are set, basic auth will be required for the metrics endpoints.
basic_auth_username = foo
basic_auth_password = bar

If basic auth is enabled for the internal metrics endpoint, it is not accessible via the browser. (The browsers do not pop-up the dialog box to provide basic auth credentials).

What did you expect to happen?

If basic auth is enabled, the browser should pop-up the dialogue box to fill the username and password of the metrics endpoint and the metrics should be visible ic case of right credentials.

Did this work before?

no

How do we reproduce it?

  1. enable internal metrics and set the basic auth username and password in the ini file
  2. start the grafana and open the http://:3000/metrics endpoint

I have identified the fix for this issue and would like to open the PR.

Is the bug inside a dashboard panel?

No response

Environment (with versions)?

Grafana: latest (I have checked by building the binary from main branch)
OS: Ubuntu
Browser: Chrome/Edge

Grafana platform?

None

Datasource(s)?

No response

wasim-nihal added a commit to nokia/grafana that referenced this issue Apr 25, 2024
Signed-off-by: Syed Nihal <syed.nihal@nokia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants