[rrd-users] Re: something missing ..

Fitzgerald, David David.Fitzgerald at Level3.com
Wed Jul 16 22:01:32 MEST 2003


I'm collecting a single variable (status, of type GAUGE) which
represents a finite number of states. The value of this variable is one
of the 1 values: 0, 1, 2, or 3.

I'm trying to devise a means of creating a graph where each value is
displayed as a different color, but I keep getting lost reading Alex's
tutorial.

Ideally, a value of 2 would be designated by a green region, a value of
1 would be blue, and a value of 3 would be red.

At present, the value of the variable is as follows:

1058382660: 2.0000000000e+00
1058382720: 2.0000000000e+00
1058382780: 2.0000000000e+00
1058382840: 2.0000000000e+00
1058382900: 2.0000000000e+00
1058382960: 2.0000000000e+00
1058383020: 2.0000000000e+00
1058383080: 2.0000000000e+00
1058383140: 2.0000000000e+00
1058383200: 2.0000000000e+00
1058383260: 2.0000000000e+00
1058383320: 3.0000000000e+00
1058383380: 3.0000000000e+00
1058383440: 1.0000000000e+00

The following snippet gets me a graph that seems to have a value of 3
for all time periods, when it should be 2.

    $com7 = " COMMENT:\"\nPartner: $key   Partner Role:
$PartnerType{$key}\\n\"";
    $com8 = " COMMENT:\"Written: $nowlit\"";
    $graph2 = "DEF:status=$rrdfile:status:AVERAGE ";
    $graph3 = "CDEF:unknown=status,0,EQ,0,0,IF ";
    $graph4 = "CDEF:syncing=status,2,LT,0,status,IF ";
    $graph5 = "CDEF:active=status,2,EQ,0,status,IF ";
    $graph6 = "CDEF:inactive=status,2,GT,0,status,IF ";
    $graph6 = "";
    $graph7 = "AREA:active#00FF00:Active ";
    $graph8 = "AREA:syncing#0000FF:Syncing ";
    $graph9 = "AREA:inactive#FF0000:Inactive ";
    $graph9 = "";
    $graph = "$graph1 $g_title $graph2 $graph3 $graph4 $graph5 $graph6
$graph7 $graph8 $graph9 $com7 $com8";
What obvious thing am I missing?

-fitz

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