SOURCES: munin-plugins.patch - don't die on non-existatant rotated...

baggins baggins at pld-linux.org
Mon Oct 10 22:29:13 CEST 2005


Author: baggins                      Date: Mon Oct 10 20:29:12 2005 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- don't die on non-existatant rotated logs

---- Files affected:
SOURCES:
   munin-plugins.patch (1.4 -> 1.5) 

---- Diffs:

================================================================
Index: SOURCES/munin-plugins.patch
diff -u SOURCES/munin-plugins.patch:1.4 SOURCES/munin-plugins.patch:1.5
--- SOURCES/munin-plugins.patch:1.4	Sun Oct  9 21:26:25 2005
+++ SOURCES/munin-plugins.patch	Mon Oct 10 22:29:06 2005
@@ -93,19 +93,71 @@
  
  if [ ! -f "$TEMP_FILE" ]; then
      exit 3
+diff -ur munin-1.3.2/node/node.d/courier_mta_mailstats.in munin-1.3.2-rotlog/node/node.d/courier_mta_mailstats.in
+--- munin-1.3.2/node/node.d/courier_mta_mailstats.in	2005-04-15 22:29:18.000000000 +0200
++++ munin-1.3.2-rotlog/node/node.d/courier_mta_mailstats.in	2005-10-10 22:18:45.170285184 +0200
+@@ -101,7 +101,8 @@
+ 
+ if($startsize < $pos) {
+     # Log rotated
+-    parseLogfile ($rotlogfile, $pos, (stat $rotlogfile)[7]);
++    if (-f $rotlogfile)
++        parseLogfile ($rotlogfile, $pos, (stat $rotlogfile)[7]);
+     $pos = 0;
+ }
+ 
+diff -ur munin-1.3.2/node/node.d/courier_mta_mailvolume.in munin-1.3.2-rotlog/node/node.d/courier_mta_mailvolume.in
+--- munin-1.3.2/node/node.d/courier_mta_mailvolume.in	2005-04-15 22:29:18.000000000 +0200
++++ munin-1.3.2-rotlog/node/node.d/courier_mta_mailvolume.in	2005-10-10 22:19:00.722920824 +0200
+@@ -92,7 +92,8 @@
+ 
+ if($startsize < $pos) {
+     # Log rotated
+-    parseLogfile ($rotlogfile, $pos, (stat $rotlogfile)[7]);
++    if (-f $rotlogfile)
++        parseLogfile ($rotlogfile, $pos, (stat $rotlogfile)[7]);
+     $pos = 0;
+ }
+ 
+diff -ur munin-1.3.2/node/node.d/cupsys_pages.in munin-1.3.2-rotlog/node/node.d/cupsys_pages.in
+--- munin-1.3.2/node/node.d/cupsys_pages.in	2005-04-15 22:29:18.000000000 +0200
++++ munin-1.3.2-rotlog/node/node.d/cupsys_pages.in	2005-10-10 22:19:22.973538216 +0200
+@@ -91,7 +91,8 @@
+ }
+ if ($startsize < $pos) {
+     # Log rotated
+-    parselogfile ($rotlogfile, $pos, (stat $rotlogfile)[7]);
++    if (-f $rotlogfile)
++        parselogfile ($rotlogfile, $pos, (stat $rotlogfile)[7]);
+     $pos = 0;
+ }
+ 
+diff -ur munin-1.3.2/node/node.d/exim_mailstats.in munin-1.3.2-rotlog/node/node.d/exim_mailstats.in
+--- munin-1.3.2/node/node.d/exim_mailstats.in	2005-04-15 22:29:18.000000000 +0200
++++ munin-1.3.2-rotlog/node/node.d/exim_mailstats.in	2005-10-10 22:19:45.239153328 +0200
+@@ -183,7 +183,8 @@
+ if ($startsize < $pos)
+ {
+     # Log rotated
+-    parseEximfile ($rotlogfile, $pos, (stat $rotlogfile)[7]);
++    if (-f $rotlogfile)
++        parseEximfile ($rotlogfile, $pos, (stat $rotlogfile)[7]);
+     $pos = 0;
+ }
+ 
 diff -ur munin-1.3.2/node/node.d/mailman.in munin-1.3.2-plugins/node/node.d/mailman.in
 --- munin-1.3.2/node/node.d/mailman.in	2005-04-15 22:29:18.000000000 +0200
 +++ munin-1.3.2-plugins/node/node.d/mailman.in	2005-10-09 14:04:27.503353168 +0200
 @@ -67,7 +67,8 @@
-     $startsize = 0;
- }
  
--if($startsize < $pos) {
-+if($startsize < $pos &&
-+   -f $rotlogfile) {
+ if($startsize < $pos) {
      # Log rotated
-     parseMailmanLog($rotlogfile, $pos, (stat $rotlogfile)[7]);
+-    parseMailmanLog($rotlogfile, $pos, (stat $rotlogfile)[7]);
++    if (-f $rotlogfile)
++        parseMailmanLog($rotlogfile, $pos, (stat $rotlogfile)[7]);
      $pos = 0;
+ }
+ 
 diff -ur munin-1.3.2/node/node.d.linux/fw_forwarded_local.in munin-1.3.2-plugins/node/node.d.linux/fw_forwarded_local.in
 --- munin-1.3.2/node/node.d.linux/fw_forwarded_local.in	2005-04-15 22:29:18.000000000 +0200
 +++ munin-1.3.2-plugins/node/node.d.linux/fw_forwarded_local.in	2005-10-09 14:02:02.324423720 +0200
@@ -350,3 +402,55 @@
  
  if [ ! -f "$TEMP_FILE" ]; then
      exit 3
+diff -ur munin-1.3.2/node/node.d/pop_stats.in munin-1.3.2-rotlog/node/node.d/pop_stats.in
+--- munin-1.3.2/node/node.d/pop_stats.in	2005-04-15 22:29:18.000000000 +0200
++++ munin-1.3.2-rotlog/node/node.d/pop_stats.in	2005-10-10 22:20:53.958706368 +0200
+@@ -67,7 +67,8 @@
+ if ($startsize < $pos)
+ {
+ 	# Log rotated
+-	parseEximfile ($pop{'rotlogfile'}, $pos, (stat $pop{'rotlogfile'})[7]);
++	if (-f $pop{'rotlogfile'})
++		parseEximfile ($pop{'rotlogfile'}, $pos, (stat $pop{'rotlogfile'})[7]);
+ 	$pos = 0;
+ }
+ 
+diff -ur munin-1.3.2/node/node.d/postfix_mailstats.in munin-1.3.2-rotlog/node/node.d/postfix_mailstats.in
+--- munin-1.3.2/node/node.d/postfix_mailstats.in	2005-04-15 22:29:18.000000000 +0200
++++ munin-1.3.2-rotlog/node/node.d/postfix_mailstats.in	2005-10-10 22:21:09.989269352 +0200
+@@ -122,7 +122,8 @@
+ if ($startsize < $pos)
+ {
+     # Log rotated
+-    parseLogfile ($rotlogfile, $pos, (stat $rotlogfile)[7]);
++    if (-f $rotlogfile)
++        parseLogfile ($rotlogfile, $pos, (stat $rotlogfile)[7]);
+     $pos = 0;
+ }
+ 
+diff -ur munin-1.3.2/node/node.d/postfix_mailvolume.in munin-1.3.2-rotlog/node/node.d/postfix_mailvolume.in
+--- munin-1.3.2/node/node.d/postfix_mailvolume.in	2005-04-15 22:29:18.000000000 +0200
++++ munin-1.3.2-rotlog/node/node.d/postfix_mailvolume.in	2005-10-10 22:21:17.923063232 +0200
+@@ -111,7 +111,8 @@
+ if ($startsize < $pos)
+ {
+     # Log rotated
+-    parseLogfile ($rotlogfile, $pos, (stat $rotlogfile)[7]);
++    if (-f $rotlogfile)
++        parseLogfile ($rotlogfile, $pos, (stat $rotlogfile)[7]);
+     $pos = 0;
+ }
+ 
+diff -ur munin-1.3.2/node/node.d/spamstats.in munin-1.3.2-rotlog/node/node.d/spamstats.in
+--- munin-1.3.2/node/node.d/spamstats.in	2005-04-15 22:29:18.000000000 +0200
++++ munin-1.3.2-rotlog/node/node.d/spamstats.in	2005-10-10 22:21:26.427770320 +0200
+@@ -72,7 +72,8 @@
+ if ($startsize < $pos)
+ {
+     # Log rotated
+-    parselogfile ($rotlogfile, $pos, (stat $rotlogfile)[7]);
++    if (-f $rotlogfile)
++        parselogfile ($rotlogfile, $pos, (stat $rotlogfile)[7]);
+     $pos = 0;
+ }
+ 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/munin-plugins.patch?r1=1.4&r2=1.5&f=u




More information about the pld-cvs-commit mailing list