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

getScriptsByHosts function returns redundant information

XMLWordPrintable

      It returns all hosts related with script host group AND all hosts related with NULL host_group.
      So the next query:
      mysql> SELECT DISTINCT s.*,hg.hostid FROM scripts s,hosts_groups hg WHERE (( (hg.hostid IN ('15097','15095','15096','15098','15099','15101','14869','15100','13266','13265','13259','13260','13261','13262','13263','13267','13264','14503','14507','14502','14504','14505','14506','14510','14511','10896','10894','10895','10891','10892','10893','10502','10501','15595','10503','10504','10500','12528','12526','12524','12527','12529','12622','12525','10206','10204','10205','10207','10216','11506','15596','15598','15609','15681','15602','15604','15606','15607','15601','15597','15599','15600','15603','11750','11748','11746','11749','11747','11751','11752','12627','12628','12624','12625','12626','12629','14188','14186','14187','11291','11289','12190','12187','12193','12192','12189','12191','12198','12200','13724','13728','13718','13722','13723','13719','13721','13725','13726','13727','13741','15715','15708','15709','15710','15714','15717','15718','15704','15706','15713','15707','15711','15705','15712')) AND hg.groupid=s.groupid) OR (s.groupid IS NULL AND scriptid BETWEEN 000000000000000 AND 099999999999999)) ORDER BY s.name;
      will return 16974 rows in set (0.00 sec)!

      The resulting array is a array of scripts with included all hosts information!

      and php source code for maps.php is >20MB!

            Unassigned Unassigned
            dotneft Alexey Pustovalov
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: