You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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.
The text was updated successfully, but these errors were encountered:
somnathpawar
changed the title
Metrics endpoint throw "Invalid username or password"
Metrics endpoint throws "Invalid username or password"
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:
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:
Environment
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.
The text was updated successfully, but these errors were encountered: