Cacti monitors Redis implementation process

Source: Internet
Author: User
Tags ssh port

Cacti monitors Redis implementation process

1. Upgrade python. If it is the default python version of the system, the following error will occur:

Python setup. py install

Traceback (most recent call last ):

File "setup. py", line 3, in?

From redis import _ version __

File "/usr/local/src/redis-2.4.11/redis/_ init _. py", line 1, in?

From redis. client import Redis, StrictRedis

File "/usr/local/src/redis-2.4.11/redis/client. py", line 240

With self. pipeline (True, shard_hint) as pipe:

^

SyntaxError: invalid syntax

2. Install python. First configure the python environment and download the python source code.
Wget http://www.python.org/ftp/python/2.5.2/Python-2.5.2.tar.bz2

[Root @ mysqlvm2 Python-2.5.2] # python

Python 2.4.3 (#1, Jun 11 2009, 14:09:37)

[GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2

Type "help", "copyright", "credits" or "license" for more information.

>>>

Version is still 2.4.3. The solution is as follows:

# Cd/usr/bin

Just repeat the soft connection.

[Root @ mysqlvm2 Python-2.5.2] # ln-s/usr/local/bin/python/usr/bin/python

[Root @ mysqlvm2 Python-2.5.2] #

[Root @ mysqlvm2 Python-2.5.2] # python

Python 2.5.2 (r252: 60911, Aug 4 2014, 14:43:36)

[GCC 4.1.2 20080704 (Red Hat 4.1.2-54)] on linux2

Type "help", "copyright", "credits" or "license" for more information.

>>>

3. Download The apsaradb for redis template.

Wget http://mysql-cacti-templates.googlecode.com/files/better-cacti-templates-1.1.8.tar.gz

Configure monitoring script

To monitor mongodb or redis, You need to download better-cacti-templates-1.1.8 \ scripts

The ss_get_by_ssh.php script must be placed on the cacti server.

If cacti is installed in the/var/www/html/cacti/directory.

Put the file under the scripts directory. Don't forget to check the permissions. You must have the execution permission.

Then modify the file. Modify the options in about 40 rows.

#===================================================== ============================================

$ Ssh_user = 'root'; # SSH username

$ Ssh_port = 22; # SSH port

$ Ssh_iden = '-I/root/. ssh/id_rsa'; # SSH identity

# Modify the location of your ssh connection user and authentication private key based on your configuration.

If the value is greater than 50 rows, you can also modify the default port to be tested (if redis is not a normal default port, You need to modify the value ).

$ Redis_port = 6379; # Which port redis listens on

4. Import the template. The template directory is better-cacti-templates-1.1.8 \ templates.

On the cacti interface, create the Graph of the redis server as follows:

5. View Graph as follows:

From:Http://blog.itpub.net/26230597/viewspace-1254930/

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.