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

    • Sprint 94 (Nov 2022)
    • 1.5

      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?

        1. image-2022-10-26-14-31-09-038.png
          13 kB
          Nathan Liefting
        2. image-2022-10-26-14-32-08-492.png
          11 kB
          Nathan Liefting
        3. image-2022-10-26-14-32-52-343.png
          49 kB
          Nathan Liefting
        4. image-2022-10-26-14-33-33-108.png
          54 kB
          Nathan Liefting
        5. Screenshot 2022-10-27 at 09.26.40.png
          91 kB
          Nathan Liefting
        6. Screenshot 2022-10-27 at 09.26.40-1.png
          91 kB
          Nathan Liefting
        7. Screenshot 2022-10-27 at 09.26.40-2.png
          91 kB
          Nathan Liefting
        8. Screenshot 2022-10-27 at 09.27.26.png
          36 kB
          Nathan Liefting
        9. Screenshot 2022-10-27 at 09.27.26-1.png
          36 kB
          Nathan Liefting
        10. Screenshot 2022-10-27 at 09.36.04.png
          35 kB
          Nathan Liefting
        11. Screenshot 2022-10-27 at 09.36.16.png
          18 kB
          Nathan Liefting
        12. Screenshot 2022-10-27 at 09.38.19.png
          41 kB
          Nathan Liefting
        13. Screenshot 2022-10-27 at 12.45.43.png
          184 kB
          Nathan Liefting
        14. Screenshot 2023-01-27 at 14.30.42.png
          66 kB
          Nathan Liefting
        15. Screenshot 2023-01-27 at 14.31.31.png
          175 kB
          Nathan Liefting

            kprutkovs Konstantins Prutkovs
            nathan.liefting Nathan Liefting
            Team A
            Votes:
            0 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: