X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/upsgraph/blobdiff_plain/0d627df92167c3a34339140fe3570a90dd51bebe..46ead44b92d43186d9bfb7353f9ed391ff4a90bd:/upsgraph.pl diff --git a/upsgraph.pl b/upsgraph.pl index 82e0259..c61b6c0 100755 --- a/upsgraph.pl +++ b/upsgraph.pl @@ -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";