5

Munin is quite verbose, and logs a bunch of things into munin-graph.log, munin-html.log, munin-limits.log and munin-update.log at each run of munin-cron.

I already reduced munin-node logging level by setting log_level 0 in munin-node.conf, and that works well. munin-node.log only gets updated when an error message is generated.

However I also tried to add the same option in munin.conf, but it makes munin crash.

How one can reduce the amount of logs written by munin?

rzr
  • 259
  • 2
  • 6
petrus
  • 5,297
  • 26
  • 42

1 Answers1

1

Trying to figure out which fields were allowed in munin.conf, I ended up reading the source code of Config.pm.

Unfortunately, the only references to logging are the followings:

config      => bless ( {
   debug            => 0,
   logdir           => $Munin::Common::Defaults::MUNIN_LOGDIR,
}, $class )

But looking further at the source code shows some recent commits on the messages logged:

@@ -90,7 +90,7 @@ while (new CGI::Fast) {
   my $pinpoint = undef;
   my $path = $ENV{PATH_INFO} || "";

-  INFO "Request path is $path";
+  DEBUG "Request path is $path";

   # The full URL looks like this:
   # Case 1:

@@ -133,7 +133,7 @@ while (new CGI::Fast) {
   my ($dom, $host, $serv, $scale) =
     $path =~ m#^/(.*)/([^/]+)/([\w-]+)-([\w=,]+)\.png#; ## avoid bug in vim

-  INFO "asked for ($dom, $host, $serv, $scale)";
+  DEBUG "asked for ($dom, $host, $serv, $scale)";

   if ($scale =~ /pinpoint=(\d+),(\d+)/) {
     $pinpoint = [ $1, $2, ];

I upgraded munin to 2.0.6-1 as I was running Debian stable's 1.4.5-3 and logging was indeed reduced !

petrus
  • 5,297
  • 26
  • 42