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(