Redislive Monitoring Tool Deployment

Source: Internet
Author: User

1. Upgrade Python

1.1. Installation:

TAR-XF python-2.7.10.tar.xz CD python-2.7.10./configure--prefix=/usr/local/pyhon2.7makemake install


1.2. Back up old version files

mv/usr/bin/python/usr/bin/python2.6.6


1.3. Connect a new file

Ln-s/usr/local/pyhon2.7/bin/python/usr/bin/python

Installation Complete


Verify:

[[Email protected]]# pythonpython 2.7.10 (default, June 21 2016, 09:33:37)


2. Installing Setuptools

TAR-XF SETUPTOOLS-23.0.0.TAR.GZCD setuptools-23.0.0python setup.py Install


3. Installing tornado

Git https://github.com/tornadoweb/tornado.gitunzip tornado-master.zip cd tornado-masterpython setup.py install

4. Installing Redis-py

wget https://github.com/andymccurdy/redis-py/archive/master.zipunzip mastercd Redis-py-master/python setup.py Install


5. Installing Python-dateutil

TAR-XF PYTHON-DATEUTIL-2.4.2.TAR.GZCD python-dateutil-2.4.2python setup.py Install


6. Installing Argparse

TAR-XF ARGPARSE-1.4.0.TAR.GZCD argparse-1.4.0python setup.py Install

7. Installing redislive

HTTPS://GITHUB.COM/NKRODE/REDISLIVETAR-XF redislive-master.zip-c/DATA/CD/DATA/MV Redislive-master redislive

To modify a configuration file:

cd /data/redislive/srccp redis-live.conf.example  cp redis-live.confvim  redis-live.conf{         "Redisservers":         [                 {                          "Server":  "192.168.1.11",                          " Port " : 6379,                          "Password"  :  "112233"                  }         ],         "Datastoretype"  :  "SQLite",          "Redisstatsserver":        {                  "Server"  :  "127.0.0.1",                  "Port"  :  6385        },         " Sqlitestatsstore " :        {                  "path":   "/data/redislive/src/db/ Redislive.sqlite "        }}

Increase Crontab

*/3 * * * * cd/data/redislive/src/; /redis-monitor.py--duration >/dev/null 2>&1

To start a process:

./redis-live.py &

[1] 9483[[email protected] src]# traceback  (most recent call last):   File  "./redis-live.py", line 10, in <module>     from api.controller.serverlistcontroller import serverlistcontroller  file   "/data/redislive/src/api/controller/serverlistcontroller.py",  line 1, in <module >    from BaseController import BaseController  File  "/ data/redislive/src/api/controller/basecontroller.py ", line 1, in <module>     from dataprovider.dataprovider import redislivedataprovider  file   "/data/redislive/src/dataprovider/dataprovider.py", line 2, in <module>     import sqliteprovider  File  "/data/redislive/src/dataprovider/ sqliteprovider.py ",  line 3, in <module>    import sqlite3  file  "/usr/local/python2.7/ lib/python2.7/sqlite3/__init__.py ",  line 24, in <module>    from  dbapi2 import *  File  "/usr/local/python2.7/lib/python2.7/sqlite3/dbapi2.py",  line 28, in <module>    from _sqlite3 import * Importerror: no module named _sqlite3

FIX: Install SQLite

TAR-XF setuptools-23.0.0.tar.gzcd sqlite-autoconf-3130000./configure--prefix=/usr/local/sqlite3make && Make install

Recompile python:

vi python-2.7.10/setup.py        ...         sqlite_inc_paths = [  '/usr/include ',                                '/usr/local/sqlite3/include ',  #增加到这里                                 '/usr/include/sqlite ',                                '/usr/include/sqlite3 ',                               '/ Usr/local/include ',                                '/usr/local/include/sqlite ',

Re-compile can

Start again:

./redis-live.py &

[1] 21249[[email protected] src]# traceback  (most recent call last):   File  "./redis-live.py", line 10, in <module>     from api.controller.serverlistcontroller import serverlistcontroller  file   "/data/redislive/src/api/controller/serverlistcontroller.py",  line 1, in <module >    from BaseController import BaseController  File  "/ data/redislive/src/api/controller/basecontroller.py ", line 7, in <module>     class basecontroller (Tornado.web.RequestHandler):  file  "/data/redislive /src/api/controller/basecontroller.py ", line 9, in basecontroller     Stats_provider = redislivedataprovider.get_provider ()   File  "/data/redislive/src/ dataprovider/dataprovider.py ",   Line 16, in get_provider    data_store_type = settings.get_data_ Store_type ()   File  "/data/redislive/src/api/util/settings.py", line 24, in  Get_data_store_type    config = get_settings ()   File  "/data/ redislive/src/api/util/settings.py ", line 10, in get_settings     Return json.load (config)   File  "/usr/local/python2.7/lib/python2.7/json/__init__.py", &NBSP;LINE&NBSP;290,&NBSP;IN&NBSP;LOAD&NBSP;&NBSP;&NBSP;&NBSP;**KW)   File  "/usr/local/python2.7 /lib/python2.7/json/__init__.py ",  line 338, in loads    return _ Default_decoder.decode (s)   File  "/usr/local/python2.7/lib/python2.7/json/decoder.py",  line  366, in decode    obj, end = self.raw_decode (S, idx=_w (s, 0). End ()) &NBSP;&NBsp file  "/usr/local/python2.7/lib/python2.7/json/decoder.py",  line 382, in raw_decode     obj, end = self.scan_once (S,&NBSP;IDX) ValueError: Expecting   delimiter: line 7 column 25  (char 101) [1]+  exit 1                   ./ redis-live.py


Check the configuration file JSON format syntax there is an error, one less ","


8888 Port after boot

Http://192.168.1.80:8888/index.html

650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M01/83/02/wKioL1dosaexWbd-AAB-4J_rSl8677.png-wh_500x0-wm_3 -wmp_4-s_573873806.png "title=" R1.png "alt=" Wkiol1dosaexwbd-aab-4j_rsl8677.png-wh_50 "/>

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M02/83/02/wKioL1dosbCCOxQNAAAwZsvYsSg506.png-wh_500x0-wm_3 -wmp_4-s_600202425.png "title=" R2.png "alt=" Wkiol1dosbccoxqnaaawzsvyssg506.png-wh_50 "/>

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M02/83/03/wKiom1dosbiggfJ1AAA93vRv9U8779.png-wh_500x0-wm_3 -wmp_4-s_2860517285.png "title=" R3.png "alt=" Wkiom1dosbiggfj1aaa93vrv9u8779.png-wh_50 "/>

This article is from the "take a deep Breath again" blog, make sure to keep this source http://ckl893.blog.51cto.com/8827818/1791301

Redislive Monitoring Tool Deployment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.