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

Metrics endpoint throws "Invalid username or password" #503

Closed
somnathpawar opened this issue Jun 17, 2022 · 1 comment
Closed

Metrics endpoint throws "Invalid username or password" #503

somnathpawar opened this issue Jun 17, 2022 · 1 comment

Comments

@somnathpawar
Copy link

somnathpawar commented Jun 17, 2022

Describe the bug
I have MongoDB 4.2 container running on K8s. There is a side container for MongoDB exporter on the same pod. I had DCU mongodb exporter before but it seems off with MongoDB 4.2 upgrade. So now I have replaced the image with Percona docker image "percona/mongodb_exporter:0.31.0". Pod get created properly with both the containers, but somehow when I try to access the pod's /metrics endpoint for mongodb_exporter, it throws following error:

curl -m 2 http://10.210.104.101:9216/metrics
Invalid username or password

I guess that's why the Prometheus also shows "server returned HTTP status 401 Unauthorized" for this endpoint." error on it's dashboard. So metrics are not being exported.

To Reproduce
Steps to reproduce the behavior:

  1. I have passed "MONGODB_URI" & "HTTP_AUTH" parameters as environment variables through Kubernetes container config.

Environment

  • OS,: Linux
  • environment (docker, k8s, etc): K8s
  • MongoDB version: 4.2.20

I am not sure if any other parameter/environment variable is required to pass the authentication details, as HTTP_AUTH has been already set with pattern as "{username}:{password}".

Can anyone help with this? Thanks in advance.

@somnathpawar somnathpawar changed the title Metrics endpoint throw "Invalid username or password" Metrics endpoint throws "Invalid username or password" Jun 17, 2022
@ShashankSinha252 ShashankSinha252 self-assigned this Jun 23, 2022
@denisok
Copy link
Contributor

denisok commented Sep 14, 2022

Hi @somnathpawar ,

this exporter doesn't support HTTP_AUTH as far as I know. What that env suppose to do?

Maybe related to #380 #559

@igroene igroene closed this as not planned Won't fix, can't repro, duplicate, stale May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants