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.
通常來說狐赡,不會像基于MONITOR命令的監(jiān)控工具一樣,對Redis本身有性能上的影響
sudo apt-get autoremove --purge ruby*
sudo apt-get install ruby-full
gem install redis-stat
redis-stat命令參數(shù)
usage: redis-stat [HOST[:PORT] ...] [INTERVAL [COUNT]]
-a, --auth=PASSWORD? ? ? ? ? ? 設(shè)置密碼
-v, --verbose? ? ? ? ? ? ? ? ? 顯示更多信息
--style=STYLE? ? ? ? ? ? ? 輸出編碼類型: unicode|ascii
--no-color? ? ? ? ? ? ? ? ? 取消ANSI顏色編碼
--csv=OUTPUT_CSV_FILE_PATH? 以CSV格式存儲結(jié)果
--es=ELASTICSEARCH_URL? ? ? 把結(jié)果發(fā)送到 ElasticSearch: [http://]HOST[:PORT][/INDEX]
--server[=PORT]? ? ? ? ? ? 運行redis-stat的web server (默認端口號:63790)
--daemon? ? ? ? ? ? ? ? ? ? 使得redis-stat成為進程。必須使用 --server 選項
--version? ? ? ? ? ? ? ? ? 顯示版本號
--help? ? ? ? ? ? ? ? ? ? ? 顯示幫助信息
redis-stat運行命令行監(jiān)控
redis-stat
redis-stat1
redis-stat110
redis-stat --verbose
redis-stat localhost:6380110
redis-stat localhost localhost:6380localhost:63815
redis-stat localhost localhost:6380110--csv=/tmp/outpu.csv --verbose
Server端運行界面
Web界面中的redis-stat
當(dāng)設(shè)置–server選項之后,redis-stat會在后臺啟動一個嵌入式的web server(默認端口號:63790),可以讓你在瀏覽器中監(jiān)控Redis
redis-stat --server
redis-stat --verbose --server=80805
# redis-stat server can be daemonized
redis-stat --server --daemon
# Kill the daemon
killall -9redis-stat-daemon
Web端運行界面
然后在你的瀏覽器中輸入:
http://?localhost:63790