[rrd-users] enumerated values in rrdtool?
Brad Lowe
brad at nuspectra.com
Mon Mar 17 04:03:09 MET 2003
Hi everyone,
Hopefully someone can point me in the right direction--I've looked around but haven't seen anything that shows how to do what I'm trying.
I would like to graph state data that represents fixed machine states. The problem is that I am getting averaged data that doesn't graph correctly.
Example, in C I have:
enum state { inactive, active, starting, error1, error2 };
The problem is that if the state goes from error1 (value=3) to active (value=1) I can get a values of 1.01 to 2.99, which makes graphing difficult! (Since the graph goes through the 2=starting state.)
Here is what I've done so far:
I created an rrd database and I'm using RRA CF of type MAX and of DS type GAUGE for the state data.
Every 60 seconds, the current state is added (either 0, 1, 2, 3, or 4).
I graph these using equality tests.. using an arbitrary 0-10 graph.
(where I want to show state as a full color bar from the bottom of the graph (0) to the top (10).
DEF:state=file.rrd:state:MAX
CDEF:s0=state,0,EQ,10,0,IF
CDEF:s1=state,1,EQ,10,0,IF
CDEF:s2=state,2,EQ,10,0,IF
CDEF:s3=state,3,EQ,10,0,IF
CDEF:s4=state,4,EQ,10,0,IF
AREA:s0#F00000:"inactive"
AREA:s1#00FF00:"active"
AREA:s2#00AA00:"starting"
AREA:s3#500000:"error_1"
AREA:s4#F00000:"error_2"
This is very close to working, except during the transitions from one state to another, which is where the averaged values are. Currently I get gaps between the valid states--because I'm using the equality. If I tested for a range (eg s0=(state>=0 and state < 1) etc.) I'm pretty sure I would see the problem where the state shows up as some value that never occurred (e.g. starting=2).
Is there a FAQ that discusses enumerated data types?
Any help would be greatly appreciated.
- Brad
p.s. Are there searchable archives? I only found a list of the last few topics.
--
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