exit 1;
}
+ my $limitsChanged = 0;
if (defined($rrdinfo->{"ds[${field}].min"})) {
if ($rrdinfo->{"ds[${field}].min"} ne $host->{'vars'}->{$field}->{'min'}) {
+ $limitsChanged = 1;
RRDs::tune("${rrdfile}.${field}","-i",$field.":".$host->{'vars'}->{$field}->{'min'});
}
} else {
if ($host->{'vars'}->{$field}->{'min'} ne 'U') {
+ $limitsChanged = 1;
RRDs::tune("${rrdfile}.${field}","-i",$field.":".$host->{'vars'}->{$field}->{'min'});
}
}
if (defined($rrdinfo->{"ds[${field}].max"})) {
if ($rrdinfo->{"ds[${field}].max"} ne $host->{'vars'}->{$field}->{'max'}) {
+ $limitsChanged = 1;
RRDs::tune("${rrdfile}.${field}","-a",$field.":".$host->{'vars'}->{$field}->{'max'});
}
} else {
if ($host->{'vars'}->{$field}->{'max'} ne 'U') {
+ $limitsChanged = 1;
RRDs::tune("${rrdfile}.${field}","-a",$field.":".$host->{'vars'}->{$field}->{'max'});
}
}
}
if ($rrdinfo->{'rra[0].rows'} != $keep ||
- !defined($rrdinfo->{'rra[1].rows'}) || $rrdinfo->{'rra[1].rows'} != $keepHours) {
+ !defined($rrdinfo->{'rra[1].rows'}) || $rrdinfo->{'rra[1].rows'} != $keepHours ||
+ $limitsChanged == 1) {
print "Resizing ${rrdfile}.${field} from " . $rrdinfo->{'rra[0].rows'} .
" to ${keep} samples.\n";