diff -Naur munin-1.2.3.orig/server/munin-graph.in munin-1.2.3/server/munin-graph.in --- munin-1.2.3.orig/server/munin-graph.in 2005-04-03 02:18:24.000000000 +0200 +++ munin-1.2.3/server/munin-graph.in 2005-09-05 23:40:43.000000000 +0200 @@ -1,4 +1,4 @@ -#!@@PERL@@ -w +#!/usr/bin/perl -w # # Copyright (C) 2002-2004 Jimmy Olsen, Audun Ytterdal # @@ -87,7 +87,7 @@ # Added new option "graph_sums" which creates summarised graphs. # # Revision 1.30 2004/09/08 15:25:33 ilmari -# Use @@PERL@@ in all perl shebang lines. +# Use /usr/bin/perl in all perl shebang lines. # # Revision 1.29 2004/09/07 21:45:38 jimmyo # Changes of min and max values now causes corresponding changes in the RRD files. @@ -294,7 +294,7 @@ options may be supplied. --host Limit graphed hosts to . Multiple --host options may be supplied. - --config Use as configuration file. [@@CONFDIR@@/munin.conf] + --config Use as configuration file. [@@CONFDIR@@munin.conf] --[no]list-images List the filenames of the images created. [--nolist-images] --[no]day Create day-graphs. [--day] @@ -848,10 +848,10 @@ elsif ($global_headers == 1) { push (@rrd, "COMMENT:" . (" " x $max_field_len)); - push (@rrd, "COMMENT: Cur:"); - push (@rrd, "COMMENT:Min:"); - push (@rrd, "COMMENT:Avg:"); - push (@rrd, "COMMENT:Max: \\j"); + push (@rrd, "COMMENT: Cur\\:"); + push (@rrd, "COMMENT:Min\\:"); + push (@rrd, "COMMENT:Avg\\:"); + push (@rrd, "COMMENT:Max\\: \\j"); $global_headers++; } @@ -924,13 +924,13 @@ } else { - push (@rrd, "COMMENT: Cur:") unless $global_headers; + push (@rrd, "COMMENT: Cur\\:") unless $global_headers; push (@rrd, "GPRINT:c$rrdname:LAST:%6.2lf" . (munin_get_bool_val ($node->{client}->{$service}->{graph_scale}, "yes")?"%s":"") . ""); - push (@rrd, "COMMENT: Min:") unless $global_headers; + push (@rrd, "COMMENT: Min\\:") unless $global_headers; push (@rrd, "GPRINT:i$rrdname:MIN:%6.2lf" . (munin_get_bool_val ($node->{client}->{$service}->{graph_scale}, 1)?"%s":"") . ""); - push (@rrd, "COMMENT: Avg:") unless $global_headers; + push (@rrd, "COMMENT: Avg\\:") unless $global_headers; push (@rrd, "GPRINT:g$rrdname:AVERAGE:%6.2lf" . (munin_get_bool_val ($node->{client}->{$service}->{graph_scale}, 1)?"%s":"") . ""); - push (@rrd, "COMMENT: Max:") unless $global_headers; + push (@rrd, "COMMENT: Max\\:") unless $global_headers; push (@rrd, "GPRINT:a$rrdname:MAX:%6.2lf" . (munin_get_bool_val ($node->{client}->{$service}->{graph_scale}, 1)?"%s":"") . "\\j"); push (@{$total_pos{'min'}}, "i$rrdname"); push (@{$total_pos{'avg'}}, "g$rrdname"); @@ -991,13 +991,13 @@ push (@rrd, "CDEF:dpostotal=ipostotal,UN,ipostotal,UNKN,IF"); push (@rrd, "LINE1:dpostotal#000000:" . $node->{client}->{$service}->{graph_total} . (" " x ($max_field_len - length ($node->{client}->{$service}->{graph_total}) + 1))); - push (@rrd, "COMMENT: Cur:") unless $global_headers; + push (@rrd, "COMMENT: Cur\\:") unless $global_headers; push (@rrd, "GPRINT:gpostotal:LAST:%6.2lf" . (munin_get_bool_val ($node->{client}->{$service}->{graph_scale}, 1)?"%s":"") . ""); - push (@rrd, "COMMENT: Min:") unless $global_headers; + push (@rrd, "COMMENT: Min\\:") unless $global_headers; push (@rrd, "GPRINT:ipostotal:MIN:%6.2lf" . (munin_get_bool_val ($node->{client}->{$service}->{graph_scale}, 1)?"%s":"") . ""); - push (@rrd, "COMMENT: Avg:") unless $global_headers; + push (@rrd, "COMMENT: Avg\\:") unless $global_headers; push (@rrd, "GPRINT:gpostotal:AVERAGE:%6.2lf" . (munin_get_bool_val ($node->{client}->{$service}->{graph_scale}, 1)?"%s":"") . ""); - push (@rrd, "COMMENT: Max:") unless $global_headers; + push (@rrd, "COMMENT: Max\\:") unless $global_headers; push (@rrd, "GPRINT:apostotal:MAX:%6.2lf" . (munin_get_bool_val ($node->{client}->{$service}->{graph_scale}, 1)?"%s":"") . "\\j"); } @@ -1010,7 +1010,10 @@ push @complete, @{&get_header ($node, $config, $domain, $name, $service, $time)}; push @complete, @rrd; - push (@complete, "COMMENT:Last update: " . localtime($lastupdate) . "\\r"); + my $tmp_time = localtime($lastupdate); + $tmp_time =~ s/\:/\\:/g; + + push (@complete, "COMMENT:Last update\\: " . $tmp_time . "\\r"); if (time - 300 < $lastupdate) { @@ -1040,7 +1043,11 @@ push @rrd_sum, "--end",(int($lastupdate/$resolutions{$time}))*$resolutions{$time}; } push @rrd_sum, @rrd; - push (@rrd_sum, "COMMENT:Last update: " . localtime($lastupdate) . "\\r"); + + my $tmp_time = localtime($lastupdate); + $tmp_time =~ s/\:/\\:/g; + + push (@rrd_sum, "COMMENT:Last update\\: " . $tmp_time . "\\r"); my $labelled = 0; my @defined = ();