Module: check_mk
Branch: master
Commit: aaf09d6a7263df56147d5503c4cf6645d8470ef4
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=aaf09d6a7263df…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Jan 30 13:56:41 2015 +0100
#1887 FIX Logwatch event console forwarding: Better dealing with logwatch states
---
.werks/1887 | 10 ++++++++++
ChangeLog | 1 +
checks/logwatch | 11 +++++++----
3 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/.werks/1887 b/.werks/1887
new file mode 100644
index 0000000..1569219
--- /dev/null
+++ b/.werks/1887
@@ -0,0 +1,10 @@
+Title: Logwatch event console forwarding: Better dealing with logwatch states
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1422622576
+
+
diff --git a/ChangeLog b/ChangeLog
index ffced7a..3dd6ebe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -126,6 +126,7 @@
* 1923 FIX: cisco_qos: Fixed exception in discovery that might lead to missing
services
* 1924 FIX: cisco_power: Fixed missing power supplies in case where name is not
unique
* 1886 FIX: win_printers: Fixed exception in WATO when displaying default parameters
+ * 1887 FIX: Logwatch event console forwarding: Better dealing with logwatch states
Multisite:
* 1758 Improved exception hander: Shows details without additional debug request,
added mailto link for error report...
diff --git a/checks/logwatch b/checks/logwatch
index f8d50b3..fa7750d 100644
--- a/checks/logwatch
+++ b/checks/logwatch
@@ -500,9 +500,10 @@ def check_logwatch_generic(item, params, loglines, found,
groups=False):
import socket, time
-# OK -> priority 5
-# WARN -> priority 4
-# CRIT -> priority 2
+# OK -> priority 5 (notice)
+# WARN -> priority 4 (warning)
+# CRIT -> priority 2 (crit)
+# context -> priority 6 (info)
# u = Uknown
def logwatch_to_prio(level):
if level == 'W':
@@ -511,7 +512,9 @@ def logwatch_to_prio(level):
return 2
elif level == 'O':
return 5
- elif level == 'u':
+ elif level == '.':
+ return 6
+ else:
return 4
def syslog_time():