[ZBX-10789] Graph line issue with item if use only Custom intervals Created: 2016 May 13  Updated: 2017 May 30  Resolved: 2016 Jun 27

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 3.0.1
Fix Version/s: 3.0.4rc1, 3.2.0alpha1

Type: Incident report Priority: Trivial
Reporter: Kim Jongkwon Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: graph, scheduling
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Zabbix 3.0.1


Attachments: PNG File 2016-05-13 12.00.35.png     PNG File chart.png    
Issue Links:
Duplicate

 Description   

Zabbix can schedule time intervals of item execution with Custom intervals options.
If you use "Update interval (in sec) - 0" and only get "Custom intervals", Graphs showing dots instead of lines.

Steps to reproduce

  • Update interval (in sec) : 0
  • Custom intervals :
    TYPE - Scheduling, INTERVAL - wd1-5h9-22m/1 (execute 1 minute)

This case, I confirmed that zoom 5m ~ 1h graphs showing dots instead of lines.
Precisely, This is affected by the width size of the graph.



 Comments   
Comment by Oleksii Zagorskyi [ 2016 May 13 ]

ZBX-6986 is highly related.

vitalijs.cemeris Will not be fixed under this issue

Comment by vitalijs.cemeris (Inactive) [ 2016 May 17 ]

(1) No translation strings changed.

oleg.egorov CLOSED

Comment by vitalijs.cemeris (Inactive) [ 2016 May 17 ]

Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-10789
This fix is only for schedule time intervals.

Comment by Oleg Egorov (Inactive) [ 2016 May 18 ]

(2)

if ($cell > $delay) {
	$draw = (boolean) ($diff < (ZBX_GRAPH_MAX_SKIP_CELL * $cell));
}
else {
	$draw = (boolean) ($diff < (ZBX_GRAPH_MAX_SKIP_DELAY * $delay));
}

Unnecessary boolean usage

vitalijs.cemeris RESOLVED in r60286

gunarspujats CLOSED

Comment by Oleg Egorov (Inactive) [ 2016 May 23 ]

(3) Items with scheduling interval does not work like trapper items

vitalijs.cemeris Discussed with sasha
Items with scheduling intervals should be drawn as trapper items only if delay is 0 and item has no flexible intervals. WON'T FIX.

Comment by vitalijs.cemeris (Inactive) [ 2016 May 25 ]

(4) Remove getSchedulingIntervals() from CItemDelayFlexParser.php
RESOLVED in r60293

gunarspujats CLOSED

Comment by Gunars Pujats (Inactive) [ 2016 Jun 13 ]

(5) Coding style

include/classes/graphdraw/CLineGraphDraw.php:2665 - it's better to separate foreach() and if() with blank line.

vitalijs.cemeris RESOLVED in r60621

gunarspujats CLOSED

Comment by Gunars Pujats (Inactive) [ 2016 Jun 13 ]

Tested.

Comment by vitalijs.cemeris (Inactive) [ 2016 Jun 14 ]

Fixed in:

  • pre-3.0.4rc1 r60623
  • pre-3.1.0 r60624
Comment by Oleksii Zagorskyi [ 2016 Jun 14 ]

Could you please kindly describe new logic of graphing data of items with scheduled and/or flexible intervals?
It really worth to be described, at least here.

vitalijs.cemeris Graph drawing logic changes:
If item have at least one scheduling interval and if delay is 0 and item have no flexible intervals than it will be drawn as trapper item.

Logic of drawing is not changed for items that have flexible intervals.

zalex_ua Thank you !

Comment by Verkh Rodion [ 2016 Aug 03 ]

Do I understand correctly: this work only when graph data select from history? Because on interval > 3 day (in my case ), when graph data select from trends, it still showing dot.
(I guess it happens, because delay override in if-else statement in include/classes/graphdraw/CLineGraphDraw.php:285 and

 $this->items[$i]['delay'] = max($this->items[$i]['delay'], SEC_PER_HOUR);

delay will be 3600
)

vitalijs.cemeris Indeed, looks like this fix does not work for graphs when data is get from trends.

Rverkh Hm, yes. i am try to little edit this if-else statement in include/classes/graphdraw/CLineGraphDraw.php:285 and add if-else statement like in include/classes/graphdraw/CLineGraphDraw.php:2659 and now it correctly work for graphs with trends data.

@@ -281,8 +281,16 @@
 						' AND clock<='.zbx_dbstr($to_time).
 					' GROUP BY itemid,'.$calc_field
 				);
-
-				$this->items[$i]['delay'] = max($this->items[$i]['delay'], SEC_PER_HOUR);
+				
+				
+				    foreach ($this->items[$i]['intervals'] as $interval) {
+					if ($interval['type'] == ITEM_DELAY_FLEX_TYPE_SCHEDULING && $this->items[$i]['delay'] == 0) {
+					    $this->items[$i]['delay'] = 0;
+					}
+					else{
+					    $this->items[$i]['delay'] = max($this->items[$i]['delay'], SEC_PER_HOUR);
+					}
+				    }
 			}
 
 			if (!isset($this->data[$this->items[$i]['itemid']])) {


But, i am not very good in php, so i am not sure that this is good way for fix

vitalijs.cemeris I created ZBX-11057 for this issue when data from trends.

Generated at Wed Apr 24 05:29:29 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.