Module: check_mk
Branch: master
Commit: 1a8120a9675361c32560980ab9b146771033ce69
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1a8120a9675361…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Fri Jul 31 10:35:20 2015 +0200
#2414 FIX logwatch: now really ignores ignored logwatch lines
When a logwatch line is set to ignored through a logwatch pattern
it is now correctly removed from the status file of the logwatch check.
---
.werks/2414 | 11 +++++++++++
ChangeLog | 1 +
checks/logwatch | 3 +++
3 files changed, 15 insertions(+)
diff --git a/.werks/2414 b/.werks/2414
new file mode 100644
index 0000000..5edf420
--- /dev/null
+++ b/.werks/2414
@@ -0,0 +1,11 @@
+Title: logwatch: now really ignores ignored logwatch lines
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i3
+Date: 1438331344
+Class: fix
+
+When a logwatch line is set to ignored through a logwatch pattern
+it is now correctly removed from the status file of the logwatch check.
+
diff --git a/ChangeLog b/ChangeLog
index 2c6a82c..bb78549 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -93,6 +93,7 @@
* 2500 FIX: qlogic_fcport: Can now deal with missing port status information...
* 1276 FIX: brocade_mlx_temperature: Fixed the shown Temperature Values
* 2490 FIX: synology_disks: treat SSDs with state "not initialized" as OK
if state does not change later
+ * 2414 FIX: logwatch: now really ignores ignored logwatch lines...
Multisite:
* 2385 SEC: Fixed possible reflected XSS on all GUI pages where users can produce
unhandled exceptions...
diff --git a/checks/logwatch b/checks/logwatch
index 5cc609a..8ea1e32 100644
--- a/checks/logwatch
+++ b/checks/logwatch
@@ -475,6 +475,9 @@ def check_logwatch_generic(item, params, loglines, found,
groups=False):
except KeyError:
state_counts[level] = 1
+ if level == "I":
+ continue
+
block_lines.append(level + ' ' + text)
# The last section is finished here. Add it to the list of reclassified lines if
the