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

[API] It is possible to update a network discovery rule with two unique dhecks

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Won't fix
    • Icon: Trivial Trivial
    • None
    • 5.0.34, 6.0.17, 6.4.2
    • API (A)

      Note: the fix already implemented in ZBXNEXT-8275 sub-issue #10 for the master branch. Need to add these changes to releases 5.0, 6.0 and 6.4.

      Steps to reproduce:

      • Create drule with two unique FTP dchecks e.g:
        -) FTP port 21
        -) FTP port 22
      • Update dchecks for newly created drule, so those will be identical:
        {
            "jsonrpc": "2.0",
            "method": "drule.update",
            "params": {
                "druleid": "3",
                "dchecks": [
                 	{
                        "dcheckid": "3",
                    	"type": "3",
                	"ports": "23"
                        },
                       {
                        "dcheckid": "4",
                    	"type": "3",
                	"ports": "23"
                       }
                ]
            },
            "id": 1
        }
        

      Result: FTP checks are successfully updated. The same issue appears also updating other dcheks.

      Expected: Validation error should appear: "Checks should be unique." The same validation works in drule.create scenario. e.g.

            zabbix.dev Zabbix Development Team
            kseve Kirils Seve
            Team B
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: