UserParameter=redis.status,/usr/local/bin/redis-cli -h 127.0.0.1 -p 6379 ping |grep -c PONG
#item参数如何get
UserParameter=redis_info[*],/usr/local/zabbix/plugins/redis.sh $1 $2
#监控redis状态,我们可以根据这个参数对应的监控项创建redis状态触发器。
UserParameter=redis.status,echo -e 'auth 123ab\nping'|redis-cli -h localhost -p 10080 |grep -c PONG
# item参数如何get
UserParameter=redis_info[*],/usr/local/zabbix/plugins/redis.sh $1 $2
# tomcat status
UserParameter=tomcat_stats[*],/usr/local/zabbix/plugins/check_http -H 127.0.0.1 -u /$1/test.html -p $2 -w 2 -c 5
UserParameter=nginx.status[*],/usr/local/zabbix/scripts/ngx_status.sh $1
# memcache
UserParameter=memcached_stats[*],(echo stats; sleep 1) | telnet 127.0.0.1 $1 2>&1 | awk '/STAT $2 / {print $NF}'
# nginx
UserParameter=proxy.nginx,/usr/local/zabbix/plugins/check_nginx_error.sh
UserParameter=nginx.status[*],/usr/local/zabbix/plugins/ngx_status.sh $1
# mysql check
UserParameter=mysql.version,mysql -V
UserParameter=mysql.ping,/usr/local/mysql/bin/mysqladmin ping | grep -c alive
UserParameter=mysql.status[*],/usr/local/zabbix/plugins/checkmysqlperformance.sh $1 $2
UserParameter=checkmysqlslave.mysql[*],/usr/local/zabbix/plugins/check_mysql_slave.sh $1
# 端口自动发现
UserParameter=tcpportlisten,/usr/local/zabbix/plugins/discovertcpport.sh "$1"