]> git.zerfleddert.de Git - upsgraph/blobdiff - upsgraph.pl
Fix creation of new rrd files: Trailing space seems to be harmful
[upsgraph] / upsgraph.pl
index 010d11445a9af2766dc1a5c2d9e67387798c13b5..3077e2357abaa0c458b56e1428a4b783782335c8 100755 (executable)
@@ -79,7 +79,7 @@ sub rrdcreate(@) {
 
        push @cmd, "DS:${field}:GAUGE:600:" .
                $vars->{$field}->{'min'} . ":" .
-               $vars->{$field}->{'max'} . " ";
+               $vars->{$field}->{'max'};
 
        push @cmd, "RRA:AVERAGE:0.5:1:${keep}";
 
@@ -443,7 +443,7 @@ while(1) {
                        print HTML "<a href=\"${hostname}.${var}.html\"><img src=\"${hostname}.${var}.png\" width=\"${width}\" height=\"${height}\" border=\"0\"></a><br>\n";
 
                        open (HTML2, ">${outdir}/${hostname}.${var}.html.new");
-                       print HTML2 '<html><head><meta http-equiv="refresh" content="60"/><meta http-equiv="cache-control" content="no-cache"/><meta http-equiv="pragma" content="no-cache"/><meta http_equiv="expires" content="Sat, 26 Jul 1997 05:00:00 GMT"/><title>' . $vars->{$var}->{'name'} . '</title></head>';
+                       print HTML2 '<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta http-equiv="refresh" content="60"/><meta http-equiv="cache-control" content="no-cache"/><meta http-equiv="pragma" content="no-cache"/><meta http_equiv="expires" content="Sat, 26 Jul 1997 05:00:00 GMT"/><title>' . $vars->{$var}->{'name'} . '</title></head>';
                        print HTML2 '<body bgcolor="#ffffff">';
 
                        push @graphdef, "VDEF:min=${var},MINIMUM";
@@ -473,7 +473,7 @@ while(1) {
                                }
                        }
 
-                       print HTML2 "<img src=\"${hostname}.${var}.long.png\" width=\"${width}\" height=\"${height}\"><br>";
+                       print HTML2 "<img src=\"${hostname}.${var}.long.png\" width=\"${width}\" height=\"${height}\"><br>\n";
 
                        $mtime=(stat("${outdir}/${hostname}.${var}.week.png.work"))[9];
                        ($averages, $width, $height) =
@@ -490,7 +490,7 @@ while(1) {
                                }
                        }
 
-                       print HTML2 "<img src=\"${hostname}.${var}.week.png\" width=\"${width}\" height=\"${height}\"><br>";
+                       print HTML2 "<img src=\"${hostname}.${var}.week.png\" width=\"${width}\" height=\"${height}\"><br>\n";
 
                        $mtime=(stat("${outdir}/${hostname}.${var}.year.png.work"))[9];
                        ($averages, $width, $height) =
@@ -507,7 +507,7 @@ while(1) {
                                }
                        }
 
-                       print HTML2 "<img src=\"${hostname}.${var}.year.png\" width=\"${width}\" height=\"${height}\"><br>";
+                       print HTML2 "<img src=\"${hostname}.${var}.year.png\" width=\"${width}\" height=\"${height}\"><br>\n";
 
                        print HTML2 "</body></html>\n";
                        close(HTML2);
Impressum, Datenschutz