Bug #29192 Server imports rules & graphs before items files
Submitted: 19 Jun 2007 0:43 Modified: 11 Jul 2007 15:07
Reporter: Andy Bang Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Server Severity:S2 (Serious)
Version:1.2 OS:Any
Assigned to: Darren Oldag CPU Architecture:Any
Tags: mer 120

[19 Jun 2007 0:43] Andy Bang
Description:
The Merlin server seems to import the rules and graphs in an Advisor JAR before it imports the data collection items in the items-xxx.xml files embedded in the JAR, so any rules that use new items cause "... contains a data collection item that can not be identified" errors and cannot be imported the first time -- you have to re-import the same file a second time to get them.

How to repeat:
1) Add a DC item to items-mysql-network in branches\advisors-1.1.0 (I've just added new Falcon DC items there).
2) Add a rule to the testing directory that uses the new DC item (I've just added four Falcon rules and six Falcon graphs that use the new Falcon DC items).
3) Build new Advisor JARs in the branch.
4) Do NOT update Basic.JAR in trunk.
5) Start Merlin and import the testing JAR.
6) You will see error messages like the following and the rules that use those DC items won't be available:

Error Jun 18, 2007 5:25 PM E1104:  Graph "Falcon Transactions" contains a data collection item that can not be identified. 
Error Jun 18, 2007 5:25 PM E1104:  Graph "Falcon Serial Log" contains a data collection item that can not be identified. 
Error Jun 18, 2007 5:25 PM E1104:  Graph "Falcon System Memory" contains a data collection item that can not be identified. 
Error Jun 18, 2007 5:25 PM E1104:  Graph "Falcon Record Cache" contains a data collection item that can not be identified. 
Error Jun 18, 2007 5:25 PM E1104:  Graph "Falcon Page Cache Hit Ratio" contains a data collection item that can not be identified. 
Error Jun 18, 2007 5:25 PM E1304:  Advisor "Falcon Transactions Are Blocked" contains a data collection item that can not be identified. 
Error Jun 18, 2007 5:25 PM E1104:  Graph "Falcon I/O" contains a data collection item that can not be identified. 
Error Jun 18, 2007 5:25 PM E1304:  Advisor "Falcon Free System Memory Is Low" contains a data collection item that can not be identified. 
Error Jun 18, 2007 5:25 PM E1304:  Advisor "Falcon Page Cache Has Sub-Optimal Hit Rate" contains a data collection item that can not be identified. 
Error Jun 18, 2007 5:25 PM E1304:  Advisor "High Percentage Of Rollbacks In Falcon Storage Engine" contains a data collection item that can not be identified. 

7) Check the dc_items table and you will see that the new DC items were correctly imported.
8) Import the testing JAR again and you will now see the new rules and graphs because the dc_items are now there.

Suggested fix:
Import the data in the items-xxx.xml files in an advisor JAR *before* importing the rules and graphs in the JAR.
[30 Jun 2007 5:04] Darren Oldag
utilized the ResourceLoader to import items,
rules, and graphs in that order.

this is for a jar imported from network or from a
local file.  the built-in resource import was not modified.
[11 Jul 2007 10:42] Mark Leith
Verified errors no longer occur within 1.2.0.6550
[11 Jul 2007 15:07] Peter Lavin
This bugs occurs only in version 1.2, which hasn't yet been released, so I'm closing  it without adding it to the changelog. Let me know if there is any reason to do otherwise.