[rrd-users] Re: IMAGE for RRDTOOL

Leigh Sharpe lsharpe at pacificwireless.com.au
Mon Nov 11 00:51:36 MET 2002


I recommend using RRDCGI.
Have a look here:
http://www.rrdtool.com/rrdcgi.html



Regards,
             Leigh

Leigh Sharpe
Network Systems Engineer
Pacific Wireless
Ph 9584 8966
Mob 0408 009 502
email lsharpe at pacificwireless.com.au
web www.pacificwireless.com.au

----- Original Message -----
From: "Edgardo Mina" <edgardo at staff.singnet.com.sg>
To: <rrd-users at list.ee.ethz.ch>
Sent: Thursday, November 07, 2002 7:18 PM
Subject: [rrd-users] IMAGE for RRDTOOL


>
>
> Hi RRD Gurus,
>
> i am new to rrdtool, and i am trying to create a perl/cgi script that will
> output graph on the ply of the rrd file but i am getting an error, i am
> using a solaris 8 and my script is like this :
>
> #!/usr/bin/perl
> use CGI;
> $query = new CGI;
> require "/data/home/stix/bin/config.inc";
> @array = split (/&/,$ENV{'QUERY_STRING'});
> for $array (@array)
> {
>   $array =~ tr/+/ /;
>   ($name,$value) = split (/=/,$array);
>   $name =~ s/%([\dA-Fa-f]{2})/pack("C",hex($1))/ge;
>   $value =~ s/%([\dA-Fa-f]{2})/pack("C",hex($1))/ge;
>   $form{$name} = $value;
>   $ipaddress = $form{ipaddress};
> }
> $ipaddress = "202.160.250.34";
> print $query->header(-type=>'image/png');
> system ("rrdtool graph - --start=-86400 --title='AboveNet' \\
> --height=135 --width=500 --vertical-label='Round Trip
Time' --imgformat=PNG \\
> DEF:min='$rradir/$ipaddress.rrd':min:AVERAGE \\
> DEF:ave='$rradir/$ipaddress.rrd':ave:AVERAGE \\
> DEF:max='$rradir/$ipaddress.rrd':max:AVERAGE \\
> AREA:ave#00FF00:'Average' \\
> GPRINT:ave:LAST:' \\:%8.2lf msec %s' \\
> LINE1:min#FF0000:'Minimum' \\
> GPRINT:min:LAST:' \\:%8.2lf msec %s' \\
> LINE1:max#0000FF:'Maximum' \\
> GPRINT:max:LAST:' \\:%8.2lf msec %s'");
>
>
>
> am i doing something wrong the error message by the way was this
> malformed header from script. Bad header=?PNG:
> /data/home/stix/web//scripts/graph.cgi
> extracted from error_logs of apache
>
>
> hoping from someone to response
> thanks and regards,
> edgardo
>
> --
> 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://www.ee.ethz.ch/~slist/rrd-users
> WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi
>

--
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://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-users mailing list