Xymon Mailing List Archive search

RRD - Aberrant Behavior Detection with Holt-Winters Forecasting

3 messages in this thread

list Nicolas Lienard · Tue, 23 Oct 2012 21:15:42 +0200 ·
Hello

When devices are too overloaded; we got lot of gap in the graph and it is not very nice.

To avoid that, i would like to implement the abberrant behavior detection provided by RRDTOOL.

Following http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html, i defined a new RRA in ~xymon/server/etc/rrddefinitions.cfg

[test_rrd]
        RRA:AVERAGE:0.5:1:576
        RRA:AVERAGE:0.5:6:576
        RRA:AVERAGE:0.5:24:576
        RRA:AVERAGE:0.5:288:576
        # RRA:HWPREDICT:<array length>:<alpha>:<beta>:<period>
        # enable RRAs for aberrant detection, 1 day seasonal store for 5 day
	RRA:HWPREDICT:1440:0.1:0.0035:288 <------ new entry

i got a simple test script running every 5 mn:

sh-3.00$ cat test_rrd.sh 
#!/bin/sh
HOSTNAME="test_device"
value=42
$BB $BBDISP  "status+200d $HOSTNAME.test_rrd green `date`
test: $value"


i got ncv conf in xymonserver.cfg, the graph is working fine with this basic definition:

[test_rrd]
         TITLE test RRD
         YAXIS value
         DEF:a=test_rrd.rrd:test:AVERAGE
         LINE2:a#00CC00:test value
         GPRINT:a:LAST: \: %5.1lf (cur)
         GPRINT:a:MAX: \: %5.1lf (max)
         GPRINT:a:MIN: \: %3.1lf (min)
         GPRINT:a:AVERAGE: \: %5.1lf (avg)\n

now, if i add the def:

        DEF:b=test_rrd.rrd:test:HWPREDICT

the graph is not showing anymore [even if i didn t use the new DEF on a LINE]  :(

if i dump the rrd i can see the RRA :

sh-3.00$ rrdtool dump /opt/xymon/data/rrd/test_device/test_rrd.rrd |grep HW
                <cf> HWPREDICT </cf>


any idea is welcome.

Thanks.

regards
Nico
list Nicolas Lienard · Tue, 23 Oct 2012 21:19:59 +0200 ·
Hello

When devices are too overloaded; we got lot of gap in the graph and it is not very nice.

To avoid that, i would like to implement the abberrant behavior detection provided by RRDTOOL.

Following http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html, i defined a new RRA in ~xymon/server/etc/rrddefinitions.cfg

[test_rrd]
       RRA:AVERAGE:0.5:1:576
       RRA:AVERAGE:0.5:6:576
       RRA:AVERAGE:0.5:24:576
       RRA:AVERAGE:0.5:288:576
       # RRA:HWPREDICT:<array length>:<alpha>:<beta>:<period>
       # enable RRAs for aberrant detection, 1 day seasonal store for 5 day
	RRA:HWPREDICT:1440:0.1:0.0035:288 <------ new entry

i got a simple test script running every 5 mn:

sh-3.00$ cat test_rrd.sh 
#!/bin/sh
HOSTNAME="test_device"
value=42
$BB $BBDISP  "status+200d $HOSTNAME.test_rrd green `date`
test: $value"


i got ncv conf in xymonserver.cfg, the graph is working fine with this basic definition:

[test_rrd]
        TITLE test RRD
        YAXIS value
        DEF:a=test_rrd.rrd:test:AVERAGE
        LINE2:a#00CC00:test value
        GPRINT:a:LAST: \: %5.1lf (cur)
        GPRINT:a:MAX: \: %5.1lf (max)
        GPRINT:a:MIN: \: %3.1lf (min)
        GPRINT:a:AVERAGE: \: %5.1lf (avg)\n

now, if i add the def:

       DEF:b=test_rrd.rrd:test:HWPREDICT

the graph is not showing anymore [even if i didn t use the new DEF on a LINE]  :(

if i dump the rrd i can see the RRA :

sh-3.00$ rrdtool dump /opt/xymon/data/rrd/test_device/test_rrd.rrd |grep HW
               <cf> HWPREDICT </cf>


any idea is welcome.

Thanks.

regards
Nico
list Jeremy Laidman · Fri, 9 Nov 2012 12:06:08 +1100 ·
quoted from Nicolas Lienard
On 24 October 2012 06:19, Nico <user-4f1d872b9031@xymon.invalid> wrote:
now, if i add the def:

       DEF:b=test_rrd.rrd:test:HWPREDICT

the graph is not showing anymore [even if i didn t use the new DEF on a
LINE]  :(
In debug mode, showgraph.cgi will display the arguments sent to
rrd_graph().  Try adding "--debug" to CGI_SHOWGRAPH_OPTS in cgioptions.cfg,
and have a look at the parameters.  Then try running "rrdtool graph ..."
with the same parameters and see what it says.

If you're able to grab the URL for the image, use wget to fetch the URL and
show the contents.  You should see the rrd_graph error message, like this:

<html><head><title>Invalid request</title></head>
<body>the RRD does not contain an RRA matching the chosen CF</body></html>

This is what I get when I add a line with HWPREDICT, where I haven't
defined it in my RRD file (yet).  You might get a different message that
indicates where the problem is.

J