Ad Widget

Collapse

Problems executing scripts on Windows machines in Zabbix 7.0

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JorgeSach
    Junior Member
    • Jul 2022
    • 7

    #1

    Problems executing scripts on Windows machines in Zabbix 7.0

    I have problems running manual and automatic scripts on my Windows machines after upgrading my zabbix server to version 7.0

    The problem I'm running into now is the following when I run a script on one of my machines:

    Click image for larger version  Name:	image.png Views:	0 Size:	14.9 KB ID:	486045

    However if I run the same command in my server console to a powershell script:

    Click image for larger version  Name:	image.png Views:	0 Size:	11.8 KB ID:	486046
    ​Even the command without calling the script:
    Click image for larger version  Name:	image.png Views:	0 Size:	13.0 KB ID:	486047

    There is communication between server and agent. Checked in both directions, also the execution timeout is 30 seconds on server and agent.

    I have installed version 7 of the agent on my Windows machine, it doesn't work either, I have returned to 6.4 and it doesn't work either. I don't know if it's some problem in the GUI or some new parameter that I missed. In the administration part of my frontend I have configured the UI script timeout to 60 seconds. However, no test that I have carried out or tested has given results.

    In my agent log I don't see anything strange regarding these errors.

    I also have items configured with PowerShell commands to check other configurations in my Windows and they work perfectly.
    The problem is that the scripts that I have to launch by hand cannot be implemented as items because I use them to perform specific tasks or when one of my triggers fires.​

    A hand with this?

    It will be appreciated

    Greetings​​
    Last edited by JorgeSach; 20-06-2024, 13:18. Reason: Include tags
  • Giam
    Junior Member
    • Jul 2025
    • 1

    #2
    Hi there,
    Hopefully you already fixed your issue... but for others that have the same problem after doing Zabbix Server upgrade.... and suddenly no script were working.

    Just found out in my /etc/zabbix/zabbix_server.conf:
    Code:
    EnableGlobalScripts=0
    It seems to have been added during upgrade from 6.0 to 7.0.
    Removed that line, restart zabbix_server and voilà.

    Based on what I can see in the docs, it seems to be on purpose for new installs: https://www.zabbix.com/documentation...eGlobalScripts

    Comment

    • jh_zeus
      Junior Member
      • Aug 2025
      • 1

      #3
      Hi there,
      I have the same issue.
      I have many servers and two of them are responding a simple ipconfig command (["C:\Windows\System32\cmd.exe /c ipconfig"]) in a second and the other ones lead to a timeout.
      however not evertime. When you try it 4 oder 5 times, there is a chance that the Zabbix Manual Script succeeds an reponds with the ipconfig output from the machine.
      I'vetreif to run it with the command
      Code:
      zabbix_get -s <IP> --tls-psk-identity="<XX>" --tls-psk-file=/etc/zabbix/...." -k 'system.run["C:\Windows\System32\cmd.exe /c ipconfig"]'
      and that works fine buz when I try to trun it from the UI it says "timeout". But like I said 3 times from 4.
      The Solution with
      Code:
      EnableGlobalScripts=0
      did not work. I would be happy if somebody could help me

      Comment

      Working...