Module: check_mk
Branch: master
Commit: 1505d23a22721163b5093c67dc7993c26722075d
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1505d23a227211…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Feb 15 11:35:21 2016 +0100
#3060 FIX Folder properties: Fixed exception when a user has no alias set
The "Network Scan" property caused the page to break when at least one
user had no alias set.
---
.werks/3060 | 11 +++++++++++
ChangeLog | 3 +++
web/plugins/wato/builtin_attributes.py | 2 +-
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/.werks/3060 b/.werks/3060
new file mode 100644
index 0000000..9ea1ab5
--- /dev/null
+++ b/.werks/3060
@@ -0,0 +1,11 @@
+Title: Folder properties: Fixed exception when a user has no alias set
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1455532388
+
+The "Network Scan" property caused the page to break when at least one
+user had no alias set.
diff --git a/ChangeLog b/ChangeLog
index d6ea0c8..3b3101e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,9 @@
Multisite:
* 3059 FIX: Fixed highlighting of availability timeline time slices
+ WATO:
+ * 3060 FIX: Folder properties: Fixed exception when a user has no alias set...
+
Event Console:
* 3058 FIX: Event Console is now allowing non loadable MIB modules on startup...
diff --git a/web/plugins/wato/builtin_attributes.py b/web/plugins/wato/builtin_attributes.py
index 95ca223..7c62661 100644
--- a/web/plugins/wato/builtin_attributes.py
+++ b/web/plugins/wato/builtin_attributes.py
@@ -141,7 +141,7 @@ register_hook('validate-host', validate_host_parents)
class NetworkScanAttribute(ValueSpecAttribute):
def __init__(self):
def get_all_user_ids():
- return [ (user_id, "%s (%s)" % (user_id, user["alias"]))
+ return [ (user_id, "%s (%s)" % (user_id, user.get("alias", user_id)))
for user_id, user in userdb.load_users(lock = False).items() ]
ValueSpecAttribute.__init__(self, "network_scan",
Module: check_mk
Branch: master
Commit: 8a71387f53d9627f359f9c2b11c14ff5cc2db5a7
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8a71387f53d962…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Feb 15 09:47:44 2016 +0100
Updated bug entries #2419
---
.bugs/2419 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.bugs/2419 b/.bugs/2419
index 6916b33..4ef7ea2 100644
--- a/.bugs/2419
+++ b/.bugs/2419
@@ -7,7 +7,7 @@ Class: bug
1. Create a new site in the CEE
2. omd config set CORE nagios
-3. cmk -R --> missing contact group check-mk-notiry
+3. cmk -R --> missing contact group check-mk-notify
When you now go in WATO (no need for changing something), it works
out. Seems that the default WATO configuration fixes that.
Module: check_mk
Branch: master
Commit: 37ce5b76c308efaba02342787bc0317fdcafdb2d
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=37ce5b76c308ef…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Mon Feb 15 08:58:23 2016 +0100
added new check
---
checks/aruba_wlc_aps | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 81 insertions(+)
diff --git a/checks/aruba_wlc_aps b/checks/aruba_wlc_aps
new file mode 100644
index 0000000..52f9d28
--- /dev/null
+++ b/checks/aruba_wlc_aps
@@ -0,0 +1,81 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2014 mk(a)mathias-kettner.de |
+# +------------------------------------------------------------------+
+#
+# This file is part of Check_MK.
+# The official homepage is at http://mathias-kettner.de/check_mk.
+#
+# check_mk is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation in version 2. check_mk is distributed
+# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
+# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE. See the GNU General Public License for more de-
+# tails. You should have received a copy of the GNU General Public
+# License along with GNU Make; see the file COPYING. If not, write
+# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+# Boston, MA 02110-1301 USA.
+
+
+# .1.3.6.1.4.1.14823.2.2.1.5.2.1.4.1.3.0.36.108.194.147.166 AP-NAME --> WLSX-WLAN-MIB::wlanAPName.'.$l...'
+# .1.3.6.1.4.1.14823.2.2.1.5.2.1.4.1.19.0.36.108.194.147.166 2 --> WLSX-WLAN-MIB::wlanAPStatus.'.$l...'
+# .1.3.6.1.4.1.14823.2.2.1.5.2.1.4.1.2.0.36.108.194.147.166 iii.jjj.kkk.lll --> WLSX-WLAN-MIB::wlanAPIpAddress.'.$l...'
+# .1.3.6.1.4.1.14823.2.2.1.5.2.1.4.1.4.0.36.108.194.147.166 GROUP --> WLSX-WLAN-MIB::wlanAPGroupName.'.$l...'
+# .1.3.6.1.4.1.14823.2.2.1.5.2.1.4.1.5.0.36.108.194.147.166 .1.3.6.1.4.1.14823.1.2.34 --> WLSX-WLAN-MIB::wlanAPModel.'.$l...'
+# .1.3.6.1.4.1.14823.2.2.1.5.2.1.4.1.6.0.36.108.194.147.166 XYZ --> WLSX-WLAN-MIB::wlanAPSerialNumber.'.$l...'
+# .1.3.6.1.4.1.14823.2.2.1.5.2.1.4.1.22.0.36.108.194.147.166 2 --> WLSX-WLAN-MIB::wlanAPUnprovisioned.'.$l...'
+# .1.3.6.1.4.1.14823.2.2.1.5.2.1.4.1.32.0.36.108.194.147.166 --> WLSX-WLAN-MIB::wlanAPSysLocation.'.$l...'
+
+
+def inventory_aruba_wlc_aps(info):
+ # Here we discover only provisioned aps which are up
+ return [ (line[0], None) for line in info \
+ if line[1] == "1" and line[2] != "1" ]
+
+
+def check_aruba_wlc_aps(item, params, info):
+ map_state = {
+ "1" : (0, "up"),
+ "2" : (2, "down"),
+ }
+ for ap_name, ap_status, ap_unprovisioned, ap_ip, ap_group, \
+ ap_model, ap_serial, ap_sysloc in info:
+ if item == ap_name:
+ state, state_readable = map_state[ap_status]
+ infotext = "Status: %s" % state_readable
+ if ap_group:
+ infotext += ", Group: %s" % ap_group
+ if ap_sysloc:
+ infotext += ", System location: %s" % ap_sysloc
+ yield state, infotext
+ if ap_unprovisioned == "1":
+ yield 1, "Unprovisioned: yes"
+
+
+check_info["aruba_wlc_aps"] = {
+ "inventory_function" : inventory_aruba_wlc_aps,
+ "check_function" : check_aruba_wlc_aps,
+ "service_description" : "AP %s",
+ "has_perfdata" : True,
+ # If you make changes here in snmp_info, don't forget to make
+ # these changes in the related inventory plugin, too.
+ "snmp_info" : ( ".1.3.6.1.4.1.14823.2.2.1.5.2.1.4.1",[
+ "3", # wlanAPName
+ "19", # wlanAPStatus
+ "22", # wlanAPUnprovisioned
+ "2", # wlanAPIpAddress
+ "4", # wlanAPGroupName
+ "5", # wlanAPModel
+ "6", # wlanAPSerialNumber
+ "32", # wlanAPSysLocation
+ ]),
+ "snmp_scan_function" : lambda oid: oid('.1.3.6.1.2.1.1.2.0').startswith(".1.3.6.1.4.1.14823.1.1"),
+}