Zabbix执行Ping脚本报错,Global script execution被禁用

问题描述

在Zabbix监测的主机中调用脚本Ping进行测试时,提示Global script execution on Zabbix server is disabled by server configuration告警脚本无法执行。

解决方法

在Zabbix中,EnableGlobalScripts参数用于控制是否启用Zabbix的“全局脚本(Global Scripts)”功能。编辑zabbix_server.conf配置文件,找到EnableGlobalScripts参数,将值改为1,然后重启zabbix服务即可。

通常zabbix_server.conf配置文件在/etc/zabbix/目录下。也可通过find / zabbix_server.conf命令查找配置文件所在目录。

### Option: EnableGlobalScripts
#    Enable global scripts on Zabbix server.
#       0 - disable
#       1 - enable
#
# Mandatory: no
# Default:
# EnableGlobalScripts=1 //也可删除该行前面#取消注释
EnableGlobalScripts=1 //新增EnableGlobalScripts参数,值为1