2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00

fix bug which produces incorrect scaling e.g. on the host cpu usage graph

This commit is contained in:
Stefan Seidel 2012-04-23 10:34:12 +02:00
parent d42c7d615d
commit 200512d860

View File

@ -402,12 +402,12 @@ sub munin_print {
my $cfg = $par->{config};
$par = $par->{selector};
my $oldGroup = "_-_";
my $factor;
# find values according to criteria in $par and sort by grouping parameter
foreach (sort { $a->{$cfg->{groupBy}} cmp $b->{$cfg->{groupBy}} } grep { my $d = $_; all { (not exists $d->{$_}) || $d->{$_} =~ /$par->{$_}/ } keys %$par; } @$arr) {
my $groupCrit = $cfg->{groupBy};
my $curGroup = $_->{$groupCrit};
my $factor;
if (!($curGroup eq $oldGroup)) {
# we're in a new group, meaning a new graph starts