Revert "disable pango text rendering, it leaks memory"
[upsgraph] / upsgraph.pl
index 06e66e35a7f7fe555c8676516f8d92b552b52f59..9887d0c4ab2215e9b20eaecd4abf0cc23de55292 100755 (executable)
@@ -325,10 +325,10 @@ while(1) {
                }
 
                foreach my $var (@{$host->{'fields'}}) {
-                       my @graphdef = ("--lazy", "-t", $hostname." - ".$vars->{$var}->{'name'}, "DEF:${var}=${rrdfile}.${var}:${var}:AVERAGE", "LINE1:${var}#FF0000");
+                       my @graphdef = ('-P', "--lazy", "-t", $hostname." - ".$vars->{$var}->{'name'}, "DEF:${var}=${rrdfile}.${var}:${var}:AVERAGE", "LINE1:${var}#FF0000");
 
                        push @graphdef, "VDEF:cur=${var},LAST";
-                       push @graphdef, 'GPRINT:cur:Current\\: %.2lf\\r';
+                       push @graphdef, 'GPRINT:cur:Current\\: <span foreground="#FF0000">%.2lf</span>\\r';
 
                        my $mtime;
                        $mtime=(stat("${outdir}/${hostname}.${var}.png.work"))[9];
Impressum, Datenschutz