Zabbix for Redis Monitoring

Source: Internet
Author: User

1. Adding cron Jobs

Find/-name REDIS-CLI

Using Crontab–e, add the following line to the cron configuration file:

*/1 * * * */USR/LOCAL/BIN/REDIS-CLI info >/tmp/redis.stat

Note: The performance data for the default port is obtained via REDIS-CLI, other similar.

2, Configuration Zabbix-agent

Edit/etc/zabbix/zabbix_agentd.conf, locate the following configuration information, and edit:

Unsafeuserparameters=1

Userparameter=redis.stat[*],cat/tmp/redis.stat | grep "$:" | Cut-d ":"-f2

Note: Unsafeuserparameters=1 is a command that allows Zabbix-agent to run userparameter with root privileges, userparameter is a way for Zabbix to provide extended performance data, multiple definitions can exist, Each definition corresponds to a

Performance data, followed by the command for each performance extract, and the corresponding performance counter name is passed over.

3. Data acquisition Process Verification

Once the above configuration is complete, it is necessary to check whether the environment is normal and whether the performance data can be loaded and passed properly.

1, Cron link

Cat/tmp/redis.stat

2. Zabbix-agent Link

Zabbix_agentd-t Redis.stat[hits]

3. Zabbix-server Link

Zabbix_get-s 127.0.0.1-k Redis.stat[hits]

Note: 1 and 2 run on Zabbix-agent machines and 3 run on the machine where the Zabbix-server is located. ZABBIX_GET–S Specifies the machine where the zabbix-agent is located.


Ps:

As root setup a cronjob:
* * * * * */USR/BIN/REDIS-CLI info >/tmp/redisstat

ADD a user parameter to Zabbix:

Userparameter=redis.stat[*],cat/tmp/redisstat | grep "$:" | Cut-d ":"-f2


Official Research documents: https://github.com/blacked/zbx_redis_template

This article is from the "joy1991" blog, make sure to keep this source http://joy1991.blog.51cto.com/8359406/1688998

Zabbix for Redis Monitoring

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.