New RRDTOOL option "--showtime" in XPORT operations

Anything that you think should be in Cacti.

Moderators: Developers, Moderators

Post Reply
bdiez
Posts: 15
Joined: Thu Sep 08, 2005 8:09 am
Location: Spain

New RRDTOOL option "--showtime" in XPORT operations

Post by bdiez »

Hello.

It seems in modern versions of RRDTOOL, specifically in 1.6.0, the original behavior to include the timestamp in each line when executing a XPORT does not work anymore, and that you need to include in the function call the option "--showtime" to get it back again.

To solve this a fast and dirty solution may be to add in the lib/rrd.php file the following three lines marked with ==> (after line 1249 based on the as per today development version on Github):

Code: Select all

		 /* +++++++++++++++++++++++ GRAPH OPTIONS +++++++++++++++++++++++ */

		 if (!isset($graph_data_array['export_csv'])) {
		 		 $graph_opts = rrd_function_process_graph_options($graph_start, $graph_end, $graph, $graph_data_array);
		 }else{
		 		 /* basic export options */
		 		 $graph_opts =
		 		 		 '--start=' . cacti_escapeshellarg($graph_start) . RRD_NL .
		 		 		 '--end=' . cacti_escapeshellarg($graph_end) . RRD_NL .
		 		 		 '--maxrows=10000' . RRD_NL;
==>			if (read_config_option("rrdtool_version") == "rrd-1.6.x") {
==>				$graph_opts .= "--showtime" . RRD_NL;
==>			}
		}
Could you please consider this??

Many thanks and best regards.
User avatar
Osiris
Cacti Guru User
Posts: 1424
Joined: Mon Jan 05, 2015 10:10 am

Re: New RRDTOOL option "--showtime" in XPORT operations

Post by Osiris »

Please create a pull request on GitHub.
Before history, there was a paradise, now dust.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest