Git Product home page Git Product logo

redis-stat's Introduction

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.

redis-stat's People

Contributors

bitdeli-chef avatar flyerhzm avatar frhwang avatar junegunn avatar mmattel avatar stefanvanburen avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.