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

Zabbix script item: Different result between TEST and EXECUTE NOW if MACRO used

    XMLWordPrintable

Details

    • Team A
    • Sprint 94 (Nov 2022)
    • 1.5

    Description

      Steps to reproduce:

      1. Create new script item with:

      Parameter:
      ourdata : [{"domain":"oicts.com","port":"443","ip":"1.2.3.4"},{"domain":"nu.nl","port":"443","ip":"1.2.3.4"}]

      2. Create script:

      var params = JSON.parse(value);
      return params.ourdata; 

       

      Result:

      When testing using the test button:

       

      When executing the item itself:

      Cannot execute script: SyntaxError: invalid json (at offset 24)
      at [anon] (duktape.c:36563) internal
      at parse () native strict preventsyield
      at [anon] (function:1) preventsyield 

       

       

      Expected:

      Regardless of whether the script is correct or not: I expect the same result on TEST as on EXECUTE NOW (update interval)! Otherwise troubleshooting is almost impossible. The TEST states data is all good, but when executing why are there hidden errors/additional checks?

      Attachments

        Activity

          People

            solonkins Sergejs Olonkins
            nathan.liefting Nathan Liefting
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: