[rrd-users] rrds::graph error

Kevin Calhoon krcalhoo at mtu.edu
Tue Sep 30 18:35:00 MEST 2003

Hi, I am trying to generate some graphs using the perl rrd component.  I
keep getting the same error and I haven't been able to figure out why.  I
have tried removing each option one at a time.  There is just something
that I am missing.  I am running this on redhat 7.3 with perl
5.6.1-34.99.6 and with RRDTool-0.17.  Here is the code segment that I am
 @FLAGS = ("--imgformat $IMAGEFORMAT",
                                      "--start -1hour",
                                      "--vertical-label \"$graphs[0]\"",
                                      "--lower-limit 0",
                                      "--upper-limit 1.0",
                                      "GPRINT:load1:LAST:\"%6.2lf last\",",
                                      "GPRINT:load1:AVERAGE:\"%6.2lf avg\",",
                                      "GPRINT:load1:MAX:\"%6.2lf max\",",
                                      "GPRINT:load5:LAST:\"%6.2lf last\",",
                                      "GPRINT:load5:AVERAGE:\"%6.2lf avg\",",
                                      "GPRINT:load5:MAX:\"%6.2lf max\",",
                                      "GPRINT:load15:LAST:\"%6.2lf last\",",
                                      "GPRINT:load15:MAX:\"%6.2lf max\",");
                            my $flags = join " ", @FLAGS;
                            foreach my $timerange (@range6)
                                print $query->p("Gif path = $GIFS_PATH,
node = " . $node->{'host_name'} . ",
db_file = $db_file, time = $timerange");
                                $file =
                                #RRDs::graph($file, '--imgformat',
$IMAGEFORMAT, '--start', $time, $flag,
$def, $plot, $legend);
                                #print $query->p(RRDs::error);
                                my ($averages,$xsize,$ysize) =
RRDs::graph($file, $flags);
                                print $query->p(RRDs::error);
                                print $query->p("File = $file");
                                print $query->p("PNGsize:
                                print $query->p("Averages: ", (join ", ",

My web page cgi will produce the folowwing output.

Gif path = /usr/local/nagios/share, node = node02, db_file = _loadavg,
time = -1hour

unknown option '--imgformat PNG --interlaced --start -1hour --lazy
--vertical-label "load average" --lower-limit 0 --upper-limit 1.0
LINE1:load1#0000FF:"1min avg", LINE1:load5#FF0000:"5min avg",
LINE1:load15#006400:"15min avg", GPRINT:load1:LAST:"%6.2lf last",
GPRINT:load1:AVERAGE:"%6.2lf avg", GPRINT:load1:MAX:"%6.2lf max",
GPRINT:load5:LAST:"%6.2lf last", GPRINT:load5:AVERAGE:"%6.2lf avg",
GPRINT:load5:MAX:"%6.2lf max", GPRINT:load15:LAST:"%6.2lf last",
GPRINT:load15:AVERAGE:"%6.2lf avg", GPRINT:load15:MAX:"%6.2lf max",'

File = /usr/local/nagios/share/node02_loadavg-1hour.png

PNGsize: {}x{}y
-here the script just stops, it is supposed to make multiple graphs for
which ever computers I select.
Thanks for any help.
Kevin Calhoon

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