A tool to deploy redis-cli
to Cloud Foundry and to use it for remote Redis instances diagnostic via Web Application.
- download the release file
- extract to a local folder
- update
manifest.yml
if necessary cf push
the app to Cloud Foundry- bind to
redis
service and restart app
- Get
Redis
Infomration fromVCAP_SERVICES
for example:
"system_env_json": {
"VCAP_SERVICES": {
"p.redis": [
{
"label": "p.redis",
"provider": null,
"plan": "cache-small",
"name": "svc-redis",
"tags": [
"redis",
"pivotal",
"on-demand"
],
"instance_name": "svc-redis",
"binding_name": null,
"credentials": {
"host": "q-s0.redis-instance.pcfone-dynamicservices.service-instance-55eece71-9cbc-4dac-94fb-aef574242dbf.bosh",
"password": "bQpstBVTwzYyKH3ciua0Xt4MHI503S",
"port": 6379
},
"syslog_drain_url": null,
"volume_mounts": []
}
]
}
},
- Login the Web Interface Terminal, or use gotty-client to connect Gotty
for example:
gotty-client https://<GOTTY_USERNAME>:<GOTTY_PASSWORD>@https://gotty-redis-cli.cf.exmaple.com
- Run
redis-cli
to Connect Remote Redis Server
./redis-cli -h <host> -p <port> -a <password>
Useful redis-cli
References:
info
ping
memory stats
$ redis-cli --stat
$ redis-cli --bigkeys
$ redis-cli --scan | head -10
$ redis-cli monitor
$ redis-cli --latency