Discussion:
[rrd-users] updating rrd file with ping min, max and avg times in milliseconds
(too old to reply)
Jason Gauthier
2015-08-10 16:58:15 UTC
Permalink
Hello,
rrdtool.exe create latency.rrd
--start now
DS:response:GAUGE:600:U:U
RRA:MIN:0.5:12:8760
RRA:MAX:0.5:12:8760
RRA:AVERAGE:0.5:12:8760
"ERROR: latency.rrd: found extra data on update argument: 0.40:0.88:0.73"
rrdtool update latency.rrd 08/10/2015_11:33:0.40:0.88:0.73
0.40 = Minimum
0.88 = Maximum
0.73 = Average
Is it the decimal point its having issues with?
It’s the colons in your time. Send epoch, or “N” for now, and remove the date/time stamp.
Simon Hobson
2015-08-10 19:20:58 UTC
Permalink
rrdtool.exe create latency.rrd
--start now
DS:response:GAUGE:600:U:U
RRA:MIN:0.5:12:8760
RRA:MAX:0.5:12:8760
RRA:AVERAGE:0.5:12:8760
"ERROR: latency.rrd: found extra data on update argument: 0.40:0.88:0.73"
That's because you are offering 3 values to an RRD that's configured to take only one.
rrdtool update latency.rrd 08/10/2015_11:33:0.40:0.88:0.73
0.40 = Minimum
0.88 = Maximum
0.73 = Average
It doesn't work like that. If you want to record the min/avg/max values from a ping then you need to define THREE DSs, eg response_min, response_avg, response_max
You can then define your RRAs as required. You cannot be selective about this, so you will end up with all 9 permutations of min of min, min of avg, min of max, avg of min, ... Only three of these (min of min, avg of avg, max of max) are actually useful.
Devante Vargas
2015-08-11 17:48:25 UTC
Permalink
Thank you I got it now :) appreciate the help.
Post by Simon Hobson
rrdtool.exe create latency.rrd
--start now
DS:response:GAUGE:600:U:U
RRA:MIN:0.5:12:8760
RRA:MAX:0.5:12:8760
RRA:AVERAGE:0.5:12:8760
"ERROR: latency.rrd: found extra data on update argument: 0.40:0.88:0.73"
That's because you are offering 3 values to an RRD that's configured to
take only one.
rrdtool update latency.rrd 08/10/2015_11:33:0.40:0.88:0.73
0.40 = Minimum
0.88 = Maximum
0.73 = Average
It doesn't work like that. If you want to record the min/avg/max values
from a ping then you need to define THREE DSs, eg response_min,
response_avg, response_max
You can then define your RRAs as required. You cannot be selective about
this, so you will end up with all 9 permutations of min of min, min of avg,
min of max, avg of min, ... Only three of these (min of min, avg of avg,
max of max) are actually useful.
_______________________________________________
rrd-users mailing list
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Martin
2015-08-13 17:43:24 UTC
Permalink
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"
Petteri Matilainen
2015-08-13 17:48:35 UTC
Permalink
Post by Martin
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"
_______________________________________________
rrd-users mailing list
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Hi,

I believe you have to use -c CANVAS#000000, or --color CANVAS#000000.
Same goes for the other color definitions too.

regards,

PM
Martin
2015-08-13 17:51:49 UTC
Permalink
Yes i tested both those option it generates the same error


problem generating the graph: unknown option '--color CANVAS#000000'
Post by Petteri Matilainen
Post by Martin
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"
_______________________________________________
rrd-users mailing list
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Hi,
I believe you have to use -c CANVAS#000000, or --color CANVAS#000000.
Same goes for the other color definitions too.
regards,
PM
_______________________________________________
rrd-users mailing list
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
--
*Best Regards Martin*
*MF SweTech*
Phone +46 (0)701061891
Email ***@swetech.se
site www.swetech.se
Martin
2015-08-13 19:36:11 UTC
Permalink
Solved.
For future ref the correct way is

"--color=CANVAS#000000",
Post by Martin
Yes i tested both those option it generates the same error
problem generating the graph: unknown option '--color CANVAS#000000'
Post by Petteri Matilainen
Post by Martin
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"
_______________________________________________
rrd-users mailing list
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Hi,
I believe you have to use -c CANVAS#000000, or --color CANVAS#000000.
Same goes for the other color definitions too.
regards,
PM
_______________________________________________
rrd-users mailing list
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
--
*Best Regards Martin*
*MF SweTech*
Phone +46 (0)701061891
site www.swetech.se
_______________________________________________
rrd-users mailing list
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
--
*Best Regards Martin*
*MF SweTech*
Phone +46 (0)701061891
Email ***@swetech.se
site www.swetech.se
Tobias Oetiker
2015-08-14 06:30:31 UTC
Permalink
Hi Petteri,

there are several valid ways to write this ...

"-c","CANVAS#000000"

"--color","CANVAS#000000"

"--color=CANVAS#000000"

this is not rrdtool specific, but they way argument parsing on unix
works in general ...

cheers
tobi
Post by Martin
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"
_______________________________________________
rrd-users mailing list
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Hi,
I believe you have to use -c CANVAS#000000, or --color CANVAS#000000. Same
goes for the other color definitions too.
regards,
PM
_______________________________________________
rrd-users mailing list
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
www.oetiker.ch ***@oetiker.ch +41 62 775 9902
Loading...