Installing the Redis Live monitoring tool

Source: Internet
Author: User
Tags redis sqlite web services iptables install redis


EPEL (Http://fedoraproject.org/wiki/EPEL) is a project built by the Fedora community to deliver high-quality software packages for RHEL and derivative distributions such as CentOS, scientific Linux, and more.

First install the Epel extension Source:

sudo yum-y install Epel-release
Then install Python-pip
sudo yum-y install Python-pip

Don't forget to erase the cache after installation.

sudo yum clean all
Install the plugin with PIP:

Pip Install Tornado

pip install redis

pip install python-dateutil

pip install Argparse


# CD REDISLIVE/SRC

# Vim Redis-live.conf

{"
    redisservers":
    [
        {
            "server": "172.17.138.180",
            "port": 6379,
            "password": "tenredis2356 "
        },
                                                      
        {
            " server ":" 172.17.132.228 ",
            " port ": 6379,
            " password ":" tenredis2356 "
        }
    ],
                                                  
    "Datastoretype": "SQLite",
                                                  
    "Redisstatsserver":
    {
        "server": "127.0.0.1",
        "port": 6381
    },
                                                  
    "Sqlitestatsstore":
    {
        "path": "/data/redis-monitor/redislive/src/db/redislive.sqlite"
    }
}


Set up the redis-server that need to be monitored in redisservers;


Datastoretype decided to use that type of data store,
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.

Configure periodic monitoring, Startup:

./redis-monitor.py  --duration &
./redis-live.py &

Open 8888 Ports:

sudo vi/etc/sysconfig/iptables

Add a line:

-A input-m state--state new-m tcp-p TCP--dport 8888-j ACCEPT

sudo service iptables Reload

Open Address:

Http://172.16.10.109:8888/index.html




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.