[rrd-users] Handling VDEFs outside rrdtools

Fredrik Hansen Fredrik.Hansen at qbranch.se
Mon Oct 26 16:20:00 CET 2009


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: rrd-users-bounces at lists.oetiker.ch [mailto:rrd-users-bounces at lists.oetiker.ch] On Behalf Of Benny Baumann
Sent: den 26 oktober 2009 15:35
To: rrd-users at lists.oetiker.ch
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.



More information about the rrd-users mailing list