Cacti monitors redis

Source: Internet
Author: User
Tags rrd redis server

Server version RedHat 6.4-64

First, solve the permission problem:

1. Ssh-keygen # if it is a root user, the default directory generated is id_rsa (Public Key) id_rsa.pub (Private Key), which is the two files under/root/. Ssh)

2. CD/root/. Ssh/& chmod 600id_rsa * change the permission of the two files to 600.

3. Ssh-copy-ID-I/root/. Ssh/[email protected] # Add the public/private key authentication of the monitored Node

 

  1. First, check whether the python-redis module is installed on the server. If not, install:

Yum-y install Python-redis

  1. Download the redis script and template file.

Address:

Https://github.com/nazgul5/cacti-redis

Put the redis-status.py under the $ cacti/scripts/directory and add the permission:

Chmod 755 redis-status.py

  1. Import cacti_host_template_redis_server.xml to cacti on the cacti page.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/44/D0/wKioL1Pi3a3jBoW8AAOa-dAjSnU774.jpg "Title =" redis.png "alt =" wKioL1Pi3a3jBoW8AAOa-dAjSnU774.jpg "/>

In the cacti console, click Import templates and Click Browse to import the cacti_host_template_redis_server.xml file to cacti,

  1. You can add the redis server to be monitored to the device. The default template should only have four modules for monitoring,

  2. If there is no data, check whether the redis-status.py file has execution permission in the/var/www/html/scripts/directory on the server side, if you have the permission, run the command to go to the/var/www/html/RRA/directory to check whether the command is generated ***. RRD file. If yes, run: rrdtool fetchredis_46_connected_clients_225.rrd average. If the result is 1407335100:-Nan, there is no data in the file, so the line of the page is not drawn,

  3. Since the RRD file is generated, it proves that you have established a connection with the machine you need to monitor, that is, the data is not caught, how can this happen, may be the problem of redis-status.py execution, okay, let's see if this script is correct.

  4. Go to the/var/www/html/scripts/directory and execute:

Python/var/www/html/scripts/redis_v1.py the IP address of the machine to be monitored-P redis port number

But I reported the following when executing the command:

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/44/CF/wKiom1Pi3KLR-ElCAAFUwt7SneI012.jpg "Title =" redis2.png "alt =" wKiom1Pi3KLR-ElCAAFUwt7SneI012.jpg "/>

This problem is really weird, I have read the online information is still not able to solve, and finally found the problem under the guidance of high people, the original I modified the name of the redis-status.py file to redis. py is stored in the/var/www/html/scripts/directory. When loading, he puts redis. the py script is loaded, but the installed redis module is not loaded. PY to solve this problem, funk, modify redis. after py, do not forget to change the script name on the cacti page. You can modify the Script Name in Console> data input methods> redis statistics, remember to modify the same name as the script on the server ,,,


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.