As shown in the title, when zabbix_server uses zabbix_get to obtain the data of the script corresponding to the custom "UserParameter", the error message as shown in the title appears
[root@nmp01 scripts]# /usr/local/zabbix/bin/zabbix_get -s 127.0.0.1 -k 8080connectNum
ZBX_NOTSUPPORTED: Timeout while executing a shell script.
解决方案
(1) Modify zabbix_server.conf of zabbix_server:
[root@nmp01 scripts]# vim /usr/local/zabbix/etc/zabbix_server.conf
Modify the following parameters:
Timeout=30
Note: The timeout period is 30 seconds
(2) Modify zabbix_agentd.conf of zabbix_agentd where the script is located:
[root@nmp01 scripts]# vim /usr/local/zabbix/etc/zabbix_server.conf
Modify the following parameters:
Timeout=30
(3) Restart the zabbix server and the client where the script is located:
[root@nmp01 scripts]# service zabbix_server restart
[root@nmp01 scripts]# service zabbix_agentd restart