redis-stat

? A real-time Redis monitoring tool

  • Owner: junegunn/redis-stat
  • Platform:
  • License:: MIT License
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

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.

Overview

Name With Ownerjunegunn/redis-stat
Primary LanguageRuby
Program languageRuby (Language Count: 4)
Platform
License:MIT License
Release Count29
Last Release Name0.4.14 (Posted on 2016-12-13 01:00:54)
First Release Name0.1.0 (Posted on )
Created At2012-07-22 12:47:19
Pushed At2016-12-12 16:01:16
Last Commit At2016-12-13 00:56:54
Stargazers Count2k
Watchers Count118
Fork Count338
Commits Count140
Has Issues Enabled
Issues Count68
Issue Open Count24
Pull Requests Count10
Pull Requests Open Count0
Pull Requests Close Count4
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private
To the top