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

Missing LLD in Template Discovery rule for discovered hosts.

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • 5.4.5
    • Templates (T)
    • None
    • CentOS Linux release 8.4.2105

      Steps to reproduce:

      1. Manually create a host that has a Discovery rule that creates additional hosts with a host prototype
      2. Host prototype has two interfaces, Zabbix Agent and an IPMI, Connection information is set from the Discovered data.
      3. host prototype contains the "Chassis by IMPI" Template

      Some additional background:
      I am attempting to monitor an oVirt cluster. I have a custom Agent module that connects to the clusters API and pull all the info i need, Including the physical hosts. I then have Some discovery rules set up to create a host entry for each VM as well as disks and everything else i need, Including a host entry for every physical host. This all works fantastically.  I am even getting the IP address for the IPMI and the host prototype for the physical host entries have two interfaces, one for the zabbix agent and one for IPMI access where the IP is set via LDD. (Image: host_prototype_def.png) again this works fantastic. I am using the "Chassis by IPMI" template to collect the IPMI data.

      The workflow is...

      Host (manually created) -> Discovery rule "oVirt Host Discovery" -> Host Prototype -> "Chassis by IPMI" template

       

      Result:
      Missing Discovered IPMI triggers

      The issue is with the "Chassis by IPMI: threshold sensors discovery" Discovery rule. It runs and all of the items are created from the item prototypes and the data is retrieved from the appropriate dependent item. The issue is that the trigger prototypes error out with "Cannot link template(s) invalid token starting with "{#SENSOR_HI_CRIT}"."  (image: host_discovery_rule_error.png)

      and from the level 5 logs...

       

      1857824:20211012:134947.670 End of lld_update_hosts()
      1857824:20211012:134947.670 End of lld_process_discovery_rule()
      1857824:20211012:134947.670 query without transaction detected
      1857824:20211012:134947.670 query [txnlev:0] [update item_rtdata set error='Cannot link template(s) invalid token starting with "{#SENSOR_HI_CRIT}".
      Cannot link template(s) invalid token starting with "{#SENSOR_HI_CRIT}".
      Cannot link template(s) invalid token starting with "{#SENSOR_HI_CRIT}".
      Cannot link template(s) invalid token starting with "{#SENSOR_HI_CRIT}".
      Cannot link template(s) invalid token starting with "{#SENSOR_HI_CRIT}".
      Cannot link template(s) invalid token starting with "{#SENSOR_HI_CRIT}".
      Cannot link template(s) invalid token starting with "{#SENSOR_HI_CRIT}".
      Cannot link template(s) invalid token starting with "{#SENSOR_HI_CRIT}".
      Cannot link template(s) invalid token starting with "{#SENSOR_HI_CRIT}".
      Cannot link template(s) invalid token starting with "{#SENSOR_HI_CRIT}".
      Cannot link template(s) invalid token starting with "{#SENSOR_HI_CRIT}".
      Cannot link template(s) invalid token starting with "{#SENSOR_HI_CRIT}".
      Cannot link template(s) invalid token starting with "{#SENSOR_HI_CRIT}".
      Cannot link template(s) invalid token starting with "{#SENSOR_HI_CRIT}".
      Cannot link template(s) invalid token starting with "{#SENSOR_HI_CRIT}".
      ' where itemid=220057;
      ]
      1857824:20211012:134947.671 End of lld_process_task()
      1857824:20211012:134947.671 In zbx_ipc_socket_write()
      1857824:20211012:134947.671 End of zbx_ipc_socket_write():SUCCEED
      1857824:20211012:134947.671 In zbx_ipc_socket_read()
      

       

      Expected:

      The expected result is that the triggers are created like the items. I am only creating this Jira because if you manually create a host with the exact same settings that the Discovered hosts are created with then the triggers are created as expected. (Image: manual_vs_discoverd_hosts.png)

      Also note that the triggers for the "Discrete sensors discovery" where created and they are using some LLD's from the "Chassis by IPMI" template such as "{#SENSOR_ID} and that correct data is being set from those LLD's (Image: "discoverd_host_triggers.png")

      Another oddity is after the Discovery rule that finds and creates these hosts fails a few times with the aforementioned error. It then succeeds and creates all the hosts. The hosts are however missing all of the IPMI triggers.

      Looking at the IMPI data that is returned by the "get IPMI" item i do see some sensors with missing thresholds however each of them should be filtered out as there json path $.sensor.text is equal to "invalid"

       

      {
        "id":"PW Consumption",
        "name":"(21.0).PW Consumption",
        "sensor":{
          "type":193,
          "text":"invalid"
        },
        "reading":{
          "type":1,
          "text":"threshold"
        },
        "state":{
          "state":0,
          "text":""
        },
        "value":230.000000,
        "units":"watts",
        "threshold":{
          "lower":{
      
          },
          "upper":{
      
          }
        }
      },
      

       

      Also worth noting is that i have not altered the "Chassis by IPMI" template in any way.

        1. discoverd_host_triggers.png
          discoverd_host_triggers.png
          95 kB
        2. host_discovery_rule_def.png
          host_discovery_rule_def.png
          74 kB
        3. host_discovery_rule_error.png
          host_discovery_rule_error.png
          159 kB
        4. host_prototype_def.png
          host_prototype_def.png
          68 kB
        5. manually_created_host.png
          manually_created_host.png
          64 kB
        6. template_dif.png
          template_dif.png
          61 kB

            avolodin Aleksey Volodin
            xxann5 Chris Majoros
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: