[ZBX-17213] Remote command execution on Zabbix Agent, *by Proxy*, don't follow the manual it says Created: 2020 Jan 23  Updated: 2024 Apr 10  Resolved: 2020 Feb 16

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G), Proxy (P), Server (S)
Affects Version/s: 4.0.16
Fix Version/s: 4.0.18rc1, 4.4.6rc1, 5.0.0alpha2, 5.0 (plan)

Type: Problem report Priority: Minor
Reporter: Syusei YIn Assignee: Vladislavs Sokurenko
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screen Shot 2020-01-23 at 20.06.17.png     PNG File Screen Shot 2020-01-23 at 20.14.21.png     PNG File Screen Shot 2020-01-23 at 20.25.36.png    
Issue Links:
Sub-task
Team: Team A
Sprint: Sprint 60 (Jan 2020), Sprint 61 (Feb 2020)
Story Points: 0.125

 Description   

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.

https://www.zabbix.com/documentation/4.0/manual/config/notifications/action/operation/remote_command
As a matter of fact, if Remote commands execution on Zabbix Agent, by Proxy, remote commands are executed with timeout by the system.run[,wait]

Steps to reproduce:

  1. Add a host Monitored by proxy
  2. Actions -> Operations -> Operarion type [Remote command] -> Type[Custom script] -> Execute on [Zabbix agent]
  3. Trigger an Action

Result:

  • Refer to below debug log when Remote commands execution on Zabbix Agent, by Proxy
     26428:20200123:062020.292 Requested [system.run[#!/bin/bash
    export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
    echo "start" >> /tmp/test
    date >> /tmp/test
    sleep 10
    echo "end" >> /tmp/end
    date >> /tmp/test,wait]]
    
  • If not monitored by proxy, the manual makes sense
     21785:20200123:062215.586 Requested [system.run[#!/bin/bash
    export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
    echo "start" >> /tmp/test
    date >> /tmp/test
    sleep 10
    echo "end" >> /tmp/end
    date >> /tmp/test,nowait]]
    
  • Action log

    Expected:
    In the case of remote commands execution on Zabbix Agent, by Proxy,it should work like manual it says.


 Comments   
Comment by Vladislavs Sokurenko [ 2020 Feb 13 ]

Fixed in pull request feature/ZBX-17213-4.0

Comment by Vladislavs Sokurenko [ 2020 Feb 14 ]

Fixed in:

  • pre-4.0.18rc1 d0020bccf3f
  • pre-4.4.6rc1 1e6a25273c4
  • pre-5.0.0alpha2 (master) 054b771747f
Comment by Vladislavs Sokurenko [ 2020 Feb 14 ]

(1) [D] Mention that on Zabbix proxy remote commands are executed same as on Zabbix server

Change:

Remote commands on Zabbix agent are executed without timeout by the system.run[,nowait] key and are not checked for execution results. On Zabbix server remote commands are executed with timeout as set in the TrapperTimeout parameter of zabbix_server.conf file and are checked for execution results.

to:

Remote commands on Zabbix agent are executed without timeout by the system.run[,nowait] key and are not checked for execution results. On Zabbix server and Zabbix proxy remote commands are executed with timeout as set in the TrapperTimeout parameter of zabbix_server.conf or zabbix_proxy.conf file and are checked for execution results.

<dimir> zabbix_server.conf or zabbix_proxy.conf ?

vso thanks ! updated.

<mgeneralova[RESOLVED]

Documentation updated:

vso CLOSED, thanks !

Generated at Mon Apr 28 18:27:25 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.