# redis-stat
_redis-stat_ is a simple Redis monitoring tool written in Ruby.
It is based on [INFO](http://redis.io/commands/info) command of Redis,
and thus generally won't affect the performance of the Redis instance
unlike the other monitoring tools based on [MONITOR](http://redis.io/commands/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](https://github.com/junegunn/redis-stat/releases) 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](https://github.com/junegunn/redis-stat/raw/master/screenshots/redis-stat-0.3.0.png)
## 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](http://www.w3.org/TR/eventsource/),
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](https://github.com/junegunn/redis-stat/raw/master/screenshots/redis-stat-web.png)
## Windows support
If you're running Windows, you can only install redis-stat on
[JRuby](http://jruby.org/). 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.
```sh
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](https://github.com/antirez/redis-tools/blob/master/redis-stat.c)
included in [redis-tools](https://github.com/antirez/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 监控工具.zip
共40个文件
rb:8个
js:8个
png:7个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 38 浏览量
2024-12-02
19:57:27
上传
评论
收藏 1.37MB ZIP 举报
温馨提示
(Unmaintained) Real-time Redis monitoring tool redis-statredis-stat is a simple Redis monitoring tool written in Ruby. It is based on the INFO command of Redis, so unlike other monitoring tools based on the MONITOR command, it generally does not affect the performance of the Redis instance. redis-stat allows you to monitor a Redis instance using the terminal's vmstat class output or using the dashboard page provided by its embedded web server. Install gem install redis-stat If you have trouble s
资源推荐
资源详情
资源评论
收起资源包目录
(未维护) 实时 Redis 监控工具.zip (40个子文件)
screenshots
redis-stat-web.png 229KB
redis-stat-0.1.0.png 178KB
redis-stat-0.3.0.png 523KB
redis-stat-0.2.4.png 331KB
lib
redis-stat
server.rb 3KB
elasticsearch.rb 1KB
option.rb 4KB
version.rb 41B
server
public
select2
select2.css 19KB
select2.min.js 65KB
select2-bootstrap.css 3KB
js
site.js 6KB
bootstrap
js
bootstrap.min.js 25KB
img
glyphicons-halflings-white.png 9KB
glyphicons-halflings.png 12KB
css
bootstrap.min.css 99KB
bootstrap-responsive.min.css 16KB
jquery-1.8.2.min.js 91KB
css
site.css 2KB
favicon.ico 198B
jqplot
jquery.jqplot.min.css 3KB
jqplot.canvasAxisTickRenderer.min.js 3KB
jqplot.canvasAxisLabelRenderer.min.js 3KB
jqplot.canvasTextRenderer.min.js 16KB
jquery.jqplot.min.js 169KB
favicon.png 162B
views
index.erb 6KB
constants.rb 6KB
redis-stat.rb 13KB
Rakefile 202B
标签.txt 2B
LICENSE 1KB
redis-stat.gemspec 2KB
bin
redis-stat 301B
资源内容.txt 777B
Gemfile 95B
test
bin_helper.rb 278B
test_redis-stat.rb 8KB
.gitignore 154B
README.md 4KB
共 40 条
- 1
资源评论
赵闪闪168
- 粉丝: 1646
- 资源: 4872
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功