I have a strange Issue and I think something goes wrong in the Javascript implementation of Zabbix.

      We run Zabbix server 7.2.5 (Mysql/apache2) on Ubuntu 24.04 (issue was also present in 7.2.4)

      We are developing our own template for monitoring Fortigate devices by HTTP.

      I have a HTTP agent item which retrieves the data through the REST API (See 0_HTTPResponse.txt). I then put a JSONpath preprocessing on the main item to only show everything under $.result

      One of the dependent items of the parent item is a Discovery where I put in a Javascript preprocessing action to do a "Discovery in Discovery" in order to output a JSON with LLD macros an values (1_DiscoveryJavascript.txt) of which I want all the items to be created. This works as far as I can test perfectly and I get all the values I need when I test it on the item. (2_Javascriptresponse.txt)

      The weird thing is (and the core of this issue), is that when I create items using the LLD macros, one of the LLD values ({#SDWHCNAME}) gets converted to an ID instead of the original string from the LLD discovery.

      This results in items like below picture, where all the items have a ID number which is nowhere to be found in the LLD response.

      This then breaks everything in the created items, because the value "0" doesn't exist in the HTTP Agent response.

      I've tried a few things (replacing whitespace chars, changing quotation) but the issue remains. It feels to me like an issue within Zabbix since the LLD response after preprocessing is correct and the discovered item within the item does show the right name.

      I've added the created template for reference.

            zabbix.dev Zabbix Development Team
            versnellingsbak Tom Scholten
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: