Closed gupta-mukul closed 1 year ago
It's possible but creating the connection for every scrape gives a reliable indicator that connecting to the Redis instance succeeded and that it's up and accepting connections.
Why do you want to keep the connection alive?
It seems like, creating a new connection every time will result in some overhead, though I do not have any numbers which help determine if that overhead is significant.
Another issue is that on the dashboard, the number of connections counter keeps on increasing which masks any disconnections with redis clients (other than redis exporter).
Is any such configuration already available which could help keep a permanent connection?
There is no such configuration right now and I don't plan on adding one.
...which masks any any disconnections with redis clients
- can you elaborate on that one? What exactly is the concern and what else have you tried to address this? E.g. there's the list of connected clients - it includes a name so you can identify the redis_exporter - can you address your problem using that metric?
Describe the problem Upon receiving the request from Prometheous, redis exporter is making a connection to redis, scraping data, and closing the connection. Is it possible to keep this connection alive?
What version of redis_exporter are you running? 4.1.1
Running the exporter ./redis_exporter (no parameters)
environment variable set: REDIS_EXPORTER_SCRIPT