[ZBX-8797] Item prototypes with LowID are not shown when creating a graph prototype Created: 2014 Sep 19  Updated: 2017 May 30  Resolved: 2014 Sep 25

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 2.2.4
Fix Version/s: 2.2.7rc1

Type: Incident report Priority: Trivial
Reporter: Filipp Sudanov (Inactive) Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: frontend, nodes
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File ZBX-8797.patch    
Issue Links:
Duplicate

 Description   

Client had a number of graph prototypes with HighID.
The node-based system (2.0) was converted to nodeless (2.2.4).
Client added new item prototype with LowID.

When trying to create a graph prototype, the newly added item prototype is not shown in the list.

Debug shows the following query:

SQL (0.207164): SELECT DISTINCT g.groupid,g.name FROM groups g,hosts_groups hg,hosts h WHERE hg.groupid=g.groupid AND h.hostid=hg.hostid AND h.status IN (0,1,3) AND g.groupid BETWEEN 100000000000000 AND 199999999999999
popup.php:388 ? CPageFilter->__construct() ? CPageFilter->_initGroups() ? CAPIObject->get() ? CAPIObject->__call() ? czbxrpc::call() ? czbxrpc::callAPI() ? call_user_func() ? CHostGroup->get() ? DBselect() in /slpzxs03/appli/ihs/data/web/apache2_zabbix_php/crt.2.2.4/api/classes/CHostGroup.php:351


SQL (0.003619): SELECT DISTINCT id.parent_itemid,i.* FROM items i,item_discovery id WHERE i.flags=2 AND id.parent_itemid='100100001519846' AND i.itemid=id.itemid AND i.value_type IN ('0','3') AND i.itemid BETWEEN 100000000000000 AND 199999999999999
popup.php:1282 ? CAPIObject->get() ? CAPIObject->__call() ? czbxrpc::call() ? czbxrpc::callAPI() ? call_user_func() ? CItemPrototype->get() ? DBselect() in /slpzxs03/appli/ihs/data/web/apache2_zabbix_php/crt.2.2.4/api/classes/CItemPrototype.php:247


 Comments   
Comment by Pavels Jelisejevs (Inactive) [ 2014 Sep 22 ]

How exactly was the database converted?

Comment by Filipp Sudanov (Inactive) [ 2014 Sep 24 ]

mysql> select * from nodes;
Empty set (0.00 sec)

Comment by Krists Krigers (Inactive) [ 2014 Sep 25 ]

Fixed and committed in r49360, branch svn://svn.zabbix.com/branches/dev/ZBX-8797 (copy of 2.2).

Comment by Pavels Jelisejevs (Inactive) [ 2014 Sep 26 ]

If someone needs to reproduce this bug, here's how you can do it:
1. Create a DM setup with two nodes A and B, where B is the child of A.
2. Create a host with an LLD rule on both nodes.
3. Migrate to a standalone setup (clear the nodes and ids tables).
4. Create an item prototype on node A (it will create it using the ID range of node B).
5. Try to create a graph prototype and add the item prototype. You won't see it in the list.

Comment by Pavels Jelisejevs (Inactive) [ 2014 Sep 26 ]

TESTED.

Comment by Krists Krigers (Inactive) [ 2014 Sep 26 ]

Fixed and merged to 2.2.7rc1 in r49423.

Generated at Thu Apr 25 07:21:39 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.