Module: check_mk
Branch: master
Commit: c0563e578efb9360686945e8d3d07f16db237cd8
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c0563e578efb93…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Oct 27 15:41:07 2011 +0200
FIX: printer_alerts: handle 0-entries of Brother printers
---
ChangeLog | 1 +
checks/printer_alerts | 2 ++
2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index b399e4f..5ebcb98 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -29,6 +29,7 @@
1.1.12p1:
Checks & Agents:
* FIX: mk_oracle now also detects XE databases
+ * FIX: printer_alerts: handle 0-entries of Brother printers
1.1.12:
diff --git a/checks/printer_alerts b/checks/printer_alerts
index 7841171..824001c 100644
--- a/checks/printer_alerts
+++ b/checks/printer_alerts
@@ -70,6 +70,8 @@ def inventory_printer_alerts(info):
return [ (None, None) ]
def check_printer_alerts(_not_used, _not_used1, info):
+ # Filter out empty status lines (e.g. sent by Brother printers)
+ info = [ i for i in info if i != [ "1", "0", "0",
"0", "" ] ]
if not info:
return (0, 'OK - No alerts present')