Module: check_mk
Branch: master
Commit: 7953e0cf959fd75abd444c25e45ad671d2beebfd
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7953e0cf959fd7…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Tue Sep 10 11:57:02 2013 +0200
automation: snmp scan: adhere rule snmp_without_sys_descr
---
ChangeLog | 2 ++
modules/automation.py | 15 ++++++++-------
2 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 5cf7d51..9e63238 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -172,6 +172,8 @@
inherited values
* FIX: Changed several forms from GET to POST to prevent "Request-URI too
large" error messages during submitting forms
+ * FIX: automation snmp scan now adhere rules for shoddy snmp devices
+ which have no sys description
Notifications:
* Flexible Notification can now filter service levels
diff --git a/modules/automation.py b/modules/automation.py
index 99d71f8..00c6674 100644
--- a/modules/automation.py
+++ b/modules/automation.py
@@ -201,13 +201,14 @@ def automation_try_inventory_node(hostname):
if cn in existing_checks:
found_services += make_inventory(cn, [hostname], True, True)
else:
- sys_descr = get_single_oid(hostname, ipaddress,
".1.3.6.1.2.1.1.1.0")
- if sys_descr != None:
- found_services = do_snmp_scan([hostname], True, True)
- else:
- raise MKSNMPError("Cannot get system description via SNMP.
"
- "SNMP agent is not responding. Probably wrong
"
- "community or wrong SNMP version.")
+ if not in_binary_hostlist(hostname, snmp_without_sys_descr):
+ sys_descr = get_single_oid(hostname, ipaddress,
".1.3.6.1.2.1.1.1.0")
+ if sys_descr == None:
+ raise MKSNMPError("Cannot get system description via SNMP.
"
+ "SNMP agent is not responding. Probably
wrong "
+ "community or wrong SNMP version.")
+
+ found_services = do_snmp_scan([hostname], True, True)
except Exception, e:
if not dual_host: