[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[0.96test1]Aggregate functions won't support - for a DS



Node target (cpu usage in this case) lacks support for - (to ignore 1 value)

I'm coloring my nodes with CPU usage using:

        TARGET gauge:/hdb1/network/rrds/device-148.rrd:cpu_5_m:-

Normal map creation works as expected, the node is colored using the current/last CPU usage, i'm also aggregating 1 month 99.99 PERCENT
values for capacity management.

However running the same map config with defines (--define rrd_start='now-1month -w8928' --define rrd_period=2592000 --define
rrd_aggregate_function=99.99,PERCENT)

results in:
/var/www/maps.netwerk.infopact.nl/bin/weathermap-0.95b/configs/infopact_access: ReadData: NODE dsl-nas-2-tc1, target: gauge:/h
        db1/network/rrds/device-492.rrd:cpu_5_m:- on config line 83 had no valid data, according to WeatherMapDataSource_rrd


changing the function wmrrd_read_from_real_rrdtool_aggregate line:

$command=$map->rrdtool . " graph /dev/null -f ''  --start $start --end $end DEF:in=$rrdfile:".$dsnames[IN].":$cf DEF:out=$rrdfile:".$dsnames

to :

$command=$map->rrdtool . " graph /dev/null -f ''  --start $start --end $end ";
if($dsnames[IN]!='-')
{
	$command.=" DEF:in=$rrdfile:".$dsnames[IN].":$cf VDEF:agg_in=in,$aggregatefn PRINT:agg_in:%lf
}

if($dsnames[OUT]!='-')
{
	$command.=" DEF:out=$rrdfile:".$dsnames[OUT].":$cf  VDEF:agg_out=out,$aggregatefn PRINT:agg_out:%lf";
}


Solves the problem


Erik Versaevel

Copyright 1994-2005, by Howard Jones. howie@thingy.com