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

[ZBX-25322] Unable to run Remote Command as Trigger Action Operation while in a Proxy Group

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • 7.0.15
    • Server (S)
    • None

      Steps to reproduce:

      1. Create script to perform any action such as running a PowerShell command
      2. Create trigger action to run script based on a condition such as Windows service has stopped running
      3. Stop service mentioned in condition to trigger the trigger action

      Result:

      "Host is monitored by proxy group, but its proxy assignment is still pending." even though host has an assigned proxy.

      Expected:
      Zabbix server is supposed to run script in trigger action.

       

      Research:

      zabbix/src/zabbix_server/escalator/escalator.c at master - zabbix/zabbix - GitHub

      Not sure if this code is still used in the product, but based on lines 1506 to 1523, it would seem that the escalator is checking to see if the host's proxyID is equal to 0, which would indicate that it is not being monitored by a proxy. Assuming this code is still being used, this is faulty logic because it doesn't take into account the possibility of a host being monitored by a proxy group. See response from API below

      {   "hostid": "10702",   *"proxyid": "0",*   "host": "SERVER",   "status": "0",   "ipmi_authtype": "-1",   "ipmi_privilege": "2",   "ipmi_username": "",   "ipmi_password": "",   "maintenanceid": "0",   "maintenance_status": "0",   "maintenance_type": "0",   "maintenance_from": "0",   "name": "SERVER",   "flags": "0",   "templateid": "0",   "description": "",   "tls_connect": "2",   "tls_accept": "2",   "tls_issuer": "",   "tls_subject": "",   "custom_interfaces": "0",   "uuid": "",   "vendor_name": "",   "vendor_version": "",   "proxy_groupid": "1",   *"monitored_by": "2",*   "inventory_mode": "1",   "active_available": "1",   *"assigned_proxyid": "7"* }

            zabbix.support Zabbix Support Team
            dz-yamh Henry Yam
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: