junegunn / redis-stat

(UNMAINTAINED) A real-time Redis monitoring tool
MIT License
2.02k stars 339 forks source link

Improvement: get of redis instances to monitor from CLUSTER NODES command #20

Closed allanwax closed 8 years ago

allanwax commented 9 years ago

Currently you need to list all the instances you want to watch on the command line. This allows you to only monitor what you want. It is also tedious if the number of machines is large.

It would be nice if there was an option applicable to redis cluster (currently in RC1) whereby you only need to specify one machine in the cluster. From that machine issuing a CLUSTER NODES command will list all the members of the cluster. Then use that list to specify the machines to monitor.

ivyang187 commented 9 years ago

In our situation we are not running clusters - but rather stand alone masters (but several of them). Would love to have the ability to be able to go to one UI to monitor multiple stand alone redis instances.

allanwax commented 9 years ago

That is a nice idea. Ad a panel corresponding to to each instance and show the same graphs in that panel for that particular machine. You'd be able to select the machine you want to watch and also have the summary panel (for all machines) to watch.

junegunn commented 9 years ago

Thanks for the suggestion.

From that machine issuing a CLUSTER NODES command will list all the members of the cluster.

Well, it's not hard to imagine an external shell script that takes a single node in the cluster as the argument and prints out the list of all nodes in the cluster, so we can write

redis-stat --server $(list-nodes member1)

To be more useful, I think redis-stat has to deal with dynamic changes in the number nodes in the cluster, but it can be non-trivial to implement.

I love the idea of providing UI for single-instance statistics. What we can do now is either to start multiple redis-stat processes or to ship the logs to ElasticSearch, but both of which seem cumbersome. I'll see what I can do when I get time.

junegunn commented 9 years ago

I just pushed a simple change that enables monitoring of individual instances. Nothing fancy, you can click on the hostnames on the table in "Instance information" section, and it will redirect you to the page that shows the graphs and stats for the selected instance. Could you guys clone this repo and test if it works as expected?

bundle install
test/bin_helper.rb redis-stat --server ...
junegunn commented 9 years ago

I just released 0.4.7 on Rubygems with the aforementioned change. When you start redis-stat for multiple instances, you'll be able to see the select box right next to the redis-stat logo on the navigation bar.

amit-handa commented 7 years ago

sorry to bother. But is there any plan of supporting cluster config changes in redis-stat ?

junegunn commented 7 years ago

@amit-handa Sorry, no plan. I'm not actively developing redis-stat any more.