zabbix_get 调用脚本时提示
We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.
sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
因为zabbix_get是zabbix用户调用的脚本所以会产生权限问题,在脚本的命令里加了sudo或提示上述告警,提示使用root权限需要输入root密码。
在/etc/sudoers中添加如下配置,保存退出
zabbix ALL=(ALL:ALL) NOPASSWD:ALL
zabbix_get执行成功