Hi,
I had the same problem, bindgraph didn't create any images.
After calling the script with
http://www.example.com/cgi-bin/bindgraph.cgi/bindgraph_1.png I received
the error
ERROR:
RRDs::graph(/var/cache/bindgraph/,cgi-bin,bindgraph.cgi/bindgraph_1.png.tmp,
...): Garbage ': Fri Sep 28 19:38:00 2007 graph created on Fri Sep 28
19:45:53 2007\r' after command:
COMMENT:last update: Fri Sep 28 19:38:00 2007 graph created on Fri
Sep 28 19:45:53 2007\r"
Asking google showed that rrdtool 1.2 doesn't like lines #109 and #110
containing the "COMMENT" parameter as they do contain colons.
After commenting out the lines the graphs were finally created.
I changed bindgraph.cgi to correctly include the comments again (see
attached patch).
The patch works for me but may not work for everybody.
Installed packages:
* bindgraph 0.2-5
* rrdtool 1.2.15-0.3
System: 4.0/stable
Regards,
Juergen
--- /usr/lib/cgi-bin/bindgraph.cgi.orig 2006-05-11 01:57:22.000000000 +0200
+++ /usr/lib/cgi-bin/bindgraph.cgi 2007-09-28 20:49:56.000000000 +0200
@@ -93,6 +93,10 @@
}
}
+ my $last_update = localtime(last_update($rrd));
+ my $localtime = localtime(time);
+ $last_update =~ s/:/\\:/g;
+ $localtime =~ s/:/\\:/g;
my ($text, $xs, $ys) = RRDs::graph(
$file,
'--imgformat', 'PNG',
@@ -106,8 +110,8 @@
@rrdef,
@rrprint,
'COMMENT:\s',
- 'COMMENT:last update: ' . localtime(last_update($rrd))
- . ' graph created on ' . localtime(time) . '\r',
+ 'COMMENT:last update\\: ' . $last_update
+ . ' graph created on ' . $localtime . '\r',
);
my $err = RRDs::error;
die_fatal("RRDs::graph($file, ...): $err") if $err;