retry_interval in second precision
Message-ID: <51aa2ab1.SSd/BkiyxZowkk8U%mk(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: 5965c75170359a272d1ed95ce9f2e5d82cc8e150
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5965c75170359a…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sat Jun 1 19:09:04 2013 +0200
Allow to configure check-/retry_interval in second precision
---
ChangeLog | 3 ++
web/plugins/wato/check_mk_configuration.py | 57 ++++++++++++++++------------
2 files changed, 35 insertions(+), 25 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index c6f7623..8052cde 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,6 +10,9 @@
performance value. This might not always be the one you like, but
its far better than nothing.
+ WATO:
+ * Allow to configure check-/retry_interval in second precision
+
Checks & Agents:
* lnx_if: Fixed crash on missing "Address" field
* viprinet_router: Now able to set required target state via rule
diff --git a/web/plugins/wato/check_mk_configuration.py
b/web/plugins/wato/check_mk_configuration.py
index f16ac04..8ef77b0 100644
--- a/web/plugins/wato/check_mk_configuration.py
+++ b/web/plugins/wato/check_mk_configuration.py
@@ -1072,28 +1072,32 @@ register_rule(group,
register_rule(group,
"extra_service_conf:check_interval",
- Integer(title = _("Normal check interval for service checks"),
- help = _("Check_MK usually uses an interval of one minute for the active
Check_MK "
- "check and for legacy checks. Here you can specify a larger
interval. Please "
- "note, that this setting only applies to active checks (those
with the "
- "%s reschedule button). If you want to change the check
interval of "
- "the Check_MK service only, specify
<tt><b>Check_MK$</b></tt> in the list "
- "of services.") % '<img class="icon docu"
src="images/icon_reload.gif">',
- minvalue = 1,
- label = _("minutes")),
+ Transform(
+ Age(minvalue=1, default_value=60),
+ forth = lambda v: int(v * 60),
+ back = lambda v: float(v) / 60.0,
+ title = _("Normal check interval for service checks"),
+ help = _("Check_MK usually uses an interval of one minute for the active
Check_MK "
+ "check and for legacy checks. Here you can specify a larger
interval. Please "
+ "note, that this setting only applies to active checks (those with
the "
+ "%s reschedule button). If you want to change the check interval of
"
+ "the Check_MK service only, specify
<tt><b>Check_MK$</b></tt> in the list "
+ "of services.") % '<img class="icon docu"
src="images/icon_reload.gif">'),
itemtype = "service")
register_rule(group,
"extra_service_conf:retry_interval",
- Integer(title = _("Retry check interval for service checks"),
- help = _("This setting is relevant if you have set the maximum number of
check "
- "attempts to a number greater than one. In case a service check
is not OK "
- "and the maximum number of check attempts is not yet reached,
it will be "
- "rescheduled with this interval. The retry interval is usually
set to a smaller "
- "value than the normal interval.<br><br>This
setting only applies to "
- "active checks."),
- minvalue = 1,
- label = _("minutes")),
+ Transform(
+ Age(minvalue=1, default_value=60),
+ forth = lambda v: int(v * 60),
+ back = lambda v: float(v) / 60.0,
+ title = _("Retry check interval for service checks"),
+ help = _("This setting is relevant if you have set the maximum number of
check "
+ "attempts to a number greater than one. In case a service check is
not OK "
+ "and the maximum number of check attempts is not yet reached, it
will be "
+ "rescheduled with this interval. The retry interval is usually set
to a smaller "
+ "value than the normal interval.<br><br>This setting
only applies to "
+ "active checks.")),
itemtype = "service")
register_rule(group,
@@ -1158,27 +1162,30 @@ register_rule(group,
register_rule(group,
"extra_host_conf:check_interval",
- Integer(
+ Transform(
+ Age(minvalue=1, default_value=60),
+ forth = lambda v: int(v * 60),
+ back = lambda v: float(v) / 60.0,
title = _("Normal check interval for host checks"),
help = _("The default interval is set to one minute. Here you can specify a
larger "
"interval. The host is contacted in this interval on a regular
base. The host "
"check is also being executed when a problematic service state is
detected to check "
- "wether or not the service problem is resulting from a host
problem."),
- minvalue = 1,
- label = _("minutes")
+ "wether or not the service problem is resulting from a host
problem.")
)
)
register_rule(group,
"extra_host_conf:retry_interval",
- Integer(title = _("Retry check interval for host checks"),
+ Transform(
+ Age(minvalue=1, default_value=60),
+ forth = lambda v: int(v * 60),
+ back = lambda v: float(v) / 60.0,
+ title = _("Retry check interval for host checks"),
help = _("This setting is relevant if you have set the maximum number of
check "
"attempts to a number greater than one. In case a host check is not
UP "
"and the maximum number of check attempts is not yet reached, it
will be "
"rescheduled with this interval. The retry interval is usually set
to a smaller "
"value than the normal interval."),
- minvalue = 1,
- label = _("minutes")
)
)