[rrd-users] find out the current scale (output from autoscaler)
Karl Fischer
rrd-users at ficos.de
Thu Jan 8 19:01:59 CET 2009
A Darren Dunham wrote:
> On Thu, Jan 08, 2009 at 09:45:17AM +0100, Karl Fischer wrote:
>> Is there a way to find out what the current (y) scale is?
>
> Not "within" the graph function that I'm aware of.
>
>> I'm trying to display some values only if they fit the current scale but
>> I don't want these values to extend the current scale.
>> For example when watching disk usage I'd like to show a line for disk
>> capacity when (and only when) disk usage gets near the disk capacity.
>> But I don't want the scale to be extended to - lets say 100G - when only
>> 1.83 GB is used ...
>
> You could just draw the line via HRULE. If the line is above the top of
> the graph that is otherwise calculated, it just won't be shown.
yeah, I'm aware of HRULE, but I have more complex scenarios than what I used
in the example, so the value that shouldn't be graphed when it is out of scale
does come from DEF/CDEF and isn't a horizontal line - it's data ...
>> So what I've tried so far is:
>>
>> CDEF:my_scale=df_used,MAX,1.2,*
>> CDEF:my_total=df_total,0,my_scale,LIMIT
>
> I think that's the way I'd prefer to do it (or HRULE as appropriate).
>
>> So I'm 'guessing' the current scale is about 20% higher than the
>> highest value. But it would be much nicer to get the values from the
>> autoscaler ... Any way?
>
> What version are you running? I haven't used it, but this seems like a
> use for 'graphv' and then look at 'value_max' in the output.
rrdtool 1.2.28
I have thought about creating another graph and/or analyzing the data outside
of rrdgrpah, but that's quite complicated and I don't like that approach ...
I only what to know the scale the autoscaler has chosen to use *wine*
:-(
> But that would require to you make one graph just for the output, then
> make another one if you wanted to add your line to it. Not the most
> elegant, but it is a technique I use in some of my graphs.
thanks anyway ...
- Karl
More information about the rrd-users
mailing list