Module: check_mk
Branch: master
Commit: f209c50420b44104f9d7cc5fd1c7a88ba5143941
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f209c50420b441…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Jun 20 18:05:29 2016 +0200
logwatch.ec: fix exception in case of empty logfile output
---
checks/logwatch | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/checks/logwatch b/checks/logwatch
index 943bbfc..4e4021e 100644
--- a/checks/logwatch
+++ b/checks/logwatch
@@ -657,9 +657,9 @@ def inventory_logwatch_ec(info, one_svc_per_log):
def check_logwatch_ec(item, params, info):
if len(info) == 1:
- line = " ".join(info[0])
+ line = " ".join(info[0][1:])
if line.startswith("CANNOT READ CONFIG FILE"):
- return 3, "Error in agent configuration: %s" % "
".join(info[0][4:])
+ return 3, "Error in agent configuration: %s" % "
".join(info[0][5:])
# 1. Parse lines in info and separate by logfile
logs = {}