Module: check_mk
Branch: master
Commit: 69c8fdfe819c8627623e8c23d32148abe29218cd
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=69c8fdfe819c86…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Mon Aug 3 16:20:43 2015 +0200
update for #2414
---
checks/logwatch | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/checks/logwatch b/checks/logwatch
index deba7c5..3477c55 100644
--- a/checks/logwatch
+++ b/checks/logwatch
@@ -374,10 +374,6 @@ def check_logwatch_generic(item, params, loglines, found,
groups=False):
if found == False and not os.path.exists(logfile):
return (3, "log not present anymore")
- # if logfile has reached maximum size, abort with critical state
- if os.path.exists(logfile) and os.path.getsize(logfile) > logwatch_max_filesize:
- return (2, "unacknowledged messages have exceeded max size (%d Bytes)"
% logwatch_max_filesize)
-
# Write out new log lines (no reclassify here. It is done later in general for all
logs)
if len(loglines) > 0:
worst = -1
@@ -497,6 +493,10 @@ def check_logwatch_generic(item, params, loglines, found,
groups=False):
else:
os.unlink(logfile)
+ # if logfile has reached maximum size, abort with critical state
+ if os.path.exists(logfile) and os.path.getsize(logfile) > logwatch_max_filesize:
+ return (2, "unacknowledged messages have exceeded max size (%d Bytes)"
% logwatch_max_filesize)
+
#
# Render output
#