I created console application in AutoIt to check whether application is responding or not:
Once I run it in command line the result is correct but if I'm running it via Zabbix agent the result is different.
What can be the reason?
AutoIt code
UserParameter setting in zabbix agent config file
Command line response result:

Agent response result:

Once I run it in command line the result is correct but if I'm running it via Zabbix agent the result is different.
What can be the reason?
AutoIt code
Code:
#AutoIt3Wrapper_Change2CUI=Y
#include <WinAPISysWin.au3>
$result = ""
$isWindowHang=""
$hwnd = WinGetHandle("App name")
If $hwnd = 0 Then
$result = -1
Else
$isWindowHang = _WinAPI_IsHungAppWindow ($hWnd)
if $isWindowHang then
$result = 0
Else
$result = 1
EndIf
EndIf
ConsoleWrite($result)
Code:
UserParameter=computer.windows.appResponse,C:\Zabbix\checkResponse.exe
Agent response result:
Comment