zabbix item 自带功能创建监控项监控redis服务

 

监控redis服务:利用zabbix自带的功能创建监控项


选择你监控的主机,在其上面创建监控项item 

[root@localhost utils]# netstat -tpln | grep 6379   --192.168.179.104上agent端上redis正常状态

tcp        0      0 0.0.0.0:6379            0.0.0.0:*               LISTEN      21115/redis-server


[root@localhost ~]# zabbix_get -s 192.168.179.104 -k "net.tcp.port[,6379]"  #192.168.179.103 zabbix server上获取该值,验证可以获得值之后再去图形界面配置
1


#agent端将redis服务关闭
[root@localhost ~]# /etc/init.d/redis_6379 stop 
Stopping ...
Redis stopped
#再去server端获取,可以看到返回的是0,代表服务一个挂掉了
[root@localhost ~]# zabbix_get -s 192.168.179.104 -k "net.tcp.port[,6379]"
0

 添加完监控项去lastest_data下面看看是否使用zabbix提供的模板监控成功

如果将redis服务关闭,图行如下所示 

猜你喜欢

转载自blog.csdn.net/qq_34556414/article/details/106628648