Handling VDEFs outside rrdtools

4 messages Options
Embed this post
Permalink
Fredrik Hansen

Handling VDEFs outside rrdtools

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

Hi,

Im using rrdtools to extrapolate and calculate trends for disk full prediction and the calc works as expected.

I get nice graphs showing which date a certain disk is predicted to be at a certain usage level.

Since the amount of rrd’s is quite a lot ( around 2100 ),

I need a smoother way to only get results/reports for the drives which have a full disk forecast in the near future. But that implies to have the calculated data scriptable, and I’m wondering if there is a way to run the calculations (LSL-based) and use the results external to rrdtool?

One way could be to store the calculations in another rrd-file and then dump the contents from that to a handy script ?

Another way possible is maybe to directly extract the values from the calculation and output to a script which could create an email alert or something like that.

I’m out of ideas on how to proceed, ie to get data in a VDEF sent outside rrdtools world.

Tips, ideas or rtfm hints are highly appreciated. J

 

Brgrds,

Fredrik Hansen

 


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

Re: Handling VDEFs outside rrdtools

Reply Threaded More More options
Print post
Permalink
Hi,

Am 26.10.2009 10:24, schrieb Fredrik Hansen:

>
> Hi,
>
> Im using rrdtools to extrapolate and calculate trends for disk full
> prediction and the calc works as expected.
>
> I get nice graphs showing which date a certain disk is predicted to be
> at a certain usage level.
>
> Since the amount of rrd’s is quite a lot ( around 2100 ),
>
> I need a smoother way to only get results/reports for the drives which
> have a full disk forecast in the near future. But that implies to have
> the calculated data scriptable, and I’m wondering if there is a way to
> run the calculations (LSL-based) and use the results external to rrdtool?
>
> One way could be to store the calculations in another rrd-file and
> then dump the contents from that to a handy script ?
>
> Another way possible is maybe to directly extract the values from the
> calculation and output to a script which could create an email alert
> or something like that.
>
> I’m out of ideas on how to proceed, ie to get data in a VDEF sent
> outside rrdtools world.
>
> Tips, ideas or rtfm hints are highly appreciated. J
>
> Brgrds,
>
> Fredrik Hansen
>
>
There are two more or less easily scriptable ways to do this: The first
would be using the PRINT instruction of the graph command of rrdtool to
print out the information you need. Another way might be the rrd_fetch
command or using the API of rrdtool.

Tee other way to go would be doing the calculations based on the
rrd_fetch command yourself, but why bother to do them if the first way
usually already should provide them?

Regards,
BenBE.



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

signature.asc (850 bytes) Download Attachment
Fredrik Hansen

Re: Handling VDEFs outside rrdtools

Reply Threaded More More options
Print post
Permalink
Hi Benny,
I've tried Ben's suggestion earlier and used the PRINT function.
It's working great - right now I'm trying to understand how to do PRINT based on CDEFs as well as VDEFs.
(Ie printing out "Disk XYZ is projected to be <X>% full on <date> and reaches critical <Y>% on <date>".)
Since different projection times gives different results, next step will also be to correlate these different dates/value pair to get a 'best-guess' result.
I'm quite sure it is only my limited brain capacity that stops me from getting this fully working today. :-)
I'll put the script online somewhere if anyone else could benefit from it.
Thanks for the input,
Brgrds,
Fredrik

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Benny Baumann
Sent: den 26 oktober 2009 15:35
To: [hidden email]
Subject: Re: [rrd-users] Handling VDEFs outside rrdtools

Hi,

Am 26.10.2009 10:24, schrieb Fredrik Hansen:

>
> Hi,
>
> Im using rrdtools to extrapolate and calculate trends for disk full
> prediction and the calc works as expected.
>
> I get nice graphs showing which date a certain disk is predicted to be
> at a certain usage level.
>
> Since the amount of rrd's is quite a lot ( around 2100 ),
>
> I need a smoother way to only get results/reports for the drives which
> have a full disk forecast in the near future. But that implies to have
> the calculated data scriptable, and I'm wondering if there is a way to
> run the calculations (LSL-based) and use the results external to rrdtool?
>
> One way could be to store the calculations in another rrd-file and
> then dump the contents from that to a handy script ?
>
> Another way possible is maybe to directly extract the values from the
> calculation and output to a script which could create an email alert
> or something like that.
>
> I'm out of ideas on how to proceed, ie to get data in a VDEF sent
> outside rrdtools world.
>
> Tips, ideas or rtfm hints are highly appreciated. J
>
> Brgrds,
>
> Fredrik Hansen
>
>
There are two more or less easily scriptable ways to do this: The first would be using the PRINT instruction of the graph command of rrdtool to print out the information you need. Another way might be the rrd_fetch command or using the API of rrdtool.

Tee other way to go would be doing the calculations based on the rrd_fetch command yourself, but why bother to do them if the first way usually already should provide them?

Regards,
BenBE.

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

Re: Handling VDEFs outside rrdtools

Reply Threaded More More options
Print post
Permalink
In reply to this post by Fredrik Hansen
Hi Fredrik,

Today Fredrik Hansen wrote:

> Hi,
> Im using rrdtools to extrapolate and calculate trends for disk full prediction and the calc works as expected.
> I get nice graphs showing which date a certain disk is predicted to be at a certain usage level.
> Since the amount of rrd's is quite a lot ( around 2100 ),
> I need a smoother way to only get results/reports for the drives which have a full disk forecast in the near future. But that implies to have the calculated data scriptable, and I'm wondering if there is a way to run the calculations (LSL-based) and use the results external to rrdtool?
> One way could be to store the calculations in another rrd-file and then dump the contents from that to a handy script ?
> Another way possible is maybe to directly extract the values from the calculation and output to a script which could create an email alert or something like that.
> I'm out of ideas on how to proceed, ie to get data in a VDEF sent outside rrdtools world.
> Tips, ideas or rtfm hints are highly appreciated. :)

you can use PRINT to get VDEF results back out ...

cheers
tobi


--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch [hidden email] ++41 62 775 9902 / sb: -9900

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