Module: check_mk
Branch: master
Commit: 90624e60d4bd44da15bada5db48437f1098af23d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=90624e60d4bd44…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sun Oct 30 08:50:51 2011 +0100
Fix rule if_disable_if64_check
---
modules/check_mk.py | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/modules/check_mk.py b/modules/check_mk.py
index b962349..5162bd8 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -717,6 +717,12 @@ def get_single_oid(hostname, ipaddress, oid):
return value
def snmp_scan(hostname, ipaddress):
+ # Make hostname globally available for scan functions.
+ # This is rarely used, but e.g. the scan for if/if64 needs
+ # this to evaluate if_disabled_if64_checks.
+ global g_hostname
+ g_hostname = hostname
+
if opt_verbose:
sys.stdout.write("Scanning host %s(%s) for SNMP checks..." % (hostname,
ipaddress))
sys_descr = get_single_oid(hostname, ipaddress, ".1.3.6.1.2.1.1.1.0")