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

Remove before and after blocks for unchanged entities in the api method configuration.importcompare

XMLWordPrintable

    • Sprint 76 (May 2021), Sprint 77 (Jun 2021), Sprint 78 (Jul 2021), Sprint 79 (Aug 2021), Sprint 80 (Sep 2021), Sprint 81 (Oct 2021), Sprint 82 (Nov 2021), Sprint 83 (Dec 2021), Sprint 84 (Jan 2022), Sprint 85 (Feb 2022), Sprint 86 (Mar 2022), Sprint 87 (Apr 2022), Sprint 88 (May 2022), Sprint 89 (Jun 2022), Sprint 90 (Jul 2022), Sprint 91 (Aug 2022), Sprint 92 (Sep 2022), Sprint 93 (Oct 2022), Sprint 94 (Nov 2022), Sprint 95 (Dec 2022), Sprint 96 (Jan 2023), Sprint 97 (Feb 2023), Sprint 98 (Mar 2023)

      Steps to reproduce:

      1. Create template with item and trigger
      2. Get template import "source" data to use it further in api
      3. Change trigger name
      4. Send api request:
            "method": "configuration.importcompare",
            "params": {
                "format": "yaml",
                "rules": {
                    "groups": {
                        "createMissing": true,
                        "updateExisting": true
                    },
                    "templates": {
                        "createMissing": true,
                        "updateExisting": true
                    },
                    "items": {
                        "createMissing": true,
                        "updateExisting": true,
                        "deleteMissing": true
                    },
                    "triggers": {
                        "createMissing": true,
                        "updateExisting": true
                    }
                },
                "source": "zabbix_export:\n  version: '5.4'\n  date: '2021-05-14T13:18:53Z'\n  groups:\n    -\n      uuid: 3db9df077509459aaba109060764d431\n      name: apitemplate\n  templates:\n    -\n      uuid: 6bc7f3070e0842f3ace4a3606d8bb66e\n      template: apitemplate\n      name: apitemplate\n      groups:\n        -\n          name: apitemplate\n      items:\n        -\n          uuid: 477665165c274f5c98f10136aab236bc\n          name: apiitem\n          key: apiitem\n          triggers:\n            -\n              uuid: 4d23e9a921f84441bfcf7b74081c1c29\n              expression: last(/apitemplate/apiitem)=0\n              name: apitrigger\n"
            },
        

      Result:
      the output contains before and after blocks for the template and item, but there is no change there

      Expected:
      show before and after blocks only if it is different from before block.
      Also, if one of the parameters is set to false, for example, for trigger set ""updateExisting": false", then before and after blocks should not be either.

            zabbix.dev Zabbix Development Team
            natalja.zabbix Natalja Romancaka
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: