-
Notifications
You must be signed in to change notification settings - Fork 886
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
Scrape multiple redis instances with different passwords #278
Comments
I have installed the new verison of redis exporter v1.0.3 where there is not much to config on redis_exporter side. Instead, we have configured prometheus to scrape various target redis instances. |
redis_exporter v1.x let's you provide the password via the command line using This will use the same password for all the instances you scrape. If they use different passwords then right now you need to use multiple exporters and configure each of them with a different password. There's a discussion here](#256 (comment)) that explains what would need to change to let the exporter support multiple passwords but it's not implemented and right now there's no plan to do so (not enough people seem to have this problem). |
Thanks for your response. |
The issue is if we pass password as a command string argument, then anyone will be able to see the password, if they do a 'ps -lef ' , right?? |
You can use the |
+1 Lines 136 to 137 in 9e802cd
|
I try it but it does NOT work. Lines 80 to 81 in 4572ac5
@oliver006 Could |
The problem isn't the communication from the redis_exporter to the redis instance (you're correct, TLS would help with this) but the plain text http request from the Prometheus server to the redis_exporter. The paragraph from the README only applies to single-instance configs and doesn't extend to the multiple-instance scraping viz the |
I see your reason, thanks. |
Yeah, sorry this is a bit more inconvenient. If enough people complain about this and are affected by it then we can see what options we have but so far it's not been much of an issue. |
Same here, we don't have the same password for redis instances and running multiple redis_exporter is not efficient. |
I agree that we should again support multiple instances with different passwords as it's a common use case. |
I agree that we should again support multiple instances with different passwords as it's a common use case. |
Multiple instances with different passwords
Use sample# No password authentication
curl http://127.0.0.1:9121/scrape?target=redis://192.168.10.115:6379
# Enable password authentication
curl http://127.0.0.1:9121/scrape?target=redis://h:[email protected]:6379
|
Right, that's the problem, the password will be everywhere as it's part of the target now. I think you could use a post scrape relabel config to get rid of it but not sure what the regex would look like. |
You can relabel to hide password from Target labels but it is still to be shown under Discovered labels. |
We should bring back redis multi-instance monitoring support as it was before. Those "theoretical" best practices do not make sense: running multiple redis_exporters is not efficient, using the same password for all redis instances everyone understands what, providing passwords in URL is even worse. |
how to monitor redis-cluster by redis_exporter ? |
@miaocbin - have an exporter scrape each of the redis instances |
any ideas how to scrape like thousand redis instances with thousands passwords? |
To use this fork #332 |
It really depends on what your infrastructure looks like,where and how you run those thousands of instances, how you run your service discovery, etc etc |
This is how I did it. It is not very good, but it works, and the Redis password will not be seen in the Prometheus web console. Such as:
redis-exporter.yaml:
|
Closing this, it's been > 1.5 years since 1.x has been released. |
Describe the problem
A clear and concise description of what the bug is.
What version of redis_exporter are you running?
Please run
redis_exporter --version
if you're not sure what version you're running.[ ] 0.3x.x
[ ] 1.x.x
Running the exporter
What's the full command you're using to run the exporter? (please remove passwords and other sensitive data)
Expected behavior
What metrics are missing? What metrics are wrong? Is something missing that was present in an earlier version?
Did you upgrade from 0.3x.x to 1.0 and are scraping multiple hosts? Have a look here how the configuration changed.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: