Module: check_mk
Branch: master
Commit: bbad683d0ae9adecab27db221aaea6d841bcbcc3
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=bbad683d0ae9ad…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Sep 19 16:05:28 2013 +0200
mk_logwatch: ignored loglines now reported with an . prefix (if required)
---
ChangeLog | 1 +
agents/plugins/mk_logwatch | 2 ++
2 files changed, 3 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 16fbfb8..4aa9efe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -98,6 +98,7 @@
* agent_vsphere: completely rewritten, now considerably faster
vCenter is still queried by old version
* windows_agent: windows eventlog informational/audit logs now reported with O
prefix
+ * mk_logwatch: ignored loglines now reported with an "." prefix (if
required)
Notifications:
diff --git a/agents/plugins/mk_logwatch b/agents/plugins/mk_logwatch
index 1d64c76..6cd4e3f 100755
--- a/agents/plugins/mk_logwatch
+++ b/agents/plugins/mk_logwatch
@@ -291,6 +291,8 @@ def process_logfile(logfile, patterns):
color = {'C': tty_red, 'W': tty_yellow, 'O': tty_green,
'I': tty_blue, '.': ''}[level]
if debug:
line = line.replace("\1", "\nCONT:")
+ if level == "I":
+ level = "."
outputtxt += "%s%s %s%s\n" % (color, level, line[:-1], tty_normal)
new_offset = os.lseek(fl, 0, 1) # os.SEEK_CUR not available in Python 2.4