Project

redis-stat

1.01
No commit activity in last 3 years
No release in over 3 years
There's a lot of open issues
A real-time Redis monitoring tool written in Ruby
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0

Runtime

~> 0.2.5
~> 1.1.9
~> 1.8.2
~> 0.2.0
~> 0.4.0
~> 3.0.2
~> 0.1.4
~> 1.3.3
~> 0.2.9
~> 1.5.0
 Project Readme

redis-stat

redis-stat is a simple Redis monitoring tool written in Ruby.

It is based on INFO command of Redis, and thus generally won't affect the performance of the Redis instance unlike the other monitoring tools based on MONITOR command.

redis-stat allows you to monitor Redis instances

  • either with vmstat-like output from the terminal
  • or with the dashboard page served by its embedded web server.

Installation

gem install redis-stat

If you have trouble setting up a Ruby environment, you can download the executable JAR file and use it instead.

Usage

usage: redis-stat [HOST[:PORT][/PASS] ...] [INTERVAL [COUNT]]

    -a, --auth=PASSWORD              Password
    -v, --verbose                    Show more info
        --style=STYLE                Output style: unicode|ascii
        --no-color                   Suppress ANSI color codes
        --csv=OUTPUT_CSV_FILE_PATH   Save the result in CSV format
        --es=ELASTICSEARCH_URL       Send results to ElasticSearch: [http://]HOST[:PORT][/INDEX]

        --server[=PORT]              Launch redis-stat web server (default port: 63790)
        --daemon                     Daemonize redis-stat. Must be used with --server option.

        --version                    Show version
        --help                       Show this message

Running redis-stat for command-line monitoring

redis-stat
redis-stat 1
redis-stat 1 10
redis-stat --verbose
redis-stat localhost:6380 1 10
redis-stat localhost localhost:6380 localhost:6381 5
redis-stat localhost localhost:6380 1 10 --csv=/tmp/output.csv --verbose

Screenshot

Terminal output

redis-stat in web browser

When --server option is set, redis-stat will open up an embedded web server (default port: 63790) in the background so that you can monitor Redis in your browser.

Since redis-stat pushes updates every interval via Server-sent events, modern browsers are required to view the page.

redis-stat --server
redis-stat --verbose --server=8080 5

# redis-stat server can be daemonized
redis-stat --server --daemon

# Kill the daemon
killall -9 redis-stat-daemon

Screenshot

Dashboard

Windows support

If you're running Windows, you can only install redis-stat on JRuby. Notice that fancy terminal colors will not be printed as they are not supported in the default Windows command prompt.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Test

You need two Redis servers running on localhost with port 6379 and 6380 with no password.

bundle install
bundle exec rake test

About the name redis-stat

Since this project was supposed to be a vmstat-like monitoring script for Redis, naming it redis-stat seemed like a nice idea. That was when I was unaware of the existence of the original redis-stat included in redis-tools written by the creator of Redis himself. (My bad) Although the original C-version hasn't been updated for the past couple of years, you might want to check it out first.