Module: check_mk
Branch: master
Commit: 971cd2c67e75e67c6361b7526bb344312b6772a0
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=971cd2c67e75e6…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Fri Apr 25 10:07:16 2014 +0200
akcp_daisy_temp: New Check for akcp daisyTemp sensor chains
Further information about the sensor type can be found here: http://www.akcp.com/wp-content/uploads/2010/03/daisyTemp-sensor.pdf
---
.werks/156 | 8 +++++
ChangeLog | 1 +
checkman/akcp_daisy_temp | 30 ++++++++++++++++++
checks/akcp_daisy_temp | 74 +++++++++++++++++++++++++++++++++++++++++++
checks/akcp_sensor_humidity | 21 ++++++------
5 files changed, 122 insertions(+), 12 deletions(-)
diff --git a/.werks/156 b/.werks/156
new file mode 100644
index 0000000..8053af7
--- /dev/null
+++ b/.werks/156
@@ -0,0 +1,8 @@
+Title: akcp_daisy_temp: New Check for akcp daisyTemp sensor chains
+Level: 1
+Component: checks
+Version: 1.2.5i3
+Date: 1398413136
+Class: feature
+
+Further information about the sensor type can be found here: http://www.akcp.com/wp-content/uploads/2010/03/daisyTemp-sensor.pdf
diff --git a/ChangeLog b/ChangeLog
index 406284d..497efe2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -37,6 +37,7 @@
* 0896 wagner_titanus_topsense.airflow_deviation: New Check for Airflow Deviation in Wagner Titanus Top Sens devices
* 0897 wagner_titanus_topsense.temp: New Check for Temperature measured by Wagner Titanus Top Sens devices
* 0898 ibm_svc_nodestats.disk_latency, ibm_svc_systemstats.disk_latency: New Checks for Disk Latency in IBM SVC / Storwize V3700 / V7000 devices
+ * 0156 akcp_daisy_temp: New Check for akcp daisyTemp sensor chains...
* 0777 FIX: special agent emcvnx: did not work with security file authentication...
* 0786 FIX: zfsget: fixed compatibility with older Solaris agents...
* 0809 FIX: brocade_fcport: Fixed recently introduced problem with port speed detection
diff --git a/checkman/akcp_daisy_temp b/checkman/akcp_daisy_temp
new file mode 100644
index 0000000..8e5d782
--- /dev/null
+++ b/checkman/akcp_daisy_temp
@@ -0,0 +1,30 @@
+title: AKCP daisyTemp Sensor
+agents: snmp
+catalog: hw/environment/akcp
+license: GPL
+distribution:
+description:
+ This check monitors the temperature of sensors attached
+ to AKCP daisyTemp sensor chain. The first attached sensor will be irgnored,
+ because this sensor is already represented by the the check akc_sensor_temp.
+
+item:
+ The item is the sensor description of the sensor as string.
+
+perfdata:
+ the current temperature in degree celsius
+
+inventory:
+ All available (without the first, see description) temperature sensors are automatically inventorized.
+
+examples:
+ # set default levels for all akcp temperature sensors
+ akcp_daisy_temp_defaultlevels = (28, 34)
+
+[parameters]
+warning (int): temperature in degrees at which the check goes warning
+critical (int): level for critical temperature
+
+[configuration]
+akcp_daisy_temp_defaultlevels (int, int): Default levels. This is
+ preset to {(28, 32)}.
diff --git a/checks/akcp_daisy_temp b/checks/akcp_daisy_temp
new file mode 100644
index 0000000..9f5c54b
--- /dev/null
+++ b/checks/akcp_daisy_temp
@@ -0,0 +1,74 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2013 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.
+akcp_daisy_temp_defaultlevels = (28, 32)
+
+def inventory_akcp_daisy_temp(info):
+ inventory = []
+ pass_first = True
+ for port, subport, name, temp in info:
+ if subport != '-1':
+ # We have to ignore the first item, because it will be also reported
+ # by akcp_sensor_temp on the port were this sensor chain are connected
+ if pass_first:
+ pass_first = False
+ continue
+ inventory.append((name, 'akcp_daisy_temp_defaultlevels' ))
+ return inventory
+
+def check_akcp_daisy_temp(item, params, info):
+ for port, subport, name, temp in info:
+ if name == item:
+ warn, crit = params
+ temp = savefloat(temp) / 10
+ infotext = "%.1f °C " % temp
+ levels = " (warn/crit at %.1f/%.1f °C)" % (warn, crit)
+ perfdata = [ ( "temperature", temp, warn, crit ) ]
+ if temp > crit:
+ return 2, infotext + levels, perfdata
+ if temp > warn:
+ return 1, infotext + levels, perfdata
+ return 0, infotext
+ return 3, "Sensor not found"
+
+check_info["akcp_daisy_temp"] = {
+ 'check_function': check_akcp_daisy_temp,
+ 'inventory_function': inventory_akcp_daisy_temp,
+ 'service_description': 'Temperature %s',
+ 'has_perfdata': True,
+ 'snmp_info': (
+ ".1.3.6.1.4.1.3854.1.2.2.1.19.33",
+ [ 1, 2, 3, 4, 5, 6, 7 ],
+ [
+ OID_END, # Port/Subport
+ "2.1.1", # subport
+ "2.1.2", # Sensor Name
+ "2.1.14", # Degree Celsius
+ ]
+ ),
+ 'snmp_scan_function': lambda oid: oid(".1.3.6.1.2.1.1.2.0") in\
+ [ ".1.3.6.1.4.1.3854.1.2.2.1.1", ".1.3.6.1.4.1.3854.1" ],
+ 'group' : 'room_temperature',
+}
diff --git a/checks/akcp_sensor_humidity b/checks/akcp_sensor_humidity
index 085805e..dd817b9 100644
--- a/checks/akcp_sensor_humidity
+++ b/checks/akcp_sensor_humidity
@@ -25,7 +25,7 @@
# Boston, MA 02110-1301 USA.
# +------------------------------------------------------------------+
-# | This file has been contributed by: |
+# | The initial version of this file has been contributed by: |
# | |
# | Michael Nieporte <Michael.Nieporte(a)uk-essen.de> |
# +------------------------------------------------------------------+
@@ -36,7 +36,7 @@ def inventory_akcp_sensor_humidity(info):
inventory = []
for desc, humidity, status, online in info:
if online == "1":
- inventory.append( (desc, "", "akcp_sensor_humidity_defaultlevels") )
+ inventory.append( (desc, "akcp_sensor_humidity_defaultlevels") )
return inventory
def check_akcp_sensor_humidity(item, params, info):
@@ -52,14 +52,14 @@ def check_akcp_sensor_humidity(item, params, info):
( humidity, warnlow, critlow, warnhigh, crithigh)
perfdata = [ ( "humidity", humidity, critlow, warnlow, warnhigh, crithigh ) ]
if inthumidity <= critlow or inthumidity >= crithigh:
- return (2, "Humidity is: " + infotext, perfdata )
+ return 2, "Humidity is: " + infotext, perfdata
elif inthumidity <= warnlow or inthumidity >= warnhigh:
- return (1, "Humidity is: " + infotext, perfdata )
+ return 1, "Humidity is: " + infotext, perfdata
else:
- return (0, "Humidity is: " + infotext, perfdata )
+ return 0, "Humidity is: " + infotext, perfdata
else:
- return (3, "Sensor is offline")
- return (3, "Sensor not found")
+ return 3, "Sensor is offline"
+ return 3, "Sensor not found"
@@ -68,9 +68,6 @@ def check_akcp_sensor_humidity(item, params, info):
# noStatus(1), normal(2), highWarning(3), highCritical(4),
# lowWarning(5), lowCritical(6), sensorError(7)
-
-
-
check_info["akcp_sensor_humidity"] = {
'check_function': check_akcp_sensor_humidity,
'inventory_function': inventory_akcp_sensor_humidity,
@@ -84,7 +81,7 @@ check_info["akcp_sensor_humidity"] = {
5, #sensorProbeHumidityOnline - online(1), offline(2)
],
),
- 'snmp_scan_function': \
- lambda oid: "AKCP" in oid(".1.3.6.1.4.1.3854.1.1.6.0") and "sensorProbe" in oid(".1.3.6.1.4.1.3854.1.1.8.0"),
+ 'snmp_scan_function': lambda oid: oid(".1.3.6.1.2.1.1.2.0") in\
+ [ ".1.3.6.1.4.1.3854.1.2.2.1.1", ".1.3.6.1.4.1.3854.1" ],
'group': 'humidity',
}
. So in this case we do not inventorize them to avoid the check to break
Message-ID: <53593c79.R75gwvJ1TjBy5Rne%bs(a)mathias-kettner.de>
User-Agent: Heirloom mailx 12.4 7/29/08
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Module: check_mk
Branch: master
Commit: 541c74f7c85e9c8224589eaebecc12c1a5cd546e
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=541c74f7c85e9c…
Author: Bernd Stroessenreuther <bs(a)mathias-kettner.de>
Date: Thu Apr 24 18:31:04 2014 +0200
brocade_mlx_temp: BigIron RX devices have problems when queried by SNMPv2c bulk walk and do not deliver values. So in this case we do not inventorize them to avoid the check to break
---
checks/brocade_mlx_temp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/checks/brocade_mlx_temp b/checks/brocade_mlx_temp
index 306dff5..406f6c4 100644
--- a/checks/brocade_mlx_temp
+++ b/checks/brocade_mlx_temp
@@ -37,7 +37,11 @@ def inventory_brocade_mlx_temp(info):
inventory = []
for temp_descr, temp_id, temp_value in info:
temp_descr = compose_item(temp_id, temp_descr)
- if ((temp_descr, "brocade_mlx_temperature_default_levels") not in inventory):
+ # BigIron RX devices have problems when queried by SNMPv2c bulk walk and
+ # do not deliver values. So in this case we do not inventorize them to
+ # avoid the check to break
+ if ((temp_descr, "brocade_mlx_temperature_default_levels") not in inventory and \
+ temp_value != ""):
inventory.append( (temp_descr, "brocade_mlx_temperature_default_levels") )
return inventory
Module: check_mk
Branch: master
Commit: dde31d9ee70e08e5426988a4b6f940ac4305b675
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=dde31d9ee70e08…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Apr 24 14:52:19 2014 +0200
FIX Multisite context buttons: links in context buttons are no longer called twice
The "onclick" attribute in the context button (buttons at the top of a page) additionally
called the href link, which was already specified in the "href" attribute.
This could lead to raise conditions where transactions (saving a formular) were not handled correctly.
---
.werks/905 | 10 ++++++++++
ChangeLog | 1 +
web/htdocs/htmllib.py | 2 +-
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/.werks/905 b/.werks/905
new file mode 100644
index 0000000..0e0d7e0
--- /dev/null
+++ b/.werks/905
@@ -0,0 +1,10 @@
+Title: Multisite context buttons: links in context buttons are no longer called twice
+Level: 1
+Component: multisite
+Version: 1.2.5i3
+Date: 1398343626
+Class: fix
+
+The "onclick" attribute in the context button (buttons at the top of a page) additionally
+called the href link, which was already specified in the "href" attribute.
+This could lead to raise conditions where transactions (saving a formular) were not handled correctly.
diff --git a/ChangeLog b/ChangeLog
index 61b25d0..eeb39e7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -58,6 +58,7 @@
Multisite:
* 0779 Hostgroups (Summary): Empty hostgroups are no longer shown (can be re-enabled by filter)
* 0887 Add new column painter "Host Notifications Enabled"...
+ * 0905 FIX: Multisite context buttons: links in context buttons are no longer called twice...
WATO:
* 0784 Improved security of WATO bulk inventory by using transaction ids
diff --git a/web/htdocs/htmllib.py b/web/htdocs/htmllib.py
index 488852f..8957a97 100644
--- a/web/htdocs/htmllib.py
+++ b/web/htdocs/htmllib.py
@@ -382,7 +382,7 @@ class html:
if hover_title:
self.write(' title="%s"' % self.attrencode(hover_title))
if bestof:
- self.write(' onclick="count_context_button(this); document.location=this.href; " ')
+ self.write(' onclick="count_context_button(this); " ')
if fkey and self.keybindings_enabled:
title += '<div class=keysym>F%d</div>' % fkey
self.add_keybinding([html.F1 + (fkey - 1)], "document.location='%s';" % self.attrencode(url))
Module: check_mk
Branch: master
Commit: 12e870f9aaa178521b3f18cb81bcdacc83763afa
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=12e870f9aaa178…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Apr 24 13:15:20 2014 +0200
fixed exception when using the table search function
---
web/htdocs/table.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/web/htdocs/table.py b/web/htdocs/table.py
index 2bb03c4..7a4cef0 100644
--- a/web/htdocs/table.py
+++ b/web/htdocs/table.py
@@ -177,7 +177,7 @@ def end():
for row, css, state in rows:
if state == "header":
continue
- for cell_content, css_classes in row:
+ for cell_content, css_classes, colspan in row:
if search_term in cell_content.lower():
filtered_rows.append((row, css, state))
break # skip other cells when matched