[rrd-users] Value of upper-limit when autoscaling

Thorsten Niederkrome dralli at gmx.net
Tue Mar 4 10:08:29 MET 2003


Hello RRD-Users,

does anyone know how to get the value of the graph's upper-limit when
rrdtool scales the automatically?

My problem is as follows (I hope it's not too detailed...):

I'm monitoring some uninterruptable power sources. The values I get from the
devices are voltage in, temperature and some other which are not of interest
here. Voltage in is around 230 [V] here in Germany, and during an power
outage it's 0 [V]. The temperature is around 30 [°C].

I'm generating two graphs, one with the voltage and one with the
temperature. The graph for the temperature has a lower limit of about 25, and an upper
limit of about 35, which is ok for me. The graph for the voltage has normally
an lower limit of 220 and an upper limit of 240, during an outage the lower
limit may vary (due to some short outages and the CF "AVERAGE" it doesn't need
to be zero).

What I want to do is mark the times when an outage occurs. I've defined a
CDEF like this:

DEF:vin=/var/rrd/usv.rrd:vin:AVERAGE
DEF:vinmin=/var/rrd/usv.rrd:vin:MIN
CDEF:outage=vinmin,115,LT,250,UNKN,IF

The DEF "vin" holds the average voltage over a period of time, the DEF
"vinmin" is the minium voltage over a period of time (if there's an outage, this
one is zero). The "outage" CDEF checks if "vinmin" is less than 115, if not
the value UNKNOWN is returned, but if vinmin is lower than 115, the value 250
is returned.

With the commands

AREA:outage#FF6666
LINE2:vin#009900

I get a pink area during an outage ("outage" is unknown when vin is greater
than 115, but it is 250 otherwise) and a green line with the average of the
voltage. The upper limit of the graph is 250 if there was an outage. Since the
normal value of "vin" is around 230, there is no scaling problem.

The problem is in the temperature graph:

DEF:temp=/var/rrd/usv.rrd:temp:AVERAGE
DEF:vinmin=/var/rrd/usv.rrd:vin:MIN
CDEF:outage=vinmin,115,LT,250,UNKN,IF
AREA:outage#FF6666
LINE2:temp#999900

If there is no outage, the y-axis has values from 25 to 35 for example, but
if there's an outage, the upper limit is 250, resulting in pushing the graph
for the temperature down (y-axis has values from 25 to 250). Changing the
CDEF to something like

CDEF:outage=vinmin,115,LT,35,UNKN,IF

(which was my first thought) doesn't help, since the temperature might be 40
or 45 °C. In this case, the pink area does not reach the top of the graph or
worse, might not be seen if rrdtool scales the y-axis from 35 to 45.

Long story short, is there any possibility to check what rrdtool chooses
automatically for the upper-limit? Or is there anything to draw an coloured area
in the background without interfering with the autoscaling?

Thanks for reading this. Any hints and tips are appreciated.

Greetings,
Thorsten

-- 
+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
Bitte lächeln! Fotogalerie online mit GMX ohne eigene Homepage!

--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-users mailing list