SOLVED Time graph view showing always the same graph

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
chonfirex
Posts: 3
Joined: Thu Nov 22, 2018 12:30 pm

SOLVED Time graph view showing always the same graph

Post by chonfirex »

Hi there, here goes my first post on this forum. Since awhile ago (I can't say precisely, but let's say 3 to 4 months) the time graph view show only one graph. It's configured to show 4 different graphs based on time period: "Daily (5 Minute Average)", "Weekly (30 Minute Average)", "Monthly (2 Hour Average)" and "Yearly (1 Day Average)". Nevertheless, all the for graphs shows a period of time I can't establish.

The graphs change depending on the graph. For instance, one of the devices being monitored has 2 graphs: CPU usage and Memory usage. If I visit the time graph view for CPU usage the graph displayed 4 times are all regarding CPU usage. If I visit the time graph view for Memory usage the graph displayed 4 times are all regarding Memory usage.

On the other hand, data are being polled regularly and it's being displayed without problems. Actually, if I set a custom period time (let's say 6 months), the graphs show everything fine. It makes me thing data are stored correctly in the database.

The system is running Fedora 29, rrdtool 1.5.5 and cacti 0.8.8h.

I send a screenshot.

Greetings,
Thank you so much.
Attachments
cacti_time_graph.png
cacti_time_graph.png (46.04 KiB) Viewed 1391 times
Last edited by chonfirex on Sat Nov 24, 2018 6:52 am, edited 1 time in total.
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: Time graph view showing always the same graph, ver 0.8.8

Post by netniV »

You'll struggle getting support on 0.8.8h these days. The code has changed quite a lot.

I would check for any errors in the cacti.log or error_log (apache) as it sounds like something is not being calculated correct. Especially if you are able to set the time range manually and see data.
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
chonfirex
Posts: 3
Joined: Thu Nov 22, 2018 12:30 pm

SOLVED Time graph view showing always the same graph, ver 0.

Post by chonfirex »

I found a solution. At graph.php, the case "view" seems not to be passing the parameters correctly. The values for graph_start and graph_end is needed to create the image. Nevertheless, it is not happening.

Around line 108 of graph.php there's this line of code:

Code: Select all

<img class='graphimage' id='graph_<?php print $_REQUEST["local_graph_id"] ?>' src='<?php print htmlspecialchars("graph_image.php?action=view&local_graph_id=" . $_REQUEST["local_graph_id"] . "&rra_id=" . $rra["id"]);?>' border='0' alt='<?php print htmlspecialchars($graph_title, ENT_QUOTES);?>'
The file graph_image.php has a series of if statements to check if some values needed to create the image have been passed. Two of these values are graph_start and graph_end. So, I added a couple of code to the previous line and now it looks like this:

Code: Select all

<img class='graphimage' id='graph_<?php print $_REQUEST["local_graph_id"] ?>' src='<?php print htmlspecialchars("graph_image.php?action=view&local_graph_id=" . $_REQUEST["local_graph_id"] . "&rra_id=" . $rra["id"] . "&graph_start=" . $graph_start . "&graph_end=" . $graph_end);?>' border='0' alt='<?php print htmlspecialchars($graph_title, ENT_QUOTES);?>'>
And everything is working great again. 8)

On the other hand, I do believe I should upgrade the system, but, since it is a home PC, I don't want to go through it. Unless it's really, really necessary. :P :oops:

Greetings and thank you all.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest