Bug 463071 - munin-plugins does not logrotate correctly
munin-plugins does not logrotate correctly
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: munin (Show other bugs)
8
All Linux
medium Severity medium
: ---
: ---
Assigned To: Kevin Fenzi
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-21 06:41 EDT by Kim Bisgaard
Modified: 2008-11-27 23:08 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-11-27 23:08:33 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Kim Bisgaard 2008-09-21 06:41:32 EDT
Description of problem:
munin-plugins does not logrotate correctly - looks for logfile with yesterday, when it should look for today - and uses ".", and not "-" as separator

Version-Release number of selected component (if applicable):
munin-node-1.2.5-4.fc8
munin-1.2.5-4.fc8


How reproducible:
Always

Steps to Reproduce:
1.Install postfix
2.let run for a week until it logrotates
3.cd /etc/munin/plugins; logfile=maillog  /etc/munin/plugins/postfix_mailvolume config
  
Actual results:
-- nothing - try using strace to see which logfiles it tries

Expected results:
graph_title Postfix bytes throughput
graph_args --base 1000 -l 0
graph_vlabel bytes / ${graph_period}
graph_scale  yes
graph_category  postfix
volume.label throughput
volume.type DERIVE
volume.min 0


Additional info:
Patch for fixing one of the plugins:
--- postfix_mailvolume~ 2007-12-28 19:43:15.000000000 +0100
+++ postfix_mailvolume  2008-09-21 12:22:21.000000000 +0200
@@ -110,9 +110,9 @@
 my $logfile = "$LOGDIR/$LOGFILE";
 my $prevdate = get_prev_date();

-if (-f "$logfile.$prevdate")
+if (-f "$logfile-$prevdate")
 {
-    $rotlogfile = "$logfile.$prevdate";
+    $rotlogfile = "$logfile-$prevdate";
 }
 elsif (-f "$logfile.0")
 {
@@ -209,8 +209,8 @@

 sub get_prev_date
 {
-       my @date = localtime (time - 86400);
-       my $prevdate = $date[5]+1900 . $date[4]+1 . $date[3];
+       my @date = localtime time;
+       my $prevdate = sprintf("%04d%02d%02d",$date[5]+1900, $date[4]+1, $date[3]);
        return $prevdate;
 }
Comment 1 Kim Bisgaard 2008-09-21 06:49:13 EDT
Also formats the date wrong: "20080921" becomes "2008921" (missing "0" in month")
Comment 2 Kevin Fenzi 2008-10-09 21:20:12 EDT
This seems to work here fine with munin-1.2.6-3.fc8

Can you upgrade to that version and see if you see the same issue?
Comment 3 Bug Zapper 2008-11-26 06:10:15 EST
This message is a reminder that Fedora 8 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 8.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '8'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 8's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 8 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 4 Kevin Fenzi 2008-11-27 23:08:33 EST
No response from the reporter here... 

I am going to go ahead and close this one now. 
Feel free to reopen or file a new bug if you spot anything further.

Note You need to log in before you can comment on or make changes to this bug.