Redislive (Redis monitoring tool) Installation example sharing

Source: Internet
Author: User

Environment: Redhat Linux 6.5 (yum installation is complete, if Yum is not installed, Python related installation can be installed in other ways)

First, the preparation of the Python environment
Because Redislive is written by Python, it relies on the following packages: Backports.ssl_match_hostname, Tornado, Redis, six, Python-dateutil, Argparse. Therefore, you need to install the Python environment first, download the above dependency package.
1, Python installation (there are various installation methods, here with Yum)
Command python to know if Python is installed
-bash-4.1$ python
Python 2.6.6 (r266:84292, May 1 2012, 13:52:17)
[GCC 4.4.6 20110731 (Red Hat 4.4.6-3)] on linux2
Type "Help", "copyright", "credits" or "license" for more information.

If not installed, use Yum to install Python:
#yum Install Python

2. Installation of Setuptools and Pip
Pip is a Linux yum, which is handy for installing dependency packs.

Perform the following instructions to install Python-setuptools:
#yum Install Python-setuptools

Execute the following command to install PIP:
# wget "HTTPS://PYPI.PYTHON.ORG/PACKAGES/SOURCE/P/PIP/PIP-1.5.4.TAR.GZ#MD5=834B2904F92D46AAA333267FB1C922BB"-- No-check-certificate
# TAR-XZVF Pip-1.5.4.tar.gz
# CD pip-1.5.4
# python setup.py Install

Second, the installation of redislive
1, download the Decompression redislive project
# wget Https://codeload.github.com/nkrode/RedisLive/zip/master
# MV Master Redislive-master.zip
# Unzip Redislive-master.zip

2. Modify the configuration file
# CD REDISLIVE-MASTER/SRC
# Vim Redis-live.conf

{
"Redisservers":
[
{
"Server": "192.168.1.200",
"Port": 7000
},
{
"Server": "192.168.1.200",
"Port": 7001
},
{
"Server": "192.168.1.200",
"Port": 7002
},
{
"Server": "192.168.1.200",
"Port": 7003
},
{
"Server": "192.168.1.200",
"Port": 7004
},
{
"Server": "192.168.1.200",
"Port": 7005
}
],

"Datastoretype": "SQLite",

"Redisstatsserver":
{
"Server": "127.0.0.1",
"Port": 7000
},

"Sqlitestatsstore":
{
"Path": "/redis/redislive-master/src/db/redislive.sqlite"
}
}


Datastoretype decided to use that type of data storage for the Redislive project,
In the case of Redis, use Redisstatsserver as the target for data storage;
In the case of SQLite, use Sqlitestatsstore as the target for data storage.

The function of redislive is divided into two parts:
One part is the collection of Redis-server state data, which is executed by src/redis-monitor.py;
Another part of the function is to provide query services to the state data, and to provide Web services through src/redis-live.py.

Third, initialize DB
# CD DB
# Cat Schema.sql | Sqlite3 Redislive.sqlite

Iv. turn on the monitoring script
1. Start the monitoring script:
./redis-monitor.py--duration &
2, configure the regular monitoring of redislive:
*/5 * * * * CD/DATA/REDIS-MONITOR/REDISLIVE/SRC;./redis-monitor.py--duration >/dev/null 2>&1

V. Open webserver (service start)
#./redis-live.py &

Vi. Accessing Web pages
Http://192.168.1.200:8888/index.html


The performance of Redis is affected when monitoring is turned on, so it is recommended to monitor it regularly instead of real-time

Redislive (Redis monitoring tool) Installation example sharing

Related Article

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.