<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[Ops运维 | Mr`kang Blog｜小豆子]]></title> 
<link>https://www.cnmysql.com/index.php</link> 
<description><![CDATA[关注服务器运维技术、DB优化、Docker虚拟化、自动化运维、工作积累]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[Ops运维 | Mr`kang Blog｜小豆子]]></copyright>
<item>
<link>https://www.cnmysql.com/post//</link>
<title><![CDATA[redis监控利器redis-live]]></title> 
<author>kangyang &lt;kangyang315@qq.com&gt;</author>
<category><![CDATA[WEB技术]]></category>
<pubDate>Tue, 23 Sep 2014 07:44:46 +0000</pubDate> 
<guid>https://www.cnmysql.com/post//</guid> 
<description>
<![CDATA[ 
	<span style="font-family: 宋体;"><span style="font-size: 12px;"><br/>安装redis-live：<br/>因为redis-live是基于python开发的，所以首先要部署所需要的python环境<br/>1、安装epel源<br/><div class="code">wget http://download.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm<br/>rpm -ivh epel-release-5-4.noarch.rpm</div><br/>2、安装python依赖环境<br/><div class="code">yum install python-pip<br/>pip-python install tornado<br/>pip-python install argparse<br/>pip-python install python-dateutil<br/>或者<br/>yum install tornado<br/>yum install python-dateutil<br/>yum install argparse</div><br/><br/>3、获取redis-live版本<br/><div class="code">git clone https://github.com/kumarnitin/RedisLive.git<br/>cd RedisLive/src<br/>vi redis-live.conf <br/>&#123;&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;RedisServers&quot;:&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#91;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#123;&nbsp;&nbsp;<br/>&nbsp;&nbs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p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#125;&nbsp;&nbsp;<br/>&#125; </div><br/>RedisServers :redis服务器的配置。<br/>DataStoreType :选择是存储到redis还是sqlite里面<br/>RedisStatsServer：是redis服务器的监控信息可以存放在其他的redis服务器中.也就是RedisStatsServe.<br/><br/>配置好之后，就可以启动服务了。<br/><div class="code">chmod 777 www&nbsp;&nbsp; 修改web页面权限<br/>./redis-monitor.py –duration 120 &amp;<br/>./redis-live.py &amp;</div><br/>注：启动服务之后，如果访问web页面的话，会在当前终端输出日志，如果不想在终端输出，可以查看redis-live.py的参数<br/>访问：<a href="http://ip:8888/index.html" target="_blank">http://ip:8888/index.html</a><br/>监控效果图<br/><a href="https://www.cnmysql.com/attachment.php?fid=37" target="_blank"><img src="https://www.cnmysql.com/attachment.php?fid=37" class="insertimage" alt="点击在新窗口中浏览此图片" title="点击在新窗口中浏览此图片" border="0"/></a><br/><br/>安装报错信息：<br/>1、not found redis module<br/>解决办法<br/>下载：<a href="https://codeload.github.com/andymccurdy/redis-py/zip/master" target="_blank">https://codeload.github.com/andymccurdy/redis-py/zip/master</a><br/><div class="code">unzip redis-py-master.zip<br/>cd redis-py-master<br/>python setup.py install</div><br/><br/>2、pip-python安装tornado和python-dateutil失败解决办法<br/><div class="code">https://cloud.github.com/downloads/tornadoweb/tornado/tornado-1.2.1.tar.gz<br/>tar zxvf tornado-1.2.1.tar.gz<br/>cd tornado-1.2.1<br/>python setup.py build<br/>python setup.py install<br/><br/>wget http://labix.org/download/python-dateutil/python-dateutil-1.5.tar.gz<br/>tar zxvf python-dateutil-1.5.tar.gz<br/>cd python-dateutil-1.5<br/>python setup.py install</div><br/><br/><br/></span><br/></span><br/>Tags - <a href="https://www.cnmysql.com/tags/redis-live/" rel="tag">redis-live</a> , <a href="https://www.cnmysql.com/tags/redis/" rel="tag">redis</a>
]]>
</description>
</item><item>
<link>https://www.cnmysql.com/post//#blogcomment</link>
<title><![CDATA[[评论] redis监控利器redis-live]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>https://www.cnmysql.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>