[API] dcheck parameters are not updating to empty values when related type doesn't use them

XMLWordPrintable

    • Type: Problem report
    • Resolution: Duplicate
    • Priority: Trivial
    • None
    • Affects Version/s: 7.0.23rc1, 7.4.7rc1, 8.0.0alpha2 (master)
    • Component/s: API (A)
    • None

      Steps to reproduce:

      • Go to /zabbix.php?action=discovery.list
      • Open "Local network" discovery rule edit form
      • Enable the rule, update IP range and discovery check => replace Zabbix agent to HTTP with default port or use API request e.g.
      {
          "jsonrpc": "2.0",
          "method": "drule.update",
          "iprange": {valid_ip_range},
          "params": {
              "druleid": "2",
              "dchecks": [
                  {
                      "dcheckid": "2",
                      "type": "4",
                      "ports": "80"
                  }
              ]
          },
          "id": 1
      }
      
      • save the configuration
      • run zabbix server
      • Check dchecks table _key parameter
      • Check Monitoring => Discovery page

      Result: drule.update doesn't overrides _key value.
      Network discovery reult =>

      Note: The same issue appears with snmp fields.

      Expected: dcheck type unrelated parameters should be overridden with empty values.

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

              Created:
              Updated:
              Resolved:

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