Table of Contents
1、导入模板
2、客户端key配置
3、服务端验证
4、添加主机关联模板
5、查看监控图
Home Database Redis How to monitor redis memory in zabbix

How to monitor redis memory in zabbix

Jun 03, 2023 am 10:00 AM
redis zabbix

How to monitor redis memory in zabbix

1、导入模板

直接下载,通过下面的步骤导入模板:点击configuration-> templates > import -> 导入下载的xml文件 。

2、客户端key配置

在被监控的主机上,打开/etc/zabbix/zabbix_agentd.conf 配置文件,在最后一行加入:

UserParameter=redis_stats[*],redis-cli -h 127.0.0.1 -p $1 info|grep $2|cut -d : -f2
Copy after login

配置完成后通过/etc/init.d/zabbix_agentd restart 重启服务并应用最新的配置文件。

注:在该文件中还要确认UnsafeUserParameters=1 。

3、服务端验证

验证方式还是通过zabbix_get 程序去获取数据,能正常得到数据,证明通信正常。

# zabbix_get -s 172.20.0.20 -k redis_stats[6379,total_connections_received]2249669
Copy after login

上面正常从被监控主机上取得了数据,c/s通信正常 。

4、添加主机关联模板

通过configuration> hosts> create host 创建新的主机,并在templates项中,查找Templates Redis_6379 模板,并link 该模板 。就可以正常获取数据了。同样,验证数据使用 monitoring lastest data- 打到刚刚添加的主机,查看是否有数据 。

5、查看监控图

通过monitoring graphs 可以查看刚刚添加的监控项的监控图

The above is the detailed content of How to monitor redis memory in zabbix. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Solution to 0x80242008 error when installing Windows 11 10.0.22000.100 Solution to 0x80242008 error when installing Windows 11 10.0.22000.100 May 08, 2024 pm 03:50 PM

Solution to 0x80242008 error when installing Windows 11 10.0.22000.100

How to change the password in redis How to change the password in redis Apr 20, 2024 am 03:00 AM

How to change the password in redis

Analyze PHP function bottlenecks and improve execution efficiency Analyze PHP function bottlenecks and improve execution efficiency Apr 23, 2024 pm 03:42 PM

Analyze PHP function bottlenecks and improve execution efficiency

Is redis a memory cache? Is redis a memory cache? Apr 20, 2024 am 05:26 AM

Is redis a memory cache?

Golang API caching strategy and optimization Golang API caching strategy and optimization May 07, 2024 pm 02:12 PM

Golang API caching strategy and optimization

Is redis a non-relational database? Is redis a non-relational database? Apr 20, 2024 am 05:36 AM

Is redis a non-relational database?

Which one has better performance, erlang or golang? Which one has better performance, erlang or golang? Apr 21, 2024 am 03:24 AM

Which one has better performance, erlang or golang?

Caching mechanism and application practice in PHP development Caching mechanism and application practice in PHP development May 09, 2024 pm 01:30 PM

Caching mechanism and application practice in PHP development

See all articles