wsb3383
wsb3383

Reputation: 3891

Obtaining keyspace hit and miss from Redis

Is there a programmatic way to obtain the keyspace_hits and keyspace_miss values programmatically through some REST or Groovy API?

Upvotes: 4

Views: 5517

Answers (2)

dmportella
dmportella

Reputation: 4724

You can usually get all the info you need from just connecting to the server with any redis client.

You can get all the info by using this command Info.

There is an interesting article here that the Author shows how to trace gets and sets and messing around with the redis source code.

There is some third party tools that lets you monitor redis a quick google search you give you a few like this one. (I am not endorsing them it is just an example).

There is also the monitor command in redis that shows you everything as it happens which you could make your own monitoring app.

Upvotes: 1

willglynn
willglynn

Reputation: 11520

You can get these stats programmatically through the normal Redis interface:

> INFO
...
keyspace_hits:414197256
keyspace_misses:661663278
...

See the INFO command documentation for more.

Redis doesn't speak HTTP; it only speaks the Redis protocol. You could put webdis in front if required.

Upvotes: 9

Related Questions