[rrd-users] color issue

Martin martin at swetech.se
Thu Aug 13 19:43:24 CEST 2015


Hello could someone tell me why i get this error from the perl script below?

ERROR: problem generating the graph: unknown option '--c CANVAS#000000'
Done!



#!/usr/bin/perl

use RRDs;

my $cur_time = time();
my $start_time = $cur_time - 86400;     # set end time to 24 hours ago

RRDs::graph "/var/www/ta/ta_temp.png",
                         "--start= $start_time",
                         "--end= $cur_time",
                         "--title= Temperatur givare på Casa de Padda",
                         "--height= 300",
                         "--width= 500",
                         "--vertical-label= °C",
                         "--c CANVAS#000000",
                         "--c BACK#000000",
                         "--c FONT#FFFFFF",
"DEF:TerrariumLeft=/home/pi/rrddata/TA_temp.rrd:TerrarieV:AVERAGE",
                         "COMMENT:\t\t\t\t\tNu     Medel    Max Min\\n",
                         "HRULE:0#0000FF",
                         "LINE2:TerrariumLeft#FFFF00:Terrarium Vänster\t\t",
                         "GPRINT:TerrariumLeft:LAST:%6.1lf",
                         "GPRINT:TerrariumLeft:AVERAGE:%6.1lf",
                         "GPRINT:TerrariumLeft:MAX:%6.1lf",
                         "GPRINT:TerrariumLeft:MIN:%6.1lf\\n",
"DEF:TerrariumRight=/home/pi/rrddata/TA_temp.rrd:TerrarieH:AVERAGE",
                         "COMMENT:\t\t\t\t\tNu     Medel    Max Min\\n",
                         "HRULE:0#0000FF",
                         "LINE2:TerrariumRight#e65243:Terrarium Höger\t\t",
                         "GPRINT:TerrariumRight:LAST:%6.1lf",
                         "GPRINT:TerrariumRight:AVERAGE:%6.1lf",
                         "GPRINT:TerrariumRight:MAX:%6.1lf",
                         "GPRINT:TerrariumRight:MIN:%6.1lf\\n",
"DEF:Akvarium=/home/pi/rrddata/TA_temp.rrd:Akvarie:AVERAGE",
                         "COMMENT:\t\t\t\t\tNu     Medel    Max Min\\n",
                         "HRULE:0#0000FF",
                         "AREA:Akvarium#0000FF80:Akvarium\t\t\t",
                         "GPRINT:Akvarium:LAST:%6.1lf",
                         "GPRINT:Akvarium:AVERAGE:%6.1lf",
                         "GPRINT:Akvarium:MAX:%6.1lf",
                         "GPRINT:Akvarium:MIN:%6.1lf\\n";

my $err=RRDs::error;
if ($err) {print "problem generating the graph: $err\n";}

print "Done!\n"



More information about the rrd-users mailing list