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