Module: check_mk
Branch: master
Commit: fad2266a8efde658fbabc7d22b6711bbce03bd8e
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fad2266a8efde6…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Feb 5 10:26:19 2015 +0100
#1936 FIX check_form_submit: fixed crash on certain form fields with unnamed input elements
---
.werks/1936 | 10 ++++++++++
ChangeLog | 1 +
doc/treasures/active_checks/check_form_submit | 5 ++++-
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/.werks/1936 b/.werks/1936
new file mode 100644
index 0000000..db65719
--- /dev/null
+++ b/.werks/1936
@@ -0,0 +1,10 @@
+Title: check_form_submit: fixed crash on certain form fields with unnamed input elements
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1423128338
+
+
diff --git a/ChangeLog b/ChangeLog
index b3059f6..340d9e4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -143,6 +143,7 @@
* 1931 FIX: agent_vsphere: no longer crashes when host has no license information
* 1932 FIX: check_http: Check SSL Certificate: did not work when SNI Option was set...
* 1975 FIX: check_bi_aggr: Ignoring proxy settings from environment now
+ * 1936 FIX: check_form_submit: fixed crash on certain form fields with unnamed input elements
Multisite:
* 1758 Improved exception hander: Shows details without additional debug request, added mailto link for error report...
diff --git a/doc/treasures/active_checks/check_form_submit b/doc/treasures/active_checks/check_form_submit
index 134c469..8b9f160 100755
--- a/doc/treasures/active_checks/check_form_submit
+++ b/doc/treasures/active_checks/check_form_submit
@@ -232,7 +232,10 @@ class FormParser(HTMLParser):
if self.current_form is None:
debug('Ignoring form field out of form tag')
else:
- self.current_form['elements'][attrs['name']] = attrs.get('value', '')
+ if 'name' in attrs:
+ self.current_form['elements'][attrs['name']] = attrs.get('value', '')
+ else:
+ debug('Ignoring form field without name %r' % attrs)
def handle_endtag(self, tag):
if tag == 'form':
Module: check_mk
Branch: master
Commit: e8a4e36e444d8ffb3ce4bcca49371ae2e515c2a9
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e8a4e36e444d8f…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Thu Feb 5 10:20:18 2015 +0100
#1222 mbg_lantime_ng_state: Support for the new Meinberg Lantime MIB (MBG-LANTIME-NG-MIB)
This new Checks supports the NG MIB on Meinberg Lantime devices.
The old version of the check (mbg_lantime_state) now also uses the same sourcecode base and benefits
from the new Wato option.
---
.werks/1222 | 12 +++++++++++
ChangeLog | 1 +
checks/mbg_lantime.include | 4 ++--
web/plugins/wato/check_parameters.py | 38 ++++++++++++++++++++++++++++++++++
4 files changed, 53 insertions(+), 2 deletions(-)
diff --git a/.werks/1222 b/.werks/1222
new file mode 100644
index 0000000..96b5b38
--- /dev/null
+++ b/.werks/1222
@@ -0,0 +1,12 @@
+Title: mbg_lantime_ng_state: Support for the new Meinberg Lantime MIB (MBG-LANTIME-NG-MIB)
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i1
+Date: 1423127749
+Class: feature
+
+This new Checks supports the NG MIB on Meinberg Lantime devices.
+The old version of the check (mbg_lantime_state) now also uses the same sourcecode base and benefits
+from the new Wato option.
+
diff --git a/ChangeLog b/ChangeLog
index 47cb51b..b3059f6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -74,6 +74,7 @@
* 1930 Windows agent: now able to unpack plugins.cap file (created by Check_MK agent bakery)...
* 1933 esx_vsphere_objects: now able to set a different alert level when the host/vm reports 'unknown'...
* 1860 df and other filesystem checks: process total fs size as perfdata...
+ * 1222 mbg_lantime_ng_state: Support for the new Meinberg Lantime MIB (MBG-LANTIME-NG-MIB)...
* 1457 FIX: logins: new check renamed from "users" check...
NOTE: Please refer to the migration notes!
* 1762 FIX: lnx_thermal: Now ignoring trip points with level 0...
diff --git a/checks/mbg_lantime.include b/checks/mbg_lantime.include
index 639350e..b942da5 100644
--- a/checks/mbg_lantime.include
+++ b/checks/mbg_lantime.include
@@ -72,7 +72,7 @@ def check_mbg_lantime_state_common(states, _no_item, params, info):
elif pos_refclock_offset >= warn:
state = 1
if state != 0:
- levels_text = " (warn/crit at %d/%d us)" % (warn, crit)
+ levels_text = " (warn/crit at %d/%d µs)" % (warn, crit)
perfdata = [('offset', refclock_offset, warn * 1000, crit * 1000)] # all in us
- yield state, 'Reference clock offset: %g us%s' % (refclock_offset, levels_text), perfdata
+ yield state, 'Reference clock offset: %g µs%s' % (refclock_offset, levels_text), perfdata
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index 470ae3b..aa8223f 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -6168,6 +6168,44 @@ register_check_parameters(
register_check_parameters(
subgroup_applications,
+ "mbg_lantime_state",
+ _("Meinberg Lantime State"),
+ Dictionary(
+ title = _("Meinberg Lantime State"),
+ elements = [
+ ("stratum", Tuple(
+ title = _("Warning levels for Stratum"),
+ elements = [
+ Integer(
+ title = _("Warning at"),
+ default_value = 1,
+ ),
+ Integer(
+ title = _("Critical at"),
+ default_value = 1,
+ ),
+ ])),
+ ("offset", Tuple(
+ title = _("Warning levels for Time Offset"),
+ elements = [
+ Integer(
+ title = _("Warning at"),
+ unit = _("microseconds"),
+ default_value = 1,
+ ),
+ Integer(
+ title = _("Critical at"),
+ unit = _("microseconds"),
+ default_value = 1,
+ ),
+ ])),
+ ]),
+ None,
+ "first"
+)
+
+register_check_parameters(
+ subgroup_applications,
"datacore_poolallocation",
_("Datacore: pool allocation"),
Tuple(