Module: check_mk
Branch: master
Commit: a0a964f99a6ab0ec24e9e64ef02b7aade2ac738d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a0a964f99a6ab0…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sun Feb 27 12:10:17 2011 +0100
SNMP scan: use hr_cpu *or* ucd_cpu_utilizatoin
---
ChangeLog | 2 ++
checks/hr_cpu | 6 +++++-
.../{check_mk-hr_df.php => check_mk-hr_fs.php} | 0
3 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 7a74094..dde512b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -13,6 +13,8 @@
for SNMP)
* FIX: df, hr_fs and other filesystem checks: fix bug if using
magic number.
+ * FIX: scan function avoids hr_cpu and ucd_cpu_utilization
+ at the same time
1.1.9i9:
diff --git a/checks/hr_cpu b/checks/hr_cpu
index 17ce48b..0fb1f6f 100644
--- a/checks/hr_cpu
+++ b/checks/hr_cpu
@@ -50,5 +50,9 @@ def check_hr_cpu(item, params, info):
check_info["hr_cpu"] = (check_hr_cpu, "CPU utilization", 1,
inventory_hr_cpu)
snmp_info["hr_cpu"] = ( ".1.3.6.1.2.1.25.3.3.1", [ 2 ] )
+
+# HOST-RESOURCES-MIB::hrSystemUptime.0
snmp_scan_functions["hr_cpu"] = lambda oid: \
- not not oid('.1.3.6.1.2.1.25.1.1.0') #
HOST-RESOURCES-MIB::hrSystemUptime.0
+ not not oid('.1.3.6.1.2.1.25.1.1.0') and not \
+ ("linux" in oid("1.3.6.1.2.1.1.1.0").lower()
+ and oid("1.3.6.1.4.1.2021.10.1.6.1"))
diff --git a/pnp-templates/check_mk-hr_df.php b/pnp-templates/check_mk-hr_fs.php
similarity index 100%
rename from pnp-templates/check_mk-hr_df.php
rename to pnp-templates/check_mk-hr_fs.php