[rrd-users] can rrdcgi generate just a image? (no html)

Jo Rhett jrhett at svcolo.com
Wed Jul 19 07:34:33 MEST 2006


We're heavily using RRD here.  I'm quite used to the normal syntax.  Yes,
I've read the faq.  I've also submitted patches to bugs. Humor me.

Okay, so I need to have an external web site reference an image created by
RRD.  But just the image.  In short
	<img src="http://my.rrd.server/path/show-me.cgi

Based on my reading of the manpage, I want the output to standard out.
This actually works properly like so:

#!/usr/local/bin/rrdcgi
<RRD::GRAPH -
--start -8h --end -1
--lower-limit 0 --height 80 --width 100 --no-legend
-c SHADEA#ffffff -c SHADEB#ffffff
DEF:ds0=/rrd/show-me.rrd:ds0:AVERAGE
AREA:ds0#00ff00:""
>

So what's the problem?  No headers.  It outputs PNG format immediately, and
the web server barfs:

[Tue Jul 18 16:03:14 2006] [error] [client 64.13.135.30] malformed header
from script. Bad header=\x89PNG:

How can I made this output image/png content type and then the image?

Right now I'm working around it by making it a normal html page with
nothing else in it and loading that in an <iframe..> element on the source
page, but this is fairly non-optimal.

No, I can't combine them.  Most of the data on the page is database
generated and unavailable to the RRD server.  Source server and RRD server
aren't even in the same counties.

-- 
Jo Rhett
senior geek
SVcolo : Silicon Valley Colocation

--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi



More information about the rrd-users mailing list