[ZBX-16064] executing remote commands on windows Created: 2019 May 02  Updated: 2019 May 02  Resolved: 2019 May 02

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G)
Affects Version/s: 4.0.6
Fix Version/s: None

Type: Incident report Priority: Minor
Reporter: amr shadid Assignee: Zabbix Support Team
Resolution: Won't fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

windows



 Description   

I have successfully created a trigger to look for a running application... in this case we will call it program.exe. The trigger works and alerts go out. I'm trying to have a remote command go out in attempt that the agent server will fix itself.

So I have a bat file named "program.bat" on the agent server that has the following in it:
HTML Code:
@echo off
start "" "C:\Users\Winbin\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\ProgramName\program.exe"
exit
The bat file does exactly what it needs to do on the agent server. However when executed remotely it does absolutely nothing. 

I ran it in command line on the zabbix host to make sure it connects
zabbix_get -s IP -p 10050 -k "system.run[C:\program.bat]"
and it seems to do it... but the application doesn't start on the agent machine

 

EnableRemoteCommands=1 

 



 Comments   
Comment by Arturs Lontons [ 2019 May 02 ]

Are you sure that it's not running under the zabbix user? Have you checked the process list in the task manager?

Since this cannot be classified as a bug report, I will be closing this ticket. Feel free to use our community resources such as the official Zabbix forum and the  IRC channel to further troubleshoot the issue with the assistance of our community.

Generated at Thu Apr 25 18:45:20 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.