Module: check_mk
Branch: master
Commit: 9913bc89ecbfe45c1a7265581fb53b7ea026dc39
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9913bc89ecbfe4…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Thu Oct 6 12:24:56 2016 +0200
excluded downtimes in stale hosts and services view
---
web/plugins/sidebar/shipped.py | 5 ++++-
web/plugins/views/builtin.py | 12 +++++++-----
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/web/plugins/sidebar/shipped.py b/web/plugins/sidebar/shipped.py
index 54302ef..d32a775 100644
--- a/web/plugins/sidebar/shipped.py
+++ b/web/plugins/sidebar/shipped.py
@@ -563,6 +563,8 @@ def get_tactical_overview_data(extra_filter_headers):
"Stats: acknowledged = 0\n" \
"StatsAnd: 3\n" \
"Stats: host_staleness >= %s\n" % configured_staleness_threshold +
\
+ "Stats: host_scheduled_downtime_depth = 0\n" \
+ "StatsAnd: 2\n" \
"Filter: custom_variable_names < _REALNAME\n" + \
extra_filter_headers
@@ -581,8 +583,9 @@ def get_tactical_overview_data(extra_filter_headers):
"Stats: host_state = 0\n" \
"StatsAnd: 5\n" \
"Stats: service_staleness >= %s\n" % configured_staleness_threshold
+ \
+ "Stats: host_scheduled_downtime_depth = 0\n" \
"Stats: service_scheduled_downtime_depth = 0\n" \
- "StatsAnd: 2\n" \
+ "StatsAnd: 3\n" \
"Filter: host_custom_variable_names < _REALNAME\n" + \
extra_filter_headers
diff --git a/web/plugins/views/builtin.py b/web/plugins/views/builtin.py
index fdf7338..571628f 100644
--- a/web/plugins/views/builtin.py
+++ b/web/plugins/views/builtin.py
@@ -1690,9 +1690,10 @@ multisite_builtin_views.update({
'datasource': 'services',
'description': _('Services that have not been checked for
too long according to their configured check intervals.'),
'group_painters': [('host', 'host',
'')],
- 'hard_filters': [ 'service_staleness',
'service_scheduled_downtime_depth' ],
- 'hard_filtervars': [('is_service_staleness',
'1'),
- ('is_service_scheduled_downtime_depth',
'0')],
+ 'hard_filters': [ 'service_staleness',
'service_scheduled_downtime_depth', 'host_scheduled_downtime_depth' ],
+ 'hard_filtervars': [ ('is_service_staleness',
'1'),
+ ('is_service_scheduled_downtime_depth',
'0'),
+ ('is_host_scheduled_downtime_depth',
'0'), ],
'hidden': False,
'hide_filters': [],
'hidebutton': False,
@@ -1715,8 +1716,9 @@ multisite_builtin_views.update({
'datasource': 'hosts',
'description': _('Hosts that have not been checked for too
long.'),
'group_painters': [('sitealias', None)],
- 'hard_filters': ['host_staleness'],
- 'hard_filtervars': [('is_host_staleness',
'1')],
+ 'hard_filters': [ 'host_staleness',
'host_scheduled_downtime_depth' ],
+ 'hard_filtervars': [ ('is_host_staleness',
'1'),
+ ('is_host_scheduled_downtime_depth',
'0'), ],
'hidden': True,
'hide_filters': [],
'hidebutton': False,