Home > Database > Redis > body text

How to monitor redis memory in zabbix

PHPz
Release: 2023-06-03 10:00:04
forward
1039 people have browsed it

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!

Related labels:
source:yisu.com
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!