[rrd-users] Re: Newbie problem

listuser at bubba.numbnuts.net listuser at bubba.numbnuts.net
Sat Mar 15 18:05:16 MET 2003


On Sat, 15 Mar 2003, David Corbin wrote:

> I'm a new user of RRD.  I want to recorder a counter (integer) value 
> every five minutes.  However, now matter what I try, the value recorded 
> is NOT the value I'm getting back (fetch,graph, dump,xport).  The value 
> is some teeny fraction (x.yE-03 to x.yE-05).  At first, I thought this 
> was because my RRA was AVERAGE, but I get the same results with LAST and 
> MAX.  The DS is COUNTER. 
> 
> rrdtool create foo.rrd DS:incoming:COUNTER:600:0:U RRA:AVERAGE:0.5:1:300 
> RRA:AVERAGE:0.5:24:120 RRA:AVERAGE:0.5:288:400 DS:reject:COUNTER:600:0:U 
> RRA:MAX:0.5:1:300 RRA:AVERAGE:0.5:24:120 RRA:AVERAGE:0.5:288:400
> 
> rrdtool update foo.rrd -t incoming:reject N:56:2
> 
> Obviously, I'm doing *something* wrong.
> 
> For the record, I'm plotting occurrences of various messages in a log 
> file.  It gets reset once a day, but I haven't even gotten that far.
> 
> Thanks.
> David

Hi David.  You and I are in the same boat it seems.  I'm guessing your 
counting firewall or tcpd rejections and I'm counting SMTP spam 
rejections.  I'm seeing similar output.  

1047750300: 3.3928571429e-01 6.6071428571e-01 2.3750000000e+00 
1.0089285714e+01 1.6785714286e+00 1.6375000000e+01
1047750600: 0.0000000000e+00 1.9933333333e+00 2.9800000000e+00 
2.1886666667e+01 6.6666666667e-03 5.5720000000e+01
1047750900: 0.0000000000e+00 2.0000000000e+00 2.0033333333e+00 
2.5986666667e+01 1.9933333333e+00 3.0086666667e+01

I created my test rrd with this

   rrdtool create spam.rrd         \
            DS:RSS:GAUGE:600:U:U   \
            DS:DUL:GAUGE:600:U:U  \
            DS:SPEWS:GAUGE:600:U:U  \
            DS:SPAMHAUS:GAUGE:600:U:U  \
            DS:SOCKS:GAUGE:600:U:U  \
            DS:SENDMAIL_MISC:GAUGE:600:U:U \
            RRA:AVERAGE:0.5:1:600      \
            RRA:AVERAGE:0.5:6:700      \
            RRA:AVERAGE:0.5:24:775     \
            RRA:AVERAGE:0.5:288:797    \
            RRA:MAX:0.5:1:600          \
            RRA:MAX:0.5:6:700          \
            RRA:MAX:0.5:24:775         \
            RRA:MAX:0.5:288:797

I'm stuffing data into it with this every 5 minutes.

rrdtool update $workDir/spam.rrd N:$RSS:$DUL:$SPEWS:$SPAMHAUS:$SOCKS:$SENDMAIL_MISC

Each variable is a variable in the shell script I'm using.  The numbers 
are usually quite small.

3
21
11
14
0
25

Attempting to generate a PNG with this only outputs "0x0" to stdout.

   rrdtool graph spam-day.png --start -86400 \
            DEF:rss=spam.rrd:RSS:AVERAGE \
            DEF:dul=spam.rrd:DUL:AVERAGE \
            DEF:spews=spam.rrd:SPEWS:AVERAGE \
            DEF:spamhaus=spam.rrd:SPAMHAUS:AVERAGE \
            DEF:socks=spam.rrd:SOCKS:AVERAGE \
            DEF:sendmail_misc=spam.rrd:SENDMAIL_MISC:AVERAGE

Trying to fetch the data shows me pretty much what you're seeing.

rrdtool fetch spam.rrd AVERAGE

And I too am new to RRD (but not MRTG).  So if someone can answer this 
question, then we'll both be happy. :)

Justin

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