Module: check_mk
Branch: master
Commit: 3a9834dd1b59948b1b651ca35119d6becc28736f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3a9834dd1b5994…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu May 12 08:27:30 2011 +0200
FIX: hr_mem: ignore devices that report zero memory
---
ChangeLog | 1 +
checks/hr_mem | 3 ++-
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index abecf8f..4776800 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -48,6 +48,7 @@
* Allow moving hosts from one to another config file
Checks & Agents:
+ * FIX: hr_mem: ignore devices that report zero memory
* FIX: cisco_power: fix syntax error in man page (broke also Multisite)
* FIX: local: fixed search for custom templates PNP template
* FIX: if/if64: always generate unique items (in case ifAlias is used)
diff --git a/checks/hr_mem b/checks/hr_mem
index 86ac031..2dc5032 100644
--- a/checks/hr_mem
+++ b/checks/hr_mem
@@ -34,7 +34,8 @@ def inventory_hr_mem(checktype, info):
for hrtype, hrdescr, hrunits, hrsize, hrused in info:
if hrtype in [ ".1.3.6.1.2.1.25.2.1.2",
".1.3.6.1.2.1.25.2.1.3" ]:
- return [(None, "memused_default_levels")]
+ if int(hrsize) > 0: # some device have zero (broken) values
+ return [(None, "memused_default_levels")]
def check_hr_mem(item, params, info):
usage = {}