Hello,
I am trying to modify the export to have the weekly graphs on the frontpage instead of daily per hour. I would love this functionality so we can easily print this to a pdf to use for reporting. My google and forum search skills have abandoned me though, and I can't find a solution to this in the php code myself. Does anyone have a clue where I have to look/modify something in order to do this?
thank you in advance!
Nik
change exported index.html to weekly instead of hourly
Moderators: Developers, Moderators
Re: change exported index.html to weekly instead of hourly
found a solution:
in lib/graph_export.php, search for /* settings for preview graphs */ around line 617. Below that you should see a call to @rrdtool_function_graph with 0 as second parameter. Change that to the right index in the rra table for the format you prefer. In my case this is 2 for weekly.
in lib/graph_export.php, search for /* settings for preview graphs */ around line 617. Below that you should see a call to @rrdtool_function_graph with 0 as second parameter. Change that to the right index in the rra table for the format you prefer. In my case this is 2 for weekly.
Code: Select all
/* settings for preview graphs */
$graph_data_array["graph_height"] = read_config_option("export_default_height");
$graph_data_array["graph_width"] = read_config_option("export_default_width");
$graph_data_array["graph_nolegend"] = true;
$graph_data_array["export"] = true;
$graph_data_array["export_filename"] = "graphs/thumb_" . $graph["local_graph_id"] . ".png";
export_log("Creating Graph '" . $cacti_export_path . $graph_data_array["export_filename"] . "'");
@rrdtool_function_graph($graph["local_graph_id"], 2, $graph_data_array, $rrdtool_pipe);
$total_graphs_created++;
Who is online
Users browsing this forum: No registered users and 3 guests