Gday folks.
I have been looking at the 'trunk' version of rrdtool where some differences exist in the parsing of 'graph' commands.
The attached patch prevents 'Unused Arguments' when rrdtool graph is called with 'empty' argument bits.
I assume I have probably 'missed' some bits, and I understand this doesn't impact Observium users yet with currently released Ubuntu rrdtools packages, but I assume at some stage it will impact, and it might be good to 'miss' that impact ?
Cheers, Peter
Seems interesting, but can you explain a bit more how this works?
Thank you
Sent from my iPhone
On Aug 5, 2013, at 3:05, "Peter Childs" <pchilds@staff.iinet.net.aumailto:pchilds@staff.iinet.net.au> wrote:
Gday folks.
I have been looking at the 'trunk' version of rrdtool where some differences exist in the parsing of 'graph' commands.
The attached patch prevents 'Unused Arguments' when rrdtool graph is called with 'empty' argument bits.
I assume I have probably 'missed' some bits, and I understand this doesn't impact Observium users yet with currently released Ubuntu rrdtools packages, but I assume at some stage it will impact, and it might be good to 'miss' that impact ?
Cheers, Peter
<generic_multi_seperated.inc.php.patch> _______________________________________________ observium mailing list observium@observium.orgmailto:observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
The patch is probably premature. I'm having a discussion on the rrdtool-development mailing list about 'backwards compatibility'.
It appears the argument parsing code is all new in 'trunk' and needs some additional settling.
From my attempts to use it there are various definitions of graph logic that work with current rrdtool releases, but do not really conform to the usage spec.
For example if (is_numeric($sensor['sensor_limit'])) $rrd_options .= " HRULE:".$sensor['sensor_limit']."#999999::dashes";
Reference - http://oss.oetiker.ch/rrdtool/doc/rrdgraph_graph.en.html#GRAPH
Syntax HRULE:value#color[:legend][:dashes[=on_s[,off_s[,on_s,off_s]...]][:dash-offset=offset]]
So just because we don't have a :legend means that we should probably not have an empty "::dashes" (ie should be #999999:dashes)
In other cases such as $rrd_options .= " AREA:inbits".$i."#" . $colour_in . ":'" . rrdtool_escape($rrd['descr'], 10) . "In ':$stack";
AREA:value[#color][:[legend][:STACK][:skipscale]]
If "$stack" is empty we should not have a trailing ":" on the AREA — this may be as simple as defining $stack as ":STACK" rather than "STACK" and appending without the colon.
From: Ryan Milton - MVS USA <RMilton@mvsusa.commailto:RMilton@mvsusa.com> Reply-To: Observium <observium@observium.orgmailto:observium@observium.org> Date: Monday, 5 August 2013 9:54 PM To: Observium <observium@observium.orgmailto:observium@observium.org> Subject: Re: [Observium] patch for rrdtool syntax
Seems interesting, but can you explain a bit more how this works?
Thank you
Sent from my iPhone
On Aug 5, 2013, at 3:05, "Peter Childs" <pchilds@staff.iinet.net.aumailto:pchilds@staff.iinet.net.au> wrote:
Gday folks.
I have been looking at the 'trunk' version of rrdtool where some differences exist in the parsing of 'graph' commands.
The attached patch prevents 'Unused Arguments' when rrdtool graph is called with 'empty' argument bits.
I assume I have probably 'missed' some bits, and I understand this doesn't impact Observium users yet with currently released Ubuntu rrdtools packages, but I assume at some stage it will impact, and it might be good to 'miss' that impact ?
Cheers, Peter
<generic_multi_seperated.inc.php.patch> _______________________________________________ observium mailing list observium@observium.orgmailto:observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
participants (2)
-
Peter Childs
-
Ryan Milton - MVS USA