updating rrd file with ping min, max and avg times in milliseconds

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

updating rrd file with ping min, max and avg times in milliseconds

Devante
Hello,

I am trying to update an rrd file I created. Basically I am grabbing the min, max and average response times from a server. I created the rrd file using the following parameters:

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

I am trying to update it but having problems getting the following error:

"ERROR: latency.rrd: found extra data on update argument: 0.40:0.88:0.73"

I am typing the following to update the rrd file:

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? 

Any help would be greatly appreciated.

thank you,

Devante

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply | Threaded
Open this post in threaded view
|

Re: updating rrd file with ping min, max and avg times in milliseconds

Jason Gauthier

>Hello,

 

>I am trying to update an rrd file I created. Basically I am grabbing the min, max and average response times from a server. I created the rrd file using the following parameters:

 

>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

 

>I am trying to update it but having problems getting the following error:

 

>"ERROR: latency.rrd: found extra data on update argument: 0.40:0.88:0.73"

 

>I am typing the following to update the rrd file:

 

>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.

 


_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply | Threaded
Open this post in threaded view
|

Re: updating rrd file with ping min, max and avg times in milliseconds

Simon Hobson
In reply to this post by Devante
Devante Vargas <[hidden email]> wrote:

> I created the rrd file using the following parameters:
>
> 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
>
> I am trying to update it but having problems getting the following error:
>
> "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.

> I am typing the following to update the rrd file:
>
> 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
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply | Threaded
Open this post in threaded view
|

Re: updating rrd file with ping min, max and avg times in milliseconds

Devante
Thank you I got it now :) appreciate the help.

On Mon, Aug 10, 2015 at 2:20 PM, Simon Hobson <[hidden email]> wrote:
Devante Vargas <[hidden email]> wrote:

> I created the rrd file using the following parameters:
>
> 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
>
> I am trying to update it but having problems getting the following error:
>
> "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.

> I am typing the following to update the rrd file:
>
> 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
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users


_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply | Threaded
Open this post in threaded view
|

color issue

martin-2
In reply to this post by Simon Hobson
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
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply | Threaded
Open this post in threaded view
|

Re: color issue

Petteri Matilainen
On 13.8.2015 20:43, Martin wrote:

> 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
> [hidden email]
> 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
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply | Threaded
Open this post in threaded view
|

Re: color issue

martin-2
Yes i tested both those option it generates the same error


problem generating the graph: unknown option '--color CANVAS#000000'

Petteri Matilainen skrev den 2015-08-13 19:48:
On 13.8.2015 20:43, Martin wrote:
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
[hidden email]
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
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users

--
Best Regards Martin
MF SweTech
Phone +46 (0)701061891
Email [hidden email]
site www.swetech.se

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply | Threaded
Open this post in threaded view
|

Re: color issue

martin-2
Solved.
For future ref the correct way is

"--color=CANVAS#000000",


Martin skrev den 2015-08-13 19:51:
Yes i tested both those option it generates the same error


problem generating the graph: unknown option '--color CANVAS#000000'

Petteri Matilainen skrev den 2015-08-13 19:48:
On 13.8.2015 20:43, Martin wrote:
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
[hidden email]
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
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users

--
Best Regards Martin
MF SweTech
Phone +46 (0)701061891
Email [hidden email]
site www.swetech.se


_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users

--
Best Regards Martin
MF SweTech
Phone +46 (0)701061891
Email [hidden email]
site www.swetech.se

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply | Threaded
Open this post in threaded view
|

Re: color issue

oetiker
Administrator
In reply to this post by Petteri Matilainen
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


two ways you can write this:


Yesterday Petteri Matilainen wrote:

> On 13.8.2015 20:43, Martin wrote:
> > 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
> > [hidden email]
> > 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
> [hidden email]
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
>
>
--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
www.oetiker.ch [hidden email] +41 62 775 9902

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users