Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-16739

Zabbix Proxy - Remote commands: it's not like the manual says

XMLWordPrintable

    • Icon: Patch request Patch request
    • Resolution: Done
    • Icon: Major Major
    • None
    • None
    • Agent (G), Proxy (P)
    • Debian 9 proxy based; Debian 8 proxy based; Windows 2012 R2 Zabbix agent based.

      Remote command execution on Zabbix Agent, by Proxy, don't follow the manual when it say:

      Remote commands on Zabbix agent are executed without timeout by the system.run[,*nowait*] key and are not checked for execution results.

      Steps to reproduce:

      1. Increased Proxy log level for "task manager" process: zabbix_proxy -c /etc/zabbix/zabbix_proxy.conf -R log_level_increase="task manager"
      2. Read the results: tail -f /var/log/zabbix/zabbix_proxy.log

      Result:
      **

      25818:20191008:113044.451 query [txnlev:1] [update task set status=3 where taskid=3001304]
      25818:20191008:113044.451 query [txnlev:1] [commit;]
      25818:20191008:113044.454 query [txnlev:0] [select command_type,execute_on,port,authtype,username,password,publickey,privatekey,command,parent_taskid,hostid from task_remote_command where taskid=3001305]
      25818:20191008:113044.454 In zbx_script_execute()
      25818:20191008:113044.454 In zbx_execute_script_on_agent()
      25818:20191008:113044.454 In substitute_simple_macros() data:'10050'
      25818:20191008:113044.454 In get_value_agent() host:'W2012RODRIGO' addr:'10.34.12.61' key:'system.run[powershell.exe -executionpolicy ByPass -nologo C:\SkyDocs_suporte\skydocs-block-ip.ps1 201.21.161.109,wait]' conn:'unencrypted'
      25818:20191008:113044.455 Sending [system.run[powershell.exe -executionpolicy ByPass -nologo C:\SkyDocs_suporte\skydocs-block-ip.ps1 10.0.0.1,*wait*]
      25818:20191008:113056.942 get value from agent result: '0'
      25818:20191008:113056.942 End of get_value_agent():SUCCEED
      25818:20191008:113056.942 End of zbx_execute_script_on_agent():SUCCEED
      25818:20191008:113056.942 End of zbx_script_execute():SUCCEED

      Expected:

      Sending [system.run[powershell.exe -executionpolicy ByPass -nologo C:\SkyDocs_suporte\skydocs-block-ip.ps1 10.0.0.1,*nowait*]

      This is leading the command executions to take many time, and fail for more than the half of VMs (it's about 150 Virtual Machines).

            zabbix.support Zabbix Support Team
            werneck.costa Werneck Bezerra Costa
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: