Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aggregate graphs get clipped due to incorrect date range #2848

Closed
jav4 opened this issue Jul 27, 2019 · 4 comments
Closed

Aggregate graphs get clipped due to incorrect date range #2848

jav4 opened this issue Jul 27, 2019 · 4 comments
Labels
bug Undesired behaviour resolved A fixed issue

Comments

@jav4
Copy link
Contributor

jav4 commented Jul 27, 2019

Due to an error in step calculation, some aggregated graphs get a part of them clipped. Fix is very simple (patch included).

rrd.patch.txt

--- rrd.php.OLD	2019-07-27 13:46:43.387895819 +0200
+++ rrd.php	2019-07-27 13:47:04.100010947 +0200
@@ -2458,7 +2458,7 @@
 			if (cacti_sizeof($data_source_info)) {
 				foreach($data_source_info as $resolution) {
 					if ($graph_start > ($time - ($resolution['step'] * $resolution['steps'] * $resolution['rows']))) {
-						if ($type = 'res') {
+						if ($type == 'res') {
 							return $resolution['step'] * $resolution['steps'];
 						} else {
 							return $resolution['step'];
@netniV
Copy link
Member

netniV commented Jul 27, 2019

You can just paste the difference. I've updated your post with it so you can edit and see how it's done.

@cigamit
Copy link
Member

cigamit commented Aug 11, 2019

I'm not finding this in the Cacti source. What version of Cacti are you using?

@cigamit cigamit added the unverified Some days we don't have a clue label Aug 11, 2019
@jav4
Copy link
Contributor Author

jav4 commented Aug 12, 2019

@cigamit I was using 1.2.4, but bug is still in current tree (line 2465 of lib/rrd.php as of today).

@cigamit
Copy link
Member

cigamit commented Aug 12, 2019

Okay, yea brain dead. Found it.

cigamit added a commit that referenced this issue Aug 12, 2019
Aggregate graphs get clipped due to incorrect date range
@cigamit cigamit added bug Undesired behaviour resolved A fixed issue and removed unverified Some days we don't have a clue labels Aug 12, 2019
@cigamit cigamit closed this as completed Aug 12, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Jun 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Undesired behaviour resolved A fixed issue
Projects
None yet
Development

No branches or pull requests

3 participants