Remote command execution via action operation fails

XMLWordPrintable

    • Type: Problem report
    • Resolution: Unresolved
    • Priority: Trivial
    • Affects Version/s: 7.0.24
    • Component/s: Server (S)
    • None
    • Environment:
      * Zabbix server 7.0.24 (Alpine, Docker)
      * MySQL 8.0
      * 3 active proxies in a proxy group
    • S26-W16/17
    • 1

      Remote command execution via action operations fails with "Host is monitored by proxy group, but its proxy assignment is still pending" when the operation targets a specific host or host group. The bug does not occur when the target is "Current host".

      Steps to reproduce:

      1. Create a proxy group with at least one active proxy
      2. Create a host monitored by the proxy group
      3. Link template or create a trapper item and trigger
      4. Create a script: Alerts > Scripts > Create script
        • Scope: Action operation
        • Type: Script
        • Execute on: Zabbix agent
        • Command: echo test
      5. Create a trigger action: Alerts > Actions > Trigger actions
        • Condition: trigger equals any trigger on the host
        • Operation: Run script (from step 4) on specific host (select the host from step 2)
      6. Trigger the action (i.e. stop a monitored service, or use a trapper item)

      Result:

      Expected:
      Executed command 

      Workaround:
      From

      Change to

      Result:

      Issue:
      The execute_commands() in src/zabbix_server/escalator/escalator.c gets proxy assignment from hosts table (where proxyid is always NULL when host is monitored by a proxy group) rather than from host_proxy table.

      Manual script execution is also affected (src/libs/zbxtrapper/nodecommand.c).

      "Current host" is handled by zbx_event_db_get_host() in src/libs/zbxevent/event_db.c and does it correctly.

            Assignee:
            Zabbix Development Team
            Reporter:
            Michal Kudlacz
            Team B
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: