Runtime and console error appears when executing item test for item prototype with type Zabbix trapper

XMLWordPrintable

    • S26-W32/33
    • 0.25

      The following runtime error is observed in PHP logs in case if user attempts to test "Zabbix trapper" with "Prometheus pattern" or any other preprocessing step which uses function "avg" or other for item prototype. Following runtime error is observed:

      Undefined array key "get_value" [zabbix.php:17 -> require_once() -> ZBase->run() -> ZBase->processRequest() -> CController->run() -> CControllerPopupItemTestSend->checkInput() -> CControllerPopupItemTest->getInput() -> CController->getInput() -> CConfigFile->{closure}() in include/classes/mvc/CController.php:453]

      Besides error above, when "Not supported" checkbox is selected/ unselected under "Test item preprocessing step" following error appears in console log:

      VM21806:47
       Uncaught TypeError: Cannot read properties of null (reading 'getField')
          at HTMLInputElement.<anonymous> (<anonymous>:47:69)
      (anonymous)	@	VM21806:47

      Steps to reproduce:

      1. Open Hosts > Discovery rules > Item prototypes
      2. Press "Create item prototype" button
      3. Choose Type: Zabbix trapper
      4. Fill in "Name" => "test"; "Key" => "trap"
      5. Select "Preprocessing" tab => Click "Add"
      6. Select "Prometheus pattern" preprocessing type
      7. Enter "test" in the first parameter
      8. Press "Test" for this preprocessing step
      9. Select/ Unselect "Not supported" checkbox

      Result 1: Console error: Uncaught TypeError: Cannot read properties of null (reading 'getField')
      at HTMLInputElement.<anonymous> (<anonymous>:47:69)


      Expected 1: No errors should appear

           10. Press "Test" in "Test item" pop-up

      Result 2: Error: "cannot apply Prometheus pattern: data extraction error: no data (at least one value is required)" appears. The above mentioned runtime error is observed.
      Expected 2: No php runtime errors should appear

        1. item_proto.png
          92 kB
          Jurijs Zaharovs
        2. testitem_console_err.png
          115 kB
          Jurijs Zaharovs

            Assignee:
            Uldis Olekss
            Reporter:
            Jurijs Zaharovs
            Team B
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - Not Specified
                Not Specified
                Logged:
                Time Spent - 1.5h
                1.5h