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