> I have a strange problem with the 0.8.3-rc1 version.
Ok, find it.
In the file "engine/graphs/traffic.inc.php", the function "graph_traffic"
returns three values. The second is an array of options for rrdtool (that
is later put into the variable "$graph_definition" in the function
"rrd_grapher").
If the variable "$flip_legend" is false in the function "graph_traffic",
there will an empty string into the array :
(isset($flip_legend)?"COMMENT:'$flip_legend'":""),
And rrdtool doesn't like this. I don't know why it seems I am the only
that have this problem. Perhaps because of the version of my rrdtool ? But
I use the standard Debian packages. Any Debian user here ?
xxx:~# dpkg -l |grep rrdtool
ii php4-rrdtool 1.04-11 RRD module for php4
ii rrdtool 1.0.49-1 Time-series data storage and display system
I have made this change to "engine/graphs/traffic.inc.php" and all works
now fine :
xxx:~/jffnms-0.8.3-rc1# diff engine/graphs/traffic.inc.php
/opt/jffnms/engine/graphs/traffic.inc.php
62,65c62,65
< "GPRINT:outputbits:LAST:'Last\:%8.2lf %sbps\\n'",
< //"GPRINT:total_outputbits:LAST:'Total\:%10.2lf %sb\\n'",
< (isset($flip_legend)?"COMMENT:'$flip_legend'":""),
< ),$opts_GRAPH_end);
---
> "GPRINT:outputbits:LAST:'Last\:%8.2lf %sbps\\n'"));
> //"GPRINT:total_outputbits:LAST:'Total\:%10.2lf %sb\\n'");
>
> if( isset( $flip_legend )) @array_push( $opts_GRAPH,
"COMMENT:'$flip_legend'" );
69c69
< return array ($opts_header, @array_merge($opts_DEF,$opts_GRAPH),
$data_points);
---
> return array ($opts_header,
@array_merge($opts_DEF,$opts_GRAPH,$opts_GRAPH_end), $data_points);
I have also find a typo in "lib/api.rrdtool.inc.php", line 223 :
if (is_array($graph_defintion))
foreach ($graph_definition as $k=>$v)
if (strpos($v, "COMMENT")!==false) //RRDTool 1.2.x needs the :
(colons) inside COMMENTs to be escaped with \ as \:
$graph_definition[$k] = substr($v, 0, strpos($v, ":")+1).
str_replace(":","\:",substr($v, strpos($v, ":")+1));
}
You see the typo on the first line ?
That's why Fox!MURDER had to post a patch about colons not escaped...
Oh, by the way, the site http://www.phpxref.com/xref/jffnms/ was very,
very helpful.
--
Sébastien Namèche
Société Netensia
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
jffnms-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jffnms-users