-
Type:
Incident report
-
Resolution: Duplicate
-
Priority:
Major
-
None
-
Affects Version/s: 5.0.2
-
Component/s: Server (S)
-
None
-
Sprint 66 (Jul 2020)
The task is to execute a remote command through a freshly registered Zabbix agent.
The global script is configured to execute on agent and looks like:
The command works fine if it is executed on existing Zabbix element (through the map for example)
Autoregistration is configured:
I think the most important part is in server log:
1462:20200716:083308.918 query [txnlev:0] [select type,execute_on,command,groupid,host_access from scripts where scriptid=4] 1462:20200716:083308.919 End of DBget_script_by_scriptid():SUCCEED 1462:20200716:083308.920 In substitute_simple_macros_impl() data:'date >> /tmp/remote.log cat /tmp/remote.log' 1462:20200716:083308.920 In substitute_simple_macros_impl() data:'date >> /tmp/remote.log cat /tmp/remote.log' 1462:20200716:083308.920 In zbx_script_prepare() 1462:20200716:083308.920 End of zbx_script_prepare():SUCCEED 1462:20200716:083308.920 End of zbx_script_prepare():SUCCEED 1462:20200716:083308.920 In zbx_script_execute() 1462:20200716:083308.920 In zbx_execute_script_on_agent() 1462:20200716:083308.920 End of zbx_execute_script_on_agent():FAIL 1462:20200716:083308.920 End of zbx_script_execute():FAIL 1462:20200716:083308.920 In add_command_alert() 1462:20200716:083308.920 End of add_command_alert() 1462:20200716:083308.920 query without transaction detected 1462:20200716:083308.920 query [txnlev:0] [insert into alerts (alertid,actionid,eventid,clock,message,status,error,esc_step,alerttype,parameters) values (4,7,26,1594888388,'Zabbix server:date >> /tmp/remote.log cat /tmp/remote.log',2,'Zabbix agent interface is not defined for host [Zabbix server]',1,1,''); ]
Full server and agent log also attached.
The issue exists on 5.0.2 and 4.4.10