Cacti Presets not showing correctly for less than 4 days

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

Moderators: Developers, Moderators

Locked
rrestituyo
Posts: 35
Joined: Thu Aug 15, 2019 12:10 pm

Cacti Presets not showing correctly for less than 4 days

Post by rrestituyo »

When I put more than 4 days it shows the graphs correctly but when I put less than four days like 3,2,1 day it shows the same last day graph for those.

How can I check what the issue is?
rrestituyo
Posts: 35
Joined: Thu Aug 15, 2019 12:10 pm

Re: Cacti Presets not showing correctly for less than 4 days

Post by rrestituyo »

Please let me know how it goes for you. My issue started this week and I do not know what to check or what could cause it.
rrestituyo
Posts: 35
Joined: Thu Aug 15, 2019 12:10 pm

Re: Cacti Presets not showing correctly for less than 4 days

Post by rrestituyo »

@tenpin784 I have version 1.1.38 not sure if it will work for me but I will take a look at those files. So now you can presets is working correctly for you?
rrestituyo
Posts: 35
Joined: Thu Aug 15, 2019 12:10 pm

Re: Cacti Presets not showing correctly for less than 4 days

Post by rrestituyo »

@tenpin784 thank you so much!! It worked for me :)
Bababooey
Posts: 3
Joined: Thu Oct 02, 2014 12:18 pm

Re: Cacti Presets not showing correctly for less than 4 days

Post by Bababooey »

Worked on 0.8.8b, though I only had to edit 2 files
graph_image.php and graph_xport.php

Also, info was a bit different, for example this is from graph_image.php
/* override: graph start time (unix time) */
if (!empty($_GET["graph_start"]) && $_GET["graph_start"] < 1600000000) {
$graph_data_array["graph_start"] = $_GET["graph_start"];
}

/* override: graph end time (unix time) */
if (!empty($_GET["graph_end"]) && $_GET["graph_end"] < 1600000000) {
$graph_data_array["graph_end"] = $_GET["graph_end"];
}

Once replaced 1600000000 with FILTER_VALIDATE_MAX_DATE_AS_INT - accordingly to https://github.com/Cacti/cacti/commit/b ... dc8b18c1b7 I was working. I also restarted the OS, though I'm not 100% sure if this is required.
kurushi
Posts: 1
Joined: Wed Oct 14, 2020 5:48 am

Re: Cacti Presets not showing correctly for less than 4 days

Post by kurushi »

Thanks for this topic, i was looking why i couldn't have my graphs from several days
This helped me fixing the values in graph_image.php and graph_xport.php with adding the constant in globals
Locked

Who is online

Users browsing this forum: No registered users and 2 guests