[rrd-users] find out the current scale (output from autoscaler)

A Darren Dunham ddunham at taos.com
Thu Jan 8 18:33:50 CET 2009


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.

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

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.

-- 
Darren



More information about the rrd-users mailing list