Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-24800

Remote command not executed on proxy but on server

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • 7.0.3rc1, 7.2.0alpha1
    • 7.0.0
    • Proxy (P), Server (S)
    • None
    • Zabbix server 7.0.0
      Zabbix proxy 7.0.0
      Zabbix agent 7.0.0 on Linux
    • S24-W32/33
    • 0.25

      Idea of the steps: Have an agent monitored by a proxy, item and trigger, have a remote script run on the proxy on a trigger, observe where the script is run.

      Steps to reproduce:

      1. Create a host "Zabbix70-agent" that is monitored by a proxy
      2. Create an item on the host: key "actiontest", type Zabbix trapper
      3. Create a trigger "Actiontest is 1" for the item: last(/Zabbix70-agent/actiontest) = 1
      4. In Alerts - Scripts, create script:
      • Name: Actiontest script
      • Scope: Action operation
      • Type: Script
      • Execute on: Zabbix proxy or server
      • Commands: (date; hostname) >> /tmp/hostname
      1. In Alerts - Actions - Trigger actions, create action:
      • Name: Actiontest
      • Conditions: Trigger equals Zabbix70-agent: Actiontest is 1
      • Operations: Add, select "Actiontest script", target list = Current host
      1. Enable remote commands on the Zabbix server and proxy configurations: EnableGlobalScripts=1 (server) and EnableRemoteCommands=1 (proxy)
      2. Use Zabbix sender on the agent host to send the value 1 for the key "actiontest" to the proxy
      3. See that the problem is generated in the Problems list
      4. Observe where the /tmp/hostname file is created.

      Result:

      On the Zabbix server there is now /tmp/hostname that has the problem date+time and the server hostname.

      Expected:

      Since the script was configured with "Execute on: Zabbix proxy or server" it is expected that the /tmp/hostname file was created (= script run) on the proxy because the host was monitored by proxy.

      Documentation:

      https://www.zabbix.com/documentation/7.0/en/manual/web_interface/frontend_sections/alerts/scripts says about the "Execute on" setting:

      "Zabbix proxy or server - the script will be executed by Zabbix proxy or server - depending on whether the host is monitored by proxy or server."

      Other comments:

      If EnableGlobalScripts is disabled on the server, then the remote command execution fails: "Global script execution on Zabbix server is disabled by server configuration"

            vso Vladislavs Sokurenko
            markkul Markku Leiniƶ
            Team B
            Votes:
            13 Vote for this issue
            Watchers:
            17 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - Not Specified
                Not Specified
                Logged:
                Time Spent - 8h
                8h