+ 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'}) {
+ 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;
+ }
+