Module: check_mk
Branch: master
Commit: b78b1a60d8d299c58537ee01c285bc81a14693c2
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b78b1a60d8d299…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Dec 3 10:32:14 2014 +0100
#1588 FIX Renamed SNMP communities rule to SNMP credentials
---
.werks/1588 | 9 +++++++++
ChangeLog | 1 +
modules/check_mk.py | 12 ++++++++++--
web/plugins/wato/check_mk_configuration.py | 4 ++--
4 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/.werks/1588 b/.werks/1588
new file mode 100644
index 0000000..473dc5e
--- /dev/null
+++ b/.werks/1588
@@ -0,0 +1,9 @@
+Title: Renamed SNMP communities rule to SNMP credentials
+Level: 1
+Component: wato
+Compatible: compat
+Version: 1.2.5i7
+Date: 1417599120
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 369b516..4f1e0ff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -119,6 +119,7 @@
* 1546 FIX: Fixed adding cluster nodes to new cluster in complain phase...
* 1556 FIX: WATO inventory ignores already inventorized checks which does not exist
anymore...
* 1576 FIX: SNMP Community host attribute is now visible for IE<=8...
+ * 1588 FIX: Renamed SNMP communities rule to SNMP credentials
Notifications:
* 1512 Bulk notification can now be grouped according to custom macro values...
diff --git a/modules/check_mk.py b/modules/check_mk.py
index e278ace..f1afbe8 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -4618,16 +4618,24 @@ def dump_host(hostname):
inline = "yes"
else:
inline = "no"
+
credentials = snmp_credentials_of(hostname)
+ if type(credentials) in [ str, unicode ]:
+ cred = "community: \'%s\'" % credentials
+ else:
+ cred = "credentials: '%s'" % ",
".join(credentials)
+
if is_bulkwalk_host(hostname):
bulk = "yes"
else:
bulk = "no"
+
portinfo = snmp_port_of(hostname)
if portinfo == None:
portinfo = 'default'
- agenttypes.append("SNMP (community: '%s', bulk walk: %s, port:
%s, inline: %s)" %
- (credentials, bulk, portinfo, inline))
+
+ agenttypes.append("SNMP (%s, bulk walk: %s, port: %s, inline: %s)"
%
+ (cred, bulk, portinfo, inline))
if is_ping_host(hostname):
agenttypes.append('PING only')
diff --git a/web/plugins/wato/check_mk_configuration.py
b/web/plugins/wato/check_mk_configuration.py
index caa2468..30fab55 100644
--- a/web/plugins/wato/check_mk_configuration.py
+++ b/web/plugins/wato/check_mk_configuration.py
@@ -2289,8 +2289,8 @@ register_rule(group,
])],
default_value = "public",
- title = _("SNMP communities of monitored hosts"),
- help = _("By default Check_MK uses the community \"public\" to
contact hosts via SNMP. This rule "
+ title = _("SNMP credentials of monitored hosts"),
+ help = _("By default Check_MK uses the community \"public\" to
contact hosts via SNMP v1/v2. This rule "
"can be used to customize the the credentials to be used when
contacting hosts via SNMP.")))
register_rule(group,