Script item test drops parameter when name is 255 or value is 2048 chars

XMLWordPrintable

    • Type: Problem report
    • Resolution: Unresolved
    • Priority: Trivial
    • None
    • Affects Version/s: 7.4.11
    • Component/s: Server (S)
    • None
    • Support backlog
    • 1

      Steps to reproduce:

      1. Create a Script item with body return value; and one parameter, name = 255 characters i.e.
        111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111

        value = any

      2. Test item in configuration window
      3. Observe Value = {} instead of the parameter object.

      Result:

      At the same time, data collection works fine:

      Debug:
      Request sent to server

      {
        "request": "item.test",
        "sid": "<frontend session id>",
        "data": {
          "item": {
            "type": 21,
            "key": "script.test",
            "value_type": 4,
            "params": "return value;",
            "parameters": { "111(...)111": "2" },
            "timeout": "3s"
          },
          "options": {}
        }
      }
      

      Server log for the same request:

      406:20260617:092358.896 trapper got request 'item.test'
      406:20260617:092358.896 In zbx_trapper_item_test()
      406:20260617:092358.897 In zbx_trapper_item_test_run()
      406:20260617:092358.897 key:'script.test'
      406:20260617:092358.897 In get_value() key:'script.test'
      406:20260617:092358.897 End of zbx_trapper_item_test_run():SUCCEED
      406:20260617:092358.897 trapper_item_test() json.buffer:'{}'
      406:20260617:092358.897 End of zbx_trapper_item_test()
      

      Response returned to the frontend:

      {"response":"success","data":{"item":{"result":"{}","eol":"LF"},"preprocessing":{"steps":[],"result":"{}"}}}
      

      The same request with a 254-character name returns the full object.

            Assignee:
            Zabbix Development Team
            Reporter:
            Michal Kudlacz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: