Module: check_mk
Branch: master
Commit: ef8ca317664bd9297fe03694ce8e81f3437bcb71
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ef8ca317664bd9…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sun Jan 8 17:16:33 2012 +0100
Painters for normal/retry check interval
---
.bugs/407 | 7 +++++--
ChangeLog | 1 +
web/plugins/views/builtin.py | 2 ++
web/plugins/views/painters.py | 40 ++++++++++++++++++++++++++++++++++++++++
4 files changed, 48 insertions(+), 2 deletions(-)
diff --git a/.bugs/407 b/.bugs/407
index cc23d04..be12853 100644
--- a/.bugs/407
+++ b/.bugs/407
@@ -1,13 +1,16 @@
Title: Painter for normal/retry check interval
Component: multisite
+State: done
+Class: cleanup
Benefit: 1
-State: open
Cost: 1
Date: 2011-10-28 10:10:23
Targetversion: 1.2.0
-Class: cleanup
New columns for normal/retry check interval for hosts and
services. We could make three columns: two isolated and
one combined column. Also add the combined column to the
host and service detail views.
+
+2012-01-08 17:16:21: changed state open -> done
+done
diff --git a/ChangeLog b/ChangeLog
index 492f7d3..e2ea348 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -30,6 +30,7 @@
variable enable_sounds can be set to False in multisite.mk in order
to disable sounds.
* Added filter for log state (UP,DOWN,OK,CRIT...) to all log views
+ * New painter for normal and retry check interval (added to detail views)
1.1.13i2:
Core, Setup, etc.:
diff --git a/web/plugins/views/builtin.py b/web/plugins/views/builtin.py
index 531cc7d..d4cd442 100644
--- a/web/plugins/views/builtin.py
+++ b/web/plugins/views/builtin.py
@@ -848,6 +848,7 @@ multisite_builtin_views.update({
('host_plugin_output', None),
('host_perf_data', None),
('host_attempt', None),
+ ('host_check_interval', None),
('host_check_type', None),
('host_state_age', None),
('host_check_age', None),
@@ -1050,6 +1051,7 @@ multisite_builtin_views.update({
('svc_perf_data', None),
('perfometer', None),
('svc_check_command', None),
+ ('svc_check_interval', None),
('svc_attempt', None),
('svc_check_type', None),
('svc_state_age', None),
diff --git a/web/plugins/views/painters.py b/web/plugins/views/painters.py
index 0e9ca9b..3cebe3f 100644
--- a/web/plugins/views/painters.py
+++ b/web/plugins/views/painters.py
@@ -532,6 +532,26 @@ multisite_painters["svc_attempt"] = {
"paint" : lambda row: (None, "%d/%d" %
(row["service_current_attempt"], row["service_max_check_attempts"])),
}
+multisite_painters["svc_normal_interval"] = {
+ "title" : _("Service normal check interval"),
+ "short" : _("Check int."),
+ "columns" : [ "service_check_interval" ],
+ "paint" : lambda row: (None, "%ds" %
(row["service_check_interval"] * 60)),
+}
+multisite_painters["svc_retry_interval"] = {
+ "title" : _("Service retry check interval"),
+ "short" : _("Retry"),
+ "columns" : [ "service_retry_interval" ],
+ "paint" : lambda row: (None, "%ds" %
(row["service_retry_interval"] * 60)),
+}
+multisite_painters["svc_check_interval"] = {
+ "title" : _("Service normal/retry check interval"),
+ "short" : _("Interval"),
+ "columns" : [ "service_check_interval",
"service_retry_interval" ],
+ "paint" : lambda row: (None, "%ds/%ds" % (
+ row["service_check_interval"] * 60,
row["service_retry_interval"] * 60)),
+}
+
multisite_painters["svc_check_type"] = {
"title" : _("Service check type"),
"short" : _("Type"),
@@ -847,6 +867,26 @@ multisite_painters["host_attempt"] = {
"paint" : lambda row: (None, "%d/%d" %
(row["host_current_attempt"], row["host_max_check_attempts"])),
}
+multisite_painters["host_normal_interval"] = {
+ "title" : _("Normal check interval"),
+ "short" : _("Check int."),
+ "columns" : [ "host_check_interval" ],
+ "paint" : lambda row: (None, "%ds" %
(row["host_check_interval"] * 60)),
+}
+multisite_painters["host_retry_interval"] = {
+ "title" : _("Retry check interval"),
+ "short" : _("Retry"),
+ "columns" : [ "host_retry_interval" ],
+ "paint" : lambda row: (None, "%ds" %
(row["host_retry_interval"] * 60)),
+}
+multisite_painters["host_check_interval"] = {
+ "title" : _("Normal/retry check interval"),
+ "short" : _("Interval"),
+ "columns" : [ "host_check_interval",
"host_retry_interval" ],
+ "paint" : lambda row: (None, "%ds/%ds" % (
+ row["host_check_interval"] * 60,
row["host_retry_interval"] * 60)),
+}
+
multisite_painters["host_check_type"] = {
"title" : _("Host check type"),
"short" : _("Type"),