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

Read REDIS password from /var/run/redis/auth/passwd #4

Open
XioNoX opened this issue Apr 19, 2023 · 0 comments
Open

Read REDIS password from /var/run/redis/auth/passwd #4

XioNoX opened this issue Apr 19, 2023 · 0 comments

Comments

@XioNoX
Copy link

XioNoX commented Apr 19, 2023

Trying your exporter on Dell SONiC 4.0.5 and I noticed that the password is hardcoded as empty string in https://github.com/kamelnetworks/sonic_exporter/blob/main/sonic_exporter.go#L131

I don't know when this changed, but my SONiC version requires a password

$ docker run -v /var/run/redis:/var/run/redis:ro ghcr.io/kamelnetworks/sonic_exporter
level=info msg="Starting up" exporter-git-hash=e1d7f32 exporter-version=0.2.0 lib-node-version=v1.3.1 lib-prometheus-version=v1.11.0
level=fatal msg="Failed to read configuration from redis: NOAUTH Authentication required.  "

However that is conveniently sitting in:

$ cat /var/run/redis/auth/passwd 
aaabbbcccddddeeefff==

(password modified here, but to show that it's the only string in the file).

Possible behavior is to check if the file exists and in that case try to use it. Then try an empty string if no success.

Once this is solved and I get it working, I'll be happy to give the steps needed for it, as for example neither sonic-package-manager nor "SONiC click" exist on this version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant