small patch to allow plugins to change the x-axis labels

Anything that you think should be in Cacti.

Moderators: Developers, Moderators

Post Reply
Dr.Oblivium
Posts: 2
Joined: Fri Dec 30, 2005 8:13 pm
Location: Belgium

small patch to allow plugins to change the x-axis labels

Post by Dr.Oblivium »

Hello,

I have attached a small patch that allows you to add the x_axis argument when calling the rrdtool_function_graph() function in plugins.

I myself use this to change the x-axis for "monthly" graphs from week numbers into day-of-month numbers.

I use it like this in a modified version of the reports plugin:

$graph_data_array = array("output_flag" => RRDTOOL_OUTPUT_STDOUT, 'graph_start' => $val['graph_start'], 'graph_end' => $val['graph_end'], "x_grid" => 'DAY:7:DAY:1:DAY:1:86400:%e' );

Documentation for the --x-grid parameter can be found in the rrdtool graph documentation: http://oss.oetiker.ch/rrdtool/doc/rrdgr ... tml#___top

This is a small and non-intrusive patch. So it would be nice if it could be included in a next release of cacti 0.8.7
Attachments
cacti-0.8.7e-x_grid.patch
patch for linux version of Cacti 0.8.7e
(569 Bytes) Downloaded 225 times
User avatar
Linegod
Developer
Posts: 1626
Joined: Thu Feb 20, 2003 10:16 am
Location: Canada
Contact:

Post by Linegod »

If you could post as a 'feature' at http://bugs.cacti.net , it's easier to assign to someone.

Post back with the bug #.
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
Dr.Oblivium
Posts: 2
Joined: Fri Dec 30, 2005 8:13 pm
Location: Belgium

Post by Dr.Oblivium »

I created feature request 0001536 for this.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest