Module: check_mk
Branch: master
Commit: 999f238ba8b8382f89a951678b8f7d58d0a55362
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=999f238ba8b838…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Thu Feb 26 15:06:56 2015 +0100
#1223 FIX Fixed manual configuration of ntp peer check
The ntp peer check can now be configured using wato. Just use the rule "State of NTP
peer" instead "State of NTP time synchronisation".
---
.werks/1223 | 11 +++++++++++
ChangeLog | 1 +
checks/ntp | 2 +-
web/plugins/wato/check_parameters.py | 24 ++++++++++++++++++------
4 files changed, 31 insertions(+), 7 deletions(-)
diff --git a/.werks/1223 b/.werks/1223
new file mode 100644
index 0000000..68267b9
--- /dev/null
+++ b/.werks/1223
@@ -0,0 +1,11 @@
+Title: Fixed manual configuration of ntp peer check
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1424959497
+
+The ntp peer check can now be configured using wato. Just use the rule "State of NTP
peer" instead "State of NTP time synchronisation".
+
diff --git a/ChangeLog b/ChangeLog
index 3bc4700..6850611 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -281,6 +281,7 @@
* 2003 FIX: Fix saving of "Users are allowed to directly login into the Web GUI
of this site"...
* 2010 FIX: Improved error message when trying to add group assignment rule without
having a group configured
* 1946 FIX: WATO Web-API: edit host action does no longer unset all unspecified
attributes...
+ * 1223 FIX: Fixed manual configuration of ntp peer check...
Notifications:
* 1662 notification plugin spectrum: finalized script. now able to handle host
notications
diff --git a/checks/ntp b/checks/ntp
index e1634f8..1e98f95 100644
--- a/checks/ntp
+++ b/checks/ntp
@@ -159,7 +159,7 @@ check_info["ntp"] = {
'inventory_function': inventory_ntp,
'service_description': 'NTP Peer %s',
'has_perfdata': True,
- 'group': 'ntp_time',
+ 'group': 'ntp_peer',
}
check_info["ntp.time"] = {
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index f3e5f49..8314bfa 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -6041,11 +6041,7 @@ register_check_parameters(
help = _("The identifier of the thermal sensor.")),
"dict"
)
-
-register_check_parameters(
- subgroup_os,
- "ntp_time",
- _("State of NTP time synchronisation"),
+ntp_params = \
Tuple(
elements = [
Integer(
@@ -6066,11 +6062,27 @@ register_check_parameters(
help = _("The offset in ms at which a critical state is
triggered."),
),
]
- ),
+ )
+
+register_check_parameters(
+ subgroup_os,
+ "ntp_time",
+ _("State of NTP time synchronisation"),
+ ntp_params,
None,
"first"
)
+register_check_parameters(
+ subgroup_os,
+ "ntp_peer",
+ _("State of NTP peer"),
+ ntp_params,
+ TextAscii(
+ title = _("Name of the peer")),
+ "first"
+)
+
def apc_convert_from_tuple(params):
if type(params) in (list, tuple):
params = { "levels": params}