Create REST-like API service for Redis DB or expose Redis metrics in Prometheus-compatible format, easily.
/metrics
providing Prometheus-compatible Redis INFO command output).go get
as a new convenient installation option.Cobra
for CLI Interface (#24)Rather than using Go-native way to create the CLI interface, migrate to Cobra.
The only change from user perspective is: if user wants to run the service in background, earlier they run rediseen -d start
, now they need to run rediseen start -d
or rediseen start --daemon-mode
$HOME/.rediseen/rediseen.pid
if run in daemon mode (#25)When run in daemon mode, instead of creating PID file rediseen.pid under "$HOME/", create it under "$HOME/.rediseen/".
/0
), we should return at most 1000 keys while this was missed in the earlier implementation/0
), we list keys first, then get type for each of them. This may cause a lot of round-trips and the performance becomes very bad. Starting from this release, we use Redis's pipeline feature to reduce the Round-Trip-Time, and the performance improves significantly (rather than a performance improvement, maybe I should call this a bugfix instead, because not using pipeline feature in such scenario is a stupid mistake or a serious bug).ExtendedClient.RedisInfo()
performancejson.encoder.SetEscapeHTML
to false to avoid "<" and ">" to be converted to \u0026
and \u003c
in JSON resultINFO
command in Redis CLI./info
endpoint is simplified significantly.A new endpoint /info
(or /info/<section>
) is added to support exposing results of INFO
command.
This allows users to check Redis DB status easily. More importantly, it allows Rediseen
to become a connector between Redis DB and any monitoring system/dashboard.
Others:
It was changed by accident in the last dev cycle
docker run
API Key authentication is supported now.
If environment variable REDISEEN_API_KEY
is set and is not "", authentication is enforced. Then client has to add X-API-KEY
in HTTP header in order to access API, otherwise a 401 error will be given.
By default, there is no authentication enforced, but a WARNING will be printed in the log.
For example, request like /0/key:0/0/0
will get a error reminder return.
Integration test is added, and it's against multiple Redis versions.