Module: check_mk
Branch: master
Commit: 761e5d1be60cbfb99394af98604842277c02acf7
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=761e5d1be60cbf…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Mon Jan 14 09:42:32 2013 +0100
logwatch: unknown eventlog levels from windows agent treated as warning
---
ChangeLog | 1 +
checks/logwatch | 2 ++
2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 3af5c1c..a7ba39f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,7 @@
* FIX: win_dhcp_pools: removed faulty output on non-german windows 2003 servers
with no dhcp server installed (Thanks to Mathias Decker)
* Add: fileinfo is now supported by the solaris agent. Thanks to Daniel Roettgermann
+ * Logwatch: unknown eventlog level ('u') from windows agent treated as
warning
Multisite:
* FIX: Fixed rendering of dashboard globes in opera
diff --git a/checks/logwatch b/checks/logwatch
index 120e437..0e8fa76 100644
--- a/checks/logwatch
+++ b/checks/logwatch
@@ -90,12 +90,14 @@ def logwatch_state(state):
def logwatch_level_name(level):
if level == 'O': return 'OK'
elif level == 'W': return 'WARN'
+ elif level == 'u': return 'WARN' # undefined states are treated as
warning
elif level == 'C': return 'CRIT'
else: return 'IGN'
def logwatch_level_worst(worst, level):
if level == 'O': return max(worst, 0)
elif level == 'W': return max(worst, 1)
+ elif level == 'u': return max(worst, 1)
elif level == 'C': return max(worst, 2)
else: return worst