Module: check_mk
Branch: master
Commit: 548b13de0e9bfeb2056364fb029c4a496ac00ca2
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=548b13de0e9bfe…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Jan 23 14:50:44 2014 +0100
FIX printer_supply_ricoh: now reports correct filling levels
The level is taken from the OID: .1.3.6.1.4.1.367.3.2.1.2.24.1.1.5
C+:
;; *************** Ricoh MIB ***************
...
[TONERCurLevel]
1.3.6.1.4.1.367.3.2.1.2.24.1.1.5=1
C-:
---
.werks/264 | 17 +++++++++++++++++
ChangeLog | 1 +
checks/printer_supply_ricoh | 7 +++----
3 files changed, 21 insertions(+), 4 deletions(-)
diff --git a/.werks/264 b/.werks/264
new file mode 100644
index 0000000..350ce27
--- /dev/null
+++ b/.werks/264
@@ -0,0 +1,17 @@
+Title: printer_supply_ricoh: now reports correct filling levels
+Level: 1
+Component: checks
+Class: fix
+State: unknown
+Version: 1.2.5i1
+Date: 1390484833
+
+The level is taken from the OID: .1.3.6.1.4.1.367.3.2.1.2.24.1.1.5
+
+C+:
+;; *************** Ricoh MIB ***************
+...
+[TONERCurLevel]
+1.3.6.1.4.1.367.3.2.1.2.24.1.1.5=1
+C-:
+
diff --git a/ChangeLog b/ChangeLog
index 0a38083..f8cb1d0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -131,6 +131,7 @@
* 0260 FIX: Fixed incorrect formatting of checks with long output...
* 0261 FIX: df_netapp32 / df_netapp: Fixed bug with negative size in check output...
* 0262 FIX: ps: Now able to skip disabled "Process Inventory" rules...
+ * 0264 FIX: printer_supply_ricoh: now reports correct filling levels...
Multisite:
* 0371 Added log class filter to hostsvcevents view
diff --git a/checks/printer_supply_ricoh b/checks/printer_supply_ricoh
index 6dbe912..0a619c4 100644
--- a/checks/printer_supply_ricoh
+++ b/checks/printer_supply_ricoh
@@ -37,14 +37,13 @@ def check_printer_supply_ricoh(item, params, info):
state = 0
label = ""
level = saveint(line[1])
- remaining = 100 - level
- if remaining < crit:
+ if level < crit:
state = 2
label = "(!!)"
- elif remaining < warn:
+ elif level < warn:
state = 1
label = "(!)"
- message = "Remaining: %s%%%s (levels at %d%%/%d%%) " % (remaining,
label, warn, crit)
+ message = "Remaining: %s%%%s (levels at %d%%/%d%%) " % (level,
label, warn, crit)
perfdata = [ ("level", level, warn, crit, 0, 100)]
return (state, message, perfdata)
return(3, "Ukn: Supply not found in SNMP data")