[checkmk-commits] Check_MK Git: check_mk: ntp/ntp. time parameters are now configurable via WATO

git version control git at mathias-kettner.de
Wed Oct 10 15:25:27 CEST 2012


Module: check_mk
Branch: master
Commit: 25a1a93d15f74c373dec9c277be696cc1d009bf1
URL:    http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=25a1a93d15f74c373dec9c277be696cc1d009bf1

Author: Lars Michelsen <lm at mathias-kettner.de>
Date:   Wed Oct 10 15:25:26 2012 +0200

ntp/ntp.time parameters are now configurable via WATO

---

 ChangeLog                            |    1 +
 checks/ntp                           |    3 +++
 web/plugins/wato/check_parameters.py |   31 ++++++++++++++++++++++++++++++-
 3 files changed, 34 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 82f49b7..cf16cc7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -41,6 +41,7 @@
     WATO:
     * Added progress indicator in single site WATO "Activate Changes"
     * Users & Contacts: Case-insensitive sorting of 'Full name' column
+    * ntp/ntp.time parameters are now configurable via WATO
     * FIX: Implemented basic non HTTP 200 status code response handling in interactive
            progress dialogs (e.g. bulk inventory mode)
     * FIX: Fixed editing of icon_image rules
diff --git a/checks/ntp b/checks/ntp
index 2fa39ae..ee3bc80 100644
--- a/checks/ntp
+++ b/checks/ntp
@@ -153,4 +153,7 @@ def check_ntp_summary(item, params, info):
     return (2, "CRIT - found %d peers, but none is suitable" % len(info))
 
 check_info['ntp']       = (check_ntp,         "NTP Peer %s", 1, inventory_ntp)
+checkgroup_of['ntp'] = 'ntp_time'
+
 check_info['ntp.time']  = (check_ntp_summary, "NTP Time",    1, inventory_ntp_summary)
+checkgroup_of['ntp.time'] = 'ntp_time'
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index 4cc68e9..9a2b960 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -321,7 +321,7 @@ checkgroups.append((
 checkgroups.append((
    subgroup_os,
     "systemtime",
-    _("System time offset"),
+    _("Windows system time offset"),
     Tuple(
         title = _("Time offset"),
         elements = [
@@ -1718,6 +1718,35 @@ checkgroups.append((
         help = _("The identificator of the themal sensor.")),
     "first"))
 
+checkgroups.append((
+   subgroup_os,
+    "ntp_time",
+    _("State of NTP time synchronisation"),
+    Tuple(
+        elements = [
+            Integer(
+                title = _("Max. allowed stratum"),
+                default_value = 10,
+                help = _("The stratum (\"distance\" to the reference clock) at which the check gets critical."),
+            ),
+            Float(
+                title = _("Warning at"),
+                unit = _("Miliseconds"),
+                default_value = 200.0,
+                help = _("The offset in ms at which a warning state is triggered."),
+            ),
+            Float(
+                title = _("Critical at"),
+                unit = _("Miliseconds"),
+                default_value = 500.0,
+                help = _("The offset in ms at which a critical state is triggered."),
+            ),
+        ]
+    ),
+    None,
+    "first"
+))
+
 # Create rules for check parameters of inventorized checks
 for subgroup, checkgroup, title, valuespec, itemspec, matchtype in checkgroups:
     if not valuespec:



More information about the checkmk-commits mailing list