Package: munin
Version: 1.2.6-12
Severity: normal
vi /etc/cron.d/munin
14 10 * * * munin if [ -x /usr/share/munin/munin-limits ]; then
/usr/share/munin/munin-limits --force --contact nagios --contact old-nagios; fi
Results every day in a mail with
Subject\: Cron <mu...@nids01> if [ -x /usr/share/munin/munin-limits ]; then
/usr/share/munin/munin-limits --force --contact nagios --contact old-nagios; fi
Body\: Noone opened our log file at startup! at /usr/share/munin/munin-limits
line 596.
This look a bit nasty.
vi +"587" /usr/share/munin/munin-limits
sub logger {
my ($comment) = @_;
my $now = strftime "%b %d %H:%M:%S", localtime;
print "$now - $comment\n" if $stdout;
if ($log->opened) {
print $log "$now - $comment\n";
} else {
die "Noone opened our log file at startup!";
}
}
Found in the develpment version 1.3.4 a correction of the issue.
sub logger {
my ($comment) = @_;
my $now = strftime "%b %d %H:%M:%S", localtime;
print "$now - $comment\n" if $stdout;
if ($log->opened) {
print $log "$now - $comment\n";
} else {
if (!open ($log, ">>@@LOGDIR@@/munin-limits.log")) {
print STDERR "Warning: Could not open log file
\"@@LOGDIR@@/munin-limits.log\" for writing: $!";
} else {
open (STDERR, ">&", $log);
}
}
}
As it fails on @@LOGDIR@@ I changed it to the exact path here (You may be
better in defining LOGDIR;-)).
sub logger {
my ($comment) = @_;
my $now = strftime "%b %d %H:%M:%S", localtime;
print "$now - $comment\n" if $stdout;
if ($log->opened) {
print $log "$now - $comment\n";
} else {
if (!open ($log, ">>/var/log/munin/munin-limits.log")) {
print STDERR "Warning: Could not open log file
\"/var/log/munin/munin-limits.log\" for writing: $!";
} else {
open (STDERR, ">&", $log);
}
}
}
Best Regards
Jan Rasche
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (900, 'unstable'), (800, 'testing'), (700, 'stable')
Architecture: i386 (x86_64)
Kernel: Linux 2.6.26-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages munin depends on:
ii adduser 3.110 add and remove users and groups
pn libdigest-md5-perl <none> (no description available)
ii libhtml-template-perl 2.9-1 HTML::Template : A module for usin
ii librrds-perl 1.3.8-1 Time-series data storage and displ
pn libstorable-perl <none> (no description available)
ii perl [libtime-hires-perl] 5.10.0-23 Larry Wall's Practical Extraction
ii perl-modules 5.10.0-23 Core Perl modules
ii rrdtool 1.3.8-1 Time-series data storage and displ
Versions of packages munin recommends:
ii libdate-manip-perl 5.54-1 a perl library for manipulating da
ii munin-node 1.2.6-12 network-wide graphing framework (n
Versions of packages munin suggests:
ii apache2-mpm-prefork [httpd] 2.2.11-6 Apache HTTP Server - traditional n
ii links [www-browser] 2.2-1+b1 Web browser running in text mode
ii lynx-cur [www-browser] 2.8.7pre6-1 Text-mode WWW Browser with NLS sup
ii w3m [www-browser] 0.5.2-2+b1 WWW browsable pager with excellent
-- no debconf information
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]