Hello,
Still a beginner with Zabbix but I must say, so far... for what it's worth... it's beyond the best. Okay so I'm having a bit of trouble and I have searched the forms and have read the docs but can seem to get this to work.
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:
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
Commands are enabled on the agent server and I tested to make sure it was working with:
zabbix_get -s IP -p 10050 -k "system.run[mkdir C:\testcommand]"
and that works just fine.
As an extra precaution I turned on debugging on the agent server and I do see the following in the log file.
3584:20170525:132905.211 Executing command 'C:\program.bat'
Still a beginner with Zabbix but I must say, so far... for what it's worth... it's beyond the best. Okay so I'm having a bit of trouble and I have searched the forms and have read the docs but can seem to get this to work.
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
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
Commands are enabled on the agent server and I tested to make sure it was working with:
zabbix_get -s IP -p 10050 -k "system.run[mkdir C:\testcommand]"
and that works just fine.
As an extra precaution I turned on debugging on the agent server and I do see the following in the log file.
3584:20170525:132905.211 Executing command 'C:\program.bat'
Comment