I had a look at the code and found the following strange comments
The referenced file is ~/lib/python/cmk_base/snmp.py
- version inspected was 1.6.0p16 - it should be not relevant if it is Enterprise or Raw
Starting Line 267
# Contextes can only be used when check_plugin_name is given.
...
# get_single_oid() can only return a single value. When SNMPv3 is used with multiple
# SNMP contexts, all contextes will be queried until the first answer is received.
if check_plugin_name is not None and snmp_utils.is_snmpv3_host(snmp_config):
snmp_contexts = _snmpv3_contexts_of(snmp_config, check_plugin_name)
else:
snmp_contexts = [None]
console.vverbose(" Getting OID %s: " % oid)
for context_name in snmp_contexts:
try:
snmp_backend = SNMPBackendFactory().factory(snmp_config,
enforce_stored_walks=_enforce_stored_walks)
value = snmp_backend.get(snmp_config, oid, context_name)
if value is not None:
break # Use first received answer in case of multiple contextes
except:
if cmk.utils.debug.enabled():
raise
value = None
The first comment is what i find strange - why?
I have here no devices to test but on thing i would test if possible is the following.
change the following line
if check_plugin_name is not None and snmp_utils.is_snmpv3_host(snmp_config):
to
if snmp_utils.is_snmpv3_host(snmp_config):
After this change it is important to test if not only the scan is working but also the checking.
I would do this first on the command line after the change with.
cmk --debug -vvI device
and
cmk --debug -vvn device
After i read a little bit inside the source a found no reason why you cannot use the context for scan.