]> git.zerfleddert.de Git - upsgraph/blobdiff - upsgraph.pl
undefine limits if they are not set
[upsgraph] / upsgraph.pl
index 82e0259fc1c0cd7cec6917f125a8ee7dce324582..c61b6c0bbad27d56004498dfa452571642fed401 100755 (executable)
@@ -107,6 +107,11 @@ if ($> == 0) {
 foreach my $host (@$hosts) {
        my $rrdfile = $host->{'rrdfile'};
 
+       foreach my $var (keys(%{$host->{'vars'}})) {
+               $host->{'vars'}->{$var}->{'min'} = 'U' if (!defined($host->{'vars'}->{$var}->{'min'}));
+               $host->{'vars'}->{$var}->{'max'} = 'U' if (!defined($host->{'vars'}->{$var}->{'max'}));
+       }
+
        if (-e "${rrdfile}") {
                print "Reading old ${rrdfile} to preserve data...\n";
 
Impressum, Datenschutz