Module: check_mk
Branch: master
Commit: 8fddc8b6b29fc2130f658f3722f9760521e7f018
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8fddc8b6b29fc2…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Apr 7 10:45:25 2015 +0200
Fix exception about is_snmpv3_host on SNMP devices with Nagios core
---
modules/check_mk.py | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/modules/check_mk.py b/modules/check_mk.py
index 5e2823e..9382e32 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -2985,18 +2985,19 @@ no_discovery_possible = None
output.write("def clusters_of(hostname):\n return %r\n\n" %
clusters_of(hostname))
# snmp hosts
- output.write("def is_snmp_host(hostname):\n return %r\n\n" %
is_snmp_host(hostname))
- output.write("def is_tcp_host(hostname):\n return %r\n\n" %
is_tcp_host(hostname))
- output.write("def is_usewalk_host(hostname):\n return %r\n\n" %
is_usewalk_host(hostname))
+ output.write("def is_snmp_host(hostname):\n return % r\n\n" %
is_snmp_host(hostname))
+ output.write("def is_snmpv3_host(hostname):\n return % r\n\n" %
is_snmpv3_host(hostname))
+ output.write("def is_tcp_host(hostname):\n return % r\n\n" %
is_tcp_host(hostname))
+ output.write("def is_usewalk_host(hostname):\n return % r\n\n" %
is_usewalk_host(hostname))
if has_inline_snmp and use_inline_snmp:
- output.write("def is_snmpv2c_host(hostname):\n return %r\n\n" %
is_snmpv2c_host(hostname))
- output.write("def is_bulkwalk_host(hostname):\n return %r\n\n" %
is_bulkwalk_host(hostname))
- output.write("def snmp_timing_of(hostname):\n return %r\n\n" %
snmp_timing_of(hostname))
- output.write("def snmp_credentials_of(hostname):\n return %s\n\n" %
pprint.pformat(snmp_credentials_of(hostname)))
- output.write("def snmp_port_of(hostname):\n return %r\n\n" %
snmp_port_of(hostname))
+ output.write("def is_snmpv2c_host(hostname):\n return % r\n\n" %
is_snmpv2c_host(hostname))
+ output.write("def is_bulkwalk_host(hostname):\n return % r\n\n" %
is_bulkwalk_host(hostname))
+ output.write("def snmp_timing_of(hostname):\n return % r\n\n" %
snmp_timing_of(hostname))
+ output.write("def snmp_credentials_of(hostname):\n return % s\n\n" %
pprint.pformat(snmp_credentials_of(hostname)))
+ output.write("def snmp_port_of(hostname):\n return % r\n\n" %
snmp_port_of(hostname))
else:
- output.write("def snmp_port_spec(hostname):\n return %r\n\n" %
snmp_port_spec(hostname))
- output.write("def snmp_walk_command(hostname):\n return %r\n\n" %
snmp_walk_command(hostname))
+ output.write("def snmp_port_spec(hostname):\n return % r\n\n" %
snmp_port_spec(hostname))
+ output.write("def snmp_walk_command(hostname):\n return % r\n\n" %
snmp_walk_command(hostname))
# IP addresses
needed_ipaddresses = {}