1. Data Type 1: zabbix_agent execute scripts submitted Dictionary
UserParameter=tcp_port_listen,/usr/local/zabbix/share/script/get_game_port.py
{ "data": [ { "{#GG_PORT}": 3001, "{#GT_PORT}": 2001, "{#GT_WEB_PORT}": 8001, "{#SERVER_ID}": 1, "{#SERVER_NAME}": "dddjs_test_s001a" }, { "{#GAME_ANALYS_NGINX_HTTPS_PORT}": 8081, "{#GAME_ANALYS_PORT}": 9001, "{#GAME_SERVICE_NGINX_HTTPS_PORT}": 8082, "{#GAME_SERVICE_PORT}": 9002, "{#GM_SERVER_PORT}": 56789, "{#LOGIN_SERVER_PORT}": 3101 } ] }
zabbix interface when creating a template: Direct use its key to
GAME_ANALYS_NGINX_HTTPS_PORT central server process port: { # GAME_ANALYS_NGINX_HTTPS_PORT} net.tcp.listen [{ # GAME_ANALYS_NGINX_HTTPS_PORT}]
2. Data Type 2: zabbix_agent execute scripts submitted values
UserParameter=mysql.status[*],/usr/local/zabbix/share/script/mysql_check.sh $1
mysql_master_port
mysql.status[mysql_master_port]