severity 689291 important
tags 689291 + patch
# not adding 100 lines of noise to the logfiles every 5min is important,
# so one can better read the logs for debugging
thanks

commit 789c59e3a27f5d38cabd02c8f57fec605e6146a8
Author: Steve Schnepp <steve.schn...@pwkf.org>
Date:   Thu Sep 6 13:46:17 2012 +0200

    master: fix too many warnings in munin-graph.log
    
    When graph_strategy was missing, a warning was emitted since the value is
    undef.
    
    Closes: #1251

diff --git a/master/lib/Munin/Master/HTMLConfig.pm 
b/master/lib/Munin/Master/HTMLConfig.pm
index dfa8b70..bbccffa 100644
--- a/master/lib/Munin/Master/HTMLConfig.pm
+++ b/master/lib/Munin/Master/HTMLConfig.pm
@@ -473,7 +473,7 @@ sub generate_service_templates {
            }
     }
 
-    if ($config->{'graph_strategy'} eq "cgi") {
+    if (munin_get($config, "graph_strategy", "cron") eq "cgi") {
        map { $srv{$_} = $config->{'cgiurl_graph'} . "/" . $imgs{$_} } keys 
%imgs;
     } else {
        map { $srv{$_} = $root_path . "/" . $imgs{$_} } keys %imgs;
@@ -500,7 +500,7 @@ sub generate_service_templates {
        for my $scale (@times) {
         # Don't try to find the size if cgi is enabled, 
         # otherwise old data might pollute  
-        next if ($config->{'graph_strategy'} eq "cgi");
+        next if (munin_get($config, "graph_strategy", "cron") eq "cgi");
         if (my ($w, $h)
             = get_png_size(munin_get_picture_filename($service, $scale))) {
             $srv{"img" . $scale . "width"}  = $w;
@@ -512,7 +512,7 @@ sub generate_service_templates {
         $srv{imgweeksum} = "$srv{node}-week-sum.png";
         $srv{imgyearsum} = "$srv{node}-year-sum.png";
         for my $scale (["week", "year"]) {
-            next if ($config->{'graph_strategy'} eq "cgi");
+            next if (munin_get($config, "graph_strategy", "cron") eq "cgi");
             if (my ($w, $h)
                 = get_png_size(munin_get_picture_filename($service, $scale, 
1)))
             {


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to