-
Incident report
-
Resolution: Won't fix
-
Trivial
-
None
-
1.8.14, 2.0.3
I believe this condition should be reviewed, as it doesn't make much sense, and leads to wrong selection of history instead of trends when displaying graphs with interval bigger than one day, but lesser than two days..
frontends/php/include/classes/class.cchart.php, line 244:
if((($real_item['history']*86400) > (time()-($this->from_time+$this->period/2))) && // should pick data from history or trends
for data source selection to work properly, this line should read as:
if((($real_item['history']*86400) > (time()-($this->from_time+60))) && // should pick data from history or trends
note that "+60" (lesser number would work too, but I selected 60 seconds to be on the safe side) in second part of expression is necessary as sometimes on slow servers time()-($this->from_time results in wrong time interval. for example, when selecting 1d interval on my prehistoric test bench server, this expression can result in 86401, or even 86402, effectively annihilating possiblity of building the graph based on history data despite having correct time interval selected.
the same logic should be applied on CPie class etc.
- is duplicated by
-
ZBX-5834 Conditions when web-interface gets data from history or trends should be documented
- Closed