Module: check_mk
Branch: master
Commit: fff4b03b9b88871db08ca7cfad986b781ef39fe9
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fff4b03b9b8887…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Nov 27 10:41:43 2015 +0100
#2778 FIX Fixed correct scaling of sidebar on newer versions of Chrome browser
---
.werks/2778 | 9 +++++++++
ChangeLog | 1 +
web/htdocs/js/sidebar.js | 5 ++++-
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/.werks/2778 b/.werks/2778
new file mode 100644
index 0000000..8c9cc7c
--- /dev/null
+++ b/.werks/2778
@@ -0,0 +1,9 @@
+Title: Fixed correct scaling of sidebar on newer versions of Chrome browser
+Level: 1
+Component: multisite
+Compatible: compat
+Version: 1.2.7i4
+Date: 1448617270
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index cae7f8c..33cb10a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -135,6 +135,7 @@
* 2762 FIX: Fixed formating of check_http when using "clickable URL" option
* 2772 FIX: Fixed possible exception in icon column when showing some actions in the column...
* 2846 FIX: View refresh could reset checkboxes on views where "always show checkboxes" is enabled
+ * 2778 FIX: Fixed correct scaling of sidebar on newer versions of Chrome browser
WATO:
* 2442 WATO remove host: improved cleanup of obsolete host files...
diff --git a/web/htdocs/js/sidebar.js b/web/htdocs/js/sidebar.js
index 2d64cf3..c17ec7a 100644
--- a/web/htdocs/js/sidebar.js
+++ b/web/htdocs/js/sidebar.js
@@ -408,7 +408,10 @@ function setSidebarHeight() {
if (isWebkit()) {
var oldcols = parent.document.body.cols.split(",");
var oldwidth = parseInt(oldcols[0]);
- var width = oHeader.clientWidth;
+ var width = parent.frames[0].pageWidth();
+ // Note: previously this was "var width = oHeader.clientWidth;" and worked
+ // fine. It stopped working - probably with new Chrome versions. We do not
+ // know yet if the new way also works on old Chrome versions.
var target_width = parseInt(oldwidth * 280.0 / width);
var newcols = target_width.toString() + ",*";
parent.document.body.cols = newcols;
Module: check_mk
Branch: master
Commit: fa8a2b19401f49c23c2bda1421829a5aa44e9a8e
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fa8a2b19401f49…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Nov 26 15:51:03 2015 +0100
#2803 netapp_api_volumes: clustered volumes now longer show the current node name in the service description
Previously, the volume checks went UNKNOWN on a cluster failover.
The service description for clustered volumes has changed from <i>"{node}.{volume_name}"</i> to <i>"{volume_name}"</i>.
---
.werks/2803 | 10 ++++++++++
ChangeLog | 2 ++
agents/special/agent_netapp | 4 +++-
checks/netapp_api_volumes | 9 +++++++--
4 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/.werks/2803 b/.werks/2803
new file mode 100644
index 0000000..86d6bda
--- /dev/null
+++ b/.werks/2803
@@ -0,0 +1,10 @@
+Title: netapp_api_volumes: clustered volumes now longer show the current node name in the service description
+Level: 1
+Component: checks
+Compatible: incomp
+Version: 1.2.7i4
+Date: 1448549213
+Class: feature
+
+Previously, the volume checks went UNKNOWN on a cluster failover.
+The service description for clustered volumes has changed from <i>"{node}.{volume_name}"</i> to <i>"{volume_name}"</i>.
diff --git a/ChangeLog b/ChangeLog
index 7701a7b..cae7f8c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -48,6 +48,8 @@
* 2840 barracuda_mail_latency, barracuda_mailqueues, barracuda_system_cpu_util: new checks for Barracuda SPAM Firewall Appliance...
* 2865 fortigate_memory_base: added check for fortigate firewall memory usage...
* 2841 emcvnx_writecache: the check monitors the write cache state of the storage processors of an EMC VNX Storage System
+ * 2803 netapp_api_volumes: clustered volumes now longer show the current node name in the service description...
+ NOTE: Please refer to the migration notes!
* 2660 FIX: fixed windows agent using the wrong working directory...
* 2664 FIX: ps: Speedup in situation with many matching processes...
* 2661 FIX: windows agent: fixed incomplete process list...
diff --git a/agents/special/agent_netapp b/agents/special/agent_netapp
index fc2b14a..01f74ca 100755
--- a/agents/special/agent_netapp
+++ b/agents/special/agent_netapp
@@ -79,7 +79,7 @@ OPTIONS:
user = None
secret = None
-opt_timeout = 60
+opt_timeout = 120
opt_debug = False
opt_dump_xml = False
opt_no_counters = []
@@ -519,12 +519,14 @@ if netapp_mode == "clustermode":
"volume-state-attributes.state",
"volume-id-attributes.name",
"volume-id-attributes.node",
+ "volume-id-attributes.msid",
"volume-inode-attributes.files-total",
"volume-inode-attributes.files-used" ],
config_rename = { "volume-space-attributes.size-available": "size-available",
"volume-space-attributes.size-total" : "size-total",
"volume-state-attributes.state" : "state",
"volume-id-attributes.name" : "name",
+ "volume-id-attributes.msid" : "msid",
"volume-id-attributes.node" : "node",
"volume-inode-attributes.files-total" : "files-total",
"volume-inode-attributes.files-used" : "files-used" },
diff --git a/checks/netapp_api_volumes b/checks/netapp_api_volumes
index 6d88c59..6cb088c 100644
--- a/checks/netapp_api_volumes
+++ b/checks/netapp_api_volumes
@@ -36,9 +36,14 @@ def parse_netapp_api_volumes(info):
tokens = element.split(" ", 1)
volume[tokens[0]] = tokens[1]
- # In clustermode the name is composed out of node.name
+ # Clustermode specific
if "node" in volume:
- name = "%s.%s" % (volume["node"], volume["name"])
+ # There are cluster volumes and volumes which only exist on the node.
+ if "msid" not in volume:
+ name = "%s.%s" % (volume["node"], volume["name"])
+ else:
+ name = volume["name"]
+
volumes[name] = volume
return volumes
Module: check_mk
Branch: master
Commit: dfc1bc39d772060ace4e165a5aa352d1b1516cd3
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=dfc1bc39d77206…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Thu Nov 26 13:03:06 2015 +0100
new check emcvnx_writecache
---
checkman/emcvnx_writecache | 20 +++++++++++++++++
checks/emcvnx_writecache | 51 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 71 insertions(+)
diff --git a/checkman/emcvnx_writecache b/checkman/emcvnx_writecache
new file mode 100644
index 0000000..95f5ff7
--- /dev/null
+++ b/checkman/emcvnx_writecache
@@ -0,0 +1,20 @@
+title: EMC VNX Storage: Write Cache State
+agents: emc
+catalog: hw/storagehw/emc
+license: GPL
+distribution: check_mk
+description:
+ This check monitors the write cache state of storage processors of an
+ EMC VNX storage system.
+
+ The information is retrieved by the special agent agent_emcvnx which uses
+ EMC's command line tool naviseccli.
+
+ The state is OK, if the write cache state of a storage processor is enabled,
+ otherwise it will be CRIT.
+
+item:
+ The storage processor identifier.
+
+inventory:
+ One service per storage processor is created.
diff --git a/checks/emcvnx_writecache b/checks/emcvnx_writecache
new file mode 100644
index 0000000..99e2b8f
--- /dev/null
+++ b/checks/emcvnx_writecache
@@ -0,0 +1,51 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2015 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-
+# ails. 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.
+
+# <<<emcvnx_writecache>>>
+# SPA Write Cache State Enabled
+# SPB Write Cache State Enabled
+
+
+def inventory_emcvnx_writecache(info):
+ return [ (line[0], None) for line in info ]
+
+
+def check_emcvnx_writecache(item, params, info):
+ map_state = {
+ "Enabled" : (0, "enabled"),
+ "Disabled" : (2, "disabled"),
+ }
+ for line in info:
+ if line[0] == item:
+ state, state_readable = map_state.get(line[-1], (3, "unknown"))
+ return state, "State: %s" % state_readable
+
+
+check_info['emcvnx_writecache'] = {
+ 'inventory_function' : inventory_emcvnx_writecache,
+ 'check_function' : check_emcvnx_writecache,
+ 'service_description' : 'Write Cache State %s',
+}
Module: check_mk
Branch: master
Commit: 32fe024949b2627519ab45600a006f1bb0bd4c7f
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=32fe024949b262…
Author: Sebastian Herbord <sh(a)mathias-kettner.de>
Date: Thu Nov 26 08:43:40 2015 +0100
#2865 fortigate_memory_base: added check for fortigate firewall memory usage
The fortigate_memory check uses data provided by a more "generic" fortinet mib, this one uses the
fortigate mib. Apparently a device provides only one of the two mibs so there shouldn't be a
collision.
---
.werks/2865 | 11 +++++++
ChangeLog | 1 +
checkman/fortigate_memory_base | 20 +++++++++++++
checks/fortigate_memory_base | 65 ++++++++++++++++++++++++++++++++++++++++
4 files changed, 97 insertions(+)
diff --git a/.werks/2865 b/.werks/2865
new file mode 100644
index 0000000..00f4144
--- /dev/null
+++ b/.werks/2865
@@ -0,0 +1,11 @@
+Title: fortigate_memory_base: added check for fortigate firewall memory usage
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i4
+Date: 1448523674
+Class: feature
+
+The fortigate_memory check uses data provided by a more "generic" fortinet mib, this one uses the
+fortigate mib. Apparently a device provides only one of the two mibs so there shouldn't be a
+collision.
diff --git a/ChangeLog b/ChangeLog
index 1b8143f..993396e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -46,6 +46,7 @@
* 2838 raritan_px_outlets: monitors the voltage, current, power, apparent power and energy of Raritan PX Devices
* 2839 raritan_px_sensors, raritan_px_sensors.binary, raritan_px_sensors.humidity: monitors the temperature, contact and humidity of Raritan PX Devices
* 2840 barracuda_mail_latency, barracuda_mailqueues, barracuda_system_cpu_util: new checks for Barracuda SPAM Firewall Appliance...
+ * 2865 fortigate_memory_base: added check for fortigate firewall memory usage...
* 2660 FIX: fixed windows agent using the wrong working directory...
* 2664 FIX: ps: Speedup in situation with many matching processes...
* 2661 FIX: windows agent: fixed incomplete process list...
diff --git a/checkman/fortigate_memory_base b/checkman/fortigate_memory_base
new file mode 100644
index 0000000..b5cd642
--- /dev/null
+++ b/checkman/fortigate_memory_base
@@ -0,0 +1,20 @@
+title: FortiGate firewalls: RAM Usage
+agents: snmp
+catalog: hw/network/fortinet
+license: GPL
+distribution: check_mk
+description:
+ This check monitors the used memory on fortigate firewalls
+ which support the FORTINET-FORTIGATE-MIB.
+inventory:
+ One service will be created
+
+[parameters]
+warning (int): Minimum memory usage in percent for warning level
+crit (int): Minimum memory usage in percent for critical level
+
+[configuration]
+fortigate_memory_base_default_levels = (int, int): The default levels for all checks of this kind.
+
+perfdata:
+ current memory usage
diff --git a/checks/fortigate_memory_base b/checks/fortigate_memory_base
new file mode 100644
index 0000000..77e0a95
--- /dev/null
+++ b/checks/fortigate_memory_base
@@ -0,0 +1,65 @@
+#!/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-
+# ails. 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.
+
+fortigate_memory_base_default_levels = (70, 80)
+
+def inventory_fortigate_memory_base(info):
+ if info:
+ return [(None, "fortigate_memory_base_default_levels")]
+
+def check_fortigate_memory_base(item, params, info):
+ if type(params) == dict:
+ params = params["levels"]
+
+ warn, crit = map(abs, params)
+
+ percent = int(info[0][0])
+ state = 0
+ icon = ''
+ if percent >= warn:
+ state = 1
+ icon = "(!)"
+ if percent >= crit:
+ state = 2
+ icon = "(!!)"
+
+ capacity = int(info[0][1]) * 1024
+ used = (percent * capacity) / 100
+
+ perf = [("mem_used", used, (warn * capacity) / 100, (crit * capacity) / 100, 0, capacity)]
+ return state, "%d%%%s (warn/crit at %d%%/%d%%)" % (percent, icon, warn, crit), perf
+
+check_info["fortigate_memory_base"] = {
+ "check_function" : check_fortigate_memory_base,
+ "inventory_function" : inventory_fortigate_memory_base,
+ "service_description" : "Memory usage",
+ "has_perfdata" : True,
+ "group" : "memory",
+ "snmp_scan_function" : lambda oid: ".1.3.6.1.4.1.12356.101.1" in oid(".1.3.6.1.2.1.1.2.0"),
+ "snmp_info" : ( ".1.3.6.1.4.1.12356.101.4.1", [4, # fgSysMemUsage
+ 5]), # fgSysMemCapacity
+}
+
Module: check_mk
Branch: master
Commit: 816dfab3acb841a3f3c2c564ba667538efbeb7f7
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=816dfab3acb841…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Nov 25 17:02:36 2015 +0100
New function for logging in a virtual super user
This is needed for pages without authentication that do
Livestatus queries
---
web/htdocs/config.py | 28 ++++++++++++++++++++++++++++
web/htdocs/livestatus.py | 2 +-
2 files changed, 29 insertions(+), 1 deletion(-)
diff --git a/web/htdocs/config.py b/web/htdocs/config.py
index 0ed491c..3a399d1 100644
--- a/web/htdocs/config.py
+++ b/web/htdocs/config.py
@@ -276,6 +276,34 @@ def login(u):
# load current on/off-switching states of sites
read_site_config()
+# Login a user that has all permissions. This is needed for making
+# Livestatus queries from unauthentiated page handlers
+def login_super_user():
+ global user_id
+ user_id = None
+
+ global user_role_ids
+ user_role_ids = []
+
+ global user_baserole_ids
+ user_baserole_ids = [ "admin" ]
+
+ global user_baserole_id
+ user_baserole_id = "admin"
+
+ # Prepare user object
+ global user, user_alias
+ user = { "roles" : "admin" }
+ user_alias = "Superuser for unauthenticated pages"
+
+ # Prepare cache of already computed permissions
+ global user_permissions
+ user_permissions = {}
+
+ # All sites are enabled
+ global user_siteconf
+ user_siteconf = {}
+
def set_user_confdir(user_id):
global user_confdir
user_confdir = config_dir + "/" + user_id.encode("utf-8")
diff --git a/web/htdocs/livestatus.py b/web/htdocs/livestatus.py
index fb6865c..e5c75ae 100644
--- a/web/htdocs/livestatus.py
+++ b/web/htdocs/livestatus.py
@@ -386,7 +386,7 @@ class SingleSiteConnection(BaseConnection, Helpers):
def set_auth_user(self, domain, user):
if user:
self.auth_users[domain] = user
- else:
+ elif domain in self.auth_users:
del self.auth_users[domain]
# Switch future request to new authorization domain