zabbix监测redis连接数
1、agent添加配置
编辑zabbix_agent配置文件
vim zabbix_agentd.conf添加引用自定义配置的路径Include=/app/zabbix/zabbix-server/etc/zabbix_agentd.userparams.conf在对应路径下配置key,commondvim /app/zabbix/zabbix-server/etc/zabbix_agentd.userparams.conf UserParameter=redis.connections,/app/zabbix/zabbix-server/monitor/redis_conn_num.sh#redis_conn_num.sh脚本内容conn="/app/redis/bin/redis-cli"host=""pwd=""port="6379"commond="CLIENT LIST"${conn} -h ${host} -a ${pwd} -p $port ${commond}|wc -l最后重启zabbix-agent
2、web页面操作
1、创建监控项
2、填写监控项详细参数,主要看黄色字体
3、创建触发器
4、选择监控项
5、配置大于3000触发警报
配置完后如下