Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install the redis monitoring tool redis live

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly shows you "redis monitoring tool redis live how to install", the content is easy to understand, clear, hope to help you solve doubts, the following let the editor lead you to study and learn "redis monitoring tool redis live how to install" this article.

Time is limited, only a simple list of installation steps

You can refer to the official Redis live documentation.

Http://www.nkrode.com/article/real-time-dashboard-for-redis

1. Install pip

Wget "https://pypi.python.org/packages/source/p/pip/pip-1.5.4.tar.gz#md5=834b2904f92d46aaa333267fb1c922bb"-no-check-certificate

Tar xf pip-1.5.4.tar.gz

Cd pip-1.5.4

Python setup.py install

two。 Install redis live dependencies

Install dependent tornado redis module python-dateutil,argparse (this is required for python version less than 2.7)

Install Dependencies

Tornado pip install tornado

Redis.py pip install redis

Python-dateutil pip install python-dateutil

You'll also need argparse if you're running Python

< 2.7: · argparse pip install argparse 3.安装redis live wget https://codeload.github.com/nkrode/RedisLive/legacy.zip/master 解压到/application/tools 进入到解压目录下的src目录下 vim redis-live.conf 没有可以将src目录下的redis-live.conf.example 复制一份 { "RedisServers": [ //此处配置的是redis的地址及端口 多个可以按照下面的格式,{}添加 { "server": "192.168.14.192", "port" : 6379 } ], "DataStoreType" : "sqlite",//172.16.0.70采用的是sqlite //如果DataStoreType是用redis 不是用 sqlite 就用配置 RedisStatsServer "RedisStatsServer": { "server": "192.168.14.192", "port" : 6381 }, //如果DataStoreType不是用redis是用sqlite 就要配置SqliteStatsStore "SqliteStatsStore": { "path": "/opt/portal/RedisLive/src/db/redislive.sqlite" } } RedisServers为你要监控的redis实例,可以添加多个 如果redis有密码,可以在实例配置中加入password选项; DataStoreType决定使用那种类型的数据存储,(推荐用sqlite) 如果是redis,使用RedisStatsServer作为数据存储的目标;(配置的redis 不要是被监控的,所以还是推荐用sqlite) 如果是sqlite,使用SqliteStatsStore作为数据存储的目标。 RedisStatsServer是用于存储RedisLive监控数据的redis实例, if you don't have a spare redis instance to use to store RedisLive data, then you can configure RedisLive to use sqlite by changing to "DataStoreType" : "sqlite" RedisLive的功能分两个部分: 一个部分是redis-server状态数据的采集,通过src/redis-monitor.py来执行; 另外一部分功能是提供对状态数据的查询服务,通过src/redis-live.py来提供web服务。 初始化DB(必须的,否则报错) # cd db # cat schema.sql | sqlite3 redislive.sqlite 后台启动 */5 * * * * cd /application/tools/nkrode-RedisLive-6debcb4/src; ./redis-monitor.py --duration 20 >

/ dev/null 2 > & 1

Nohup. / redis-live.py & > / dev/null 2 > & 1

The above is all the contents of the article "how to install the redis Monitoring tool redis live". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report