[ZBX-5789] Graphs from LLD discovery changing ID's often Created: 2012 Nov 02  Updated: 2017 May 30  Resolved: 2014 Feb 14

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Server (S)
Affects Version/s: 2.0.3
Fix Version/s: 2.0.12rc1, 2.2.3rc1, 2.3.0

Type: Incident report Priority: Major
Reporter: Łukasz Jernaś Assignee: Unassigned
Resolution: Fixed Votes: 3
Labels: discovery, graphs, lld
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by ZBX-4629 Graphs based on Low Level Discovery d... Closed
is duplicated by ZBX-7495 after link template with LLD to hosts... Closed
is duplicated by ZBX-7916 Graph for not discovered interface is... Closed

 Description   

We have a lot of low level discovery items and graphs, unfortunately when using graphs from discovery in screen they often disappear without a reason. We're assuming that the graphs are changing their graphid's, so the screens remove them as not valid.
Problem is the actual data items are still the same and have their history, so their id's aren't changing. This is a major problem for us, as screens are a vital part of the workflow with Zabbix.



 Comments   
Comment by Oleksii Zagorskyi [ 2012 Nov 03 ]

This is known case.

I suppose that for all those disappeared graphs some lld-macro (used in graph name) has been changed during next lld discovery.

Problem is that in item a field used in uniqueness criteria is "key" but in triggers and graphs it's a their "name" field.

That's why graphs will be deleted from screens.

I recall this already was discussed in some issue and on forum but cannot find it at the moment.

Comment by Łukasz Jernaś [ 2012 Nov 04 ]

Not good

Comment by richlv [ 2014 Jan 07 ]

triggers being deleted and recreated was solved in ZBX-6315/ZBX-7109, this problem most likely still there

Comment by Alexander Vladishev [ 2014 Feb 10 ]

Whats new:

  1. Better processing of graph prototypes.
    • Already discovered graps will be updated only if something changed.
    • Only changed fields will be updated.
    • Decreased number and size of sql queries.
    • Lost graphs will be deleted only after selected period.
    • Better validation of fields after resolving of LLD macros.
      • validity of UTF-8 sequences
      • validity of fields lengths

Tests:

One discovery rule with 2 item prototypes and 1 graph prototype. Received 2048 new records.

2.0.11

Action Time, sec. Number of SQL requests Total size of SQL statements, bytes
first discovery (creating of 2048 graphs) 23.946391 10255 1648535
next discovery (updating) 10.914699 10246 2685571
next discovery (changed name in graph prototype) 29.102495 12294 2929283

2.0.11 with the fix

Action Time, sec. Number of SQL requests Total size of SQL statements, bytes
first discovery (creating of 2048 graphs) 0.754427 17 436068
next discovery (updating) 0.076107 4 876
next discovery (changed name in graph prototype) 0.597448 8 181123
Comment by Alexander Vladishev [ 2014 Feb 10 ]

Fixed in the development branch svn://svn.zabbix.com/branches/dev/ZBX-5789

Comment by Andris Zeila [ 2014 Feb 13 ]

(1) lld_graph.c:255

zbx_vector_uint64_create(&graphids);
zbx_vector_uint64_append(&graphids, parent_graphid);

for (i = 0; i < graphs->values_num; i++)
{
	graph = (zbx_lld_graph_t *)graphs->values[i];

	zbx_vector_uint64_append(&graphids, graph->graphid);
}

if (0 != graphids.values_num)
...

The graphids vector cannot be empty as parent_graphid was added right after creating it.

sasha Thanks! RESOLVED in r42648.

wiper CLOSED

Comment by Andris Zeila [ 2014 Feb 14 ]

Successfully tested

Comment by Alexander Vladishev [ 2014 Feb 14 ]

Fixed in pre-2.0.12 r42660, pre-2.2.3 r42662 and pre-2.3.0 (trunk) r42664.

Comment by Alexander Vladishev [ 2014 Feb 14 ]

(2) [I] trunk: The unused fields graph_discovery.name and graph_discovery.graphdiscoveryid should be removed.

sasha RESOLVED in r42678. (recreated development branch svn://svn.zabbix.com/branches/dev/ZBX-5789)

wiper CLOSED

Available in pre-2.3.0 r42691.

Comment by richlv [ 2014 Feb 14 ]

(3) to be mentioned in 2.0 & 2.2 whatsnew pages

sasha RESOLVED

<richlv> i added some numbers on by how much this was improved - please review

sasha Great! CLOSED

Comment by Andris Zeila [ 2014 Feb 14 ]

Successfully tested

Comment by richlv [ 2014 Feb 14 ]

subissue (3) has not been closed

Generated at Fri Mar 29 08:35:07 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.