[rrd-users] rrdcgi and SETVAR
Stefan M. Brandl
smb at r-kom.de
Mon Oct 12 11:33:43 CEST 2009
Hi there,
I've done the following simple rrdcgi-script:
--------8<--------8<--------8<--------8<--------8<--------8<--------8<--------
#!/opt/rrdtool/bin/rrdcgi
<HTML>
<BODY>
<RRD::GRAPH
ip.png
--imginfo '<IMG SRC=%s WIDTH=%lu HEIGHT=%lu >'
DEF:ip=ip.rrd:ip:LAST
AREA:ip#003366:IP
>
</BODY>
</HTML>
--------8<--------8<--------8<--------8<--------8<--------8<--------8<--------
This works so far.
But if I do this:
--------8<--------8<--------8<--------8<--------8<--------8<--------8<--------
#!/opt/rrdtool/bin/rrdcgi
<HTML>
<BODY>
<RRD::SETVAR bla "DEF:ip=ip.rrd:ip:LAST AREA:ip#003366:IP">
<RRD::GRAPH
ip.png
--imginfo '<IMG SRC=%s WIDTH=%lu HEIGHT=%lu >'
<RRD::GETVAR bla>
>
</BODY>
</HTML>
--------8<--------8<--------8<--------8<--------8<--------8<--------8<--------
I get the error:
[ERROR: Cannot parse CF in 'DEF:weltv4=ip.rrd:ip:LAST AREA:ip#003366:IP']
All I want to do is to put
DEF:ip=ip.rrd:ip:LAST
AREA:ip#003366:IP
in a variable und read it.
Is this possible (rrdtool version is 1.2.30)?
Stefan
More information about the rrd-users
mailing list