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

Large JSON discovery with Override contain RegExp in operations leads to DB errors

XMLWordPrintable

    • Sprint 85 (Feb 2022)
    • 1

      Steps to reproduce:

      1. Install Clean Zabbix 5.4
      2. Import host - PS-1430_host.yaml
      3. Run Discovery
      4. Run Discovery Again
      5. Got DB error

      Result:

      Got error in Zabbix Server log file

      [Z3005] query failed: [1062] Duplicate entry '11201-35' for key 'hosts_groups.hosts_groups_1' [insert into hosts_groups (hostgroupid,hostid,groupid) values (8982,10698,124),(8983,10699,124),(8984,10810,155),(8985,10963,79),(8986,10963,80),(8987,11031,222),(8988,11201,35),(8989,11201,94),(8990,11201,155),(8991,11210,35),(8992,11210,91),(8993,11210,163),(8994,11437,284),(8995,11474,20),(8996,11474,191),(8997,11474,196),(8998,11565,163),(8999,11575,225),(9000,11575,226),(9001,11575,227),(9002,11577,63),(9003,11577,64),(9004,11648,289),(9005,11711,300),(9006,11712,182),(9007,11728,128),(9008,11728,242),(9009,11743,150),(9010,11743,323),(9011,11762,185),(9012,11762,203),(9013,11762,224),(9014,11762,238),(9015,11762,323),(9016,11768,289),(9017,11769,182),(9018,11796,62),(9019,11796,63),(9020,11796,333),(9021,11826,203),(9022,11826,213),(9023,11826,238),(9024,11862,323),(9025,11889,62),(9026,11889,242),(9027,11889,250),(9028,11937,122),(9029,11937,129),(9030,11937,141),(9031,12010,318),(9032,12020,330),(9033,12020,357),(9034,12034,323),(9035,12037,323),(9036,12047,248),(9037,12047,357),(9038,12066,35),(9039,12066,83),(9040,12066,172),(9041,12082,217),(9042,12087,315),(9043,12091,45),(9044,12091,217),(9045,12117,323),(9046,12145,62),(9047,12145,330),(9048,12145,344),(9049,12179,163),(9050,12193,122),(9051,12193,125),(9052,12193,141),(9053,12204,63),(9054,12227,73),(9055,12227,122),(9056,12227,141),(9057,12241,122),(9058,12241,129),(9059,12241,141),(9060,12328,79),(9061,12328,163),(9062,12346,35),(9063,12346,35),(9064,12346,45),(9065,12346,94),(9066,12346,306),(9067,12346,368),(9068,12382,300),(9069,12445,191),(9070,12449,311),(9071,12451,198),(9072,12454,28),(9073,12454,198),(9074,12494,62),(9075,12494,71),(9076,12494,378),(9077,12504,98),(9078,12532,35),(9079,12532,94),(9080,12532,318),(9081,12537,80),(9082,12563,335),(9083,12579,323);

      This error appear if in Discovery in Overrides in Operation section create condition with 

      .*

      Regarding JSON size:
      1216 - error
      607 - error
      305 - success

      RegExp “.*” was used inside the Override Operation only to catch all “host” that match the main override condition. The main scope was to discovery only the VMs with an IP address and discard all the others.

            vso Vladislavs Sokurenko
            avolodin Aleksey Volodin
            Team A
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: