My Alarm script is normal,but it have a small code ,the code is the Func command,the Func is run by root.When zabbix server alarm happen,zabbix action to execute 'sudo func $subip call zabbix slavestatus $subport $password '.it have not return anything. But I execute it use zabbix user on the host is not problem. The code is in the script is:
my $func = "sudo func '"."$subip"."' call zabbix slavestatus $subport $password ";
my $restr = readpipe($func);
the /etc/sudoers is:
root ALL=(ALL) ALL
zabbix ALL=(ALL) NOPASSWD:ALL
Please help me.why when zabbix server call the alarm script,the sudo func have not to return.but I execute the scripts in the host the sudo return. the
zabbix server env ?
my $func = "sudo func '"."$subip"."' call zabbix slavestatus $subport $password ";
my $restr = readpipe($func);
the /etc/sudoers is:
root ALL=(ALL) ALL
zabbix ALL=(ALL) NOPASSWD:ALL
Please help me.why when zabbix server call the alarm script,the sudo func have not to return.but I execute the scripts in the host the sudo return. the
zabbix server env ?
Comment