New RRDTOOL option "--showtime" in XPORT operations

Anything that you think should be in Cacti.

Moderators: Moderators, Developers

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

New RRDTOOL option "--showtime" in XPORT operations

#1 Post by bdiez » Tue Jul 12, 2016 1:58 pm


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);
		 		 /* 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
Cacti Pro User
Posts: 863
Joined: Mon Jan 05, 2015 10:10 am

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

#2 Post by Osiris » Tue Feb 07, 2017 9:54 pm

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

Post Reply