Module: check_mk
Branch: master
Commit: 8878b781354aa7f632bb1a5f07521af1ea8216dc
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8878b781354aa7…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Mon Apr 4 08:39:52 2016 +0200
3239 The delay and the period of notifications can be fractions of a minute now.
---
.werks/3239 | 10 ++++
ChangeLog | 1 +
web/plugins/wato/check_mk_configuration.py | 76 ++++++++++++++++------------
3 files changed, 55 insertions(+), 32 deletions(-)
diff --git a/.werks/3239 b/.werks/3239
new file mode 100644
index 0000000..0887988
--- /dev/null
+++ b/.werks/3239
@@ -0,0 +1,10 @@
+Title: The delay and the period of notifications can be fractions of a minute now.
+Level: 1
+Component: wato
+Class: feature
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1459751927
+
+
diff --git a/ChangeLog b/ChangeLog
index 1a3c00b..d609d64 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -159,6 +159,7 @@
* 3002 Treasure script wato_import.py: now able to set wato host tag groups
* 3003 New treasure script: migrate_oldcmk2wato.py...
* 3304 Bulk deleting users is now available
+ * 3239 The delay and the period of notifications can be fractions of a minute now.
* 3060 FIX: Folder properties: Fixed exception when a user has no alias set...
* 3062 FIX: Git integration: Fixed not adding files in WATO folders to git control
* 3203 FIX: Distributed WATO: Fixed exception in remote host service discovery...
diff --git a/web/plugins/wato/check_mk_configuration.py
b/web/plugins/wato/check_mk_configuration.py
index 64c783e..4b6ff2b 100644
--- a/web/plugins/wato/check_mk_configuration.py
+++ b/web/plugins/wato/check_mk_configuration.py
@@ -1520,49 +1520,58 @@ register_rule(group,
register_rule(group,
"extra_host_conf:first_notification_delay",
- Integer(
- minvalue = 0,
- default_value = 60,
- label = _("Delay:"),
- unit = _("minutes"),
- title = _("Delay host notifications"),
- help = _("This setting delays notifications about host problems by the
"
- "specified amount of time. If the host is up again within that
"
- "time, no notification will be sent out."),
+ Transform(
+ Float(
+ minvalue = 0.0,
+ default_value = 60.0,
+ label = _("Delay:"),
+ unit = _("minutes"),
+ title = _("Delay host notifications"),
+ help = _("This setting delays notifications about host problems by the
"
+ "specified amount of time. If the host is up again within that
"
+ "time, no notification will be sent out."),
+ ),
+ forth = lambda x: float(x),
),
- factory_default = 0,
+ factory_default = 0.0,
)
register_rule(group,
"extra_service_conf:first_notification_delay",
- Integer(
- minvalue = 0,
- default_value = 60,
- label = _("Delay:"),
- unit = _("minutes"),
- title = _("Delay service notifications"),
- help = _("This setting delays notifications about service problems by the
"
- "specified amount of time. If the service is OK again within that
"
- "time, no notification will be sent out."),
+ Transform(
+ Float(
+ minvalue = 0.0,
+ default_value = 60.0,
+ label = _("Delay:"),
+ unit = _("minutes"),
+ title = _("Delay service notifications"),
+ help = _("This setting delays notifications about service problems by
the "
+ "specified amount of time. If the service is OK again within
that "
+ "time, no notification will be sent out."),
+ ),
+ forth = lambda x: float(x),
),
- factory_default = 0,
+ factory_default = 0.0,
itemtype = "service")
register_rule(group,
"extra_host_conf:notification_interval",
Optional(
- Integer(
- minvalue = 1,
- default_value = 120,
- label = _("Interval:"),
- unit = _("minutes")),
+ Transform(
+ Float(
+ minvalue = 0.05,
+ default_value = 120.0,
+ label = _("Interval:"),
+ unit = _("minutes")),
+ forth = lambda x: float(x),
+ ),
title = _("Periodic notifications during host problems"),
help = _("If you enable periodic notifications, then during a problem state
"
"of the host notifications will be sent out in regular intervals
"
"until the problem is acknowledged."),
label = _("Enable periodic notifications"),
none_label = _("disabled"),
- none_value = 0,
+ none_value = 0.0,
)
)
@@ -1571,18 +1580,21 @@ register_rule(group,
register_rule(group,
"extra_service_conf:notification_interval",
Optional(
- Integer(
- minvalue = 1,
- default_value = 120,
- label = _("Interval:"),
- unit = _("minutes")),
+ Transform(
+ Float(
+ minvalue = 0.05,
+ default_value = 120.0,
+ label = _("Interval:"),
+ unit = _("minutes")),
+ forth = lambda x: float(x),
+ ),
title = _("Periodic notifications during service problems"),
help = _("If you enable periodic notifications, then during a problem state
"
"of the service notifications will be sent out in regular intervals
"
"until the problem is acknowledged."),
label = _("Enable periodic notifications"),
none_label = _("disabled"),
- none_value = 0,
+ none_value = 0.0,
),
itemtype = "service")