Module: check_mk
Branch: master
Commit: 6bceda1edabbbfac515ee579ddaa93092b6b03b4
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6bceda1edabbbf…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Jun 27 11:22:56 2014 +0200
New Mutisite filter for the number of services a host has
This filter is available for all views but currently added only in
the <i>Host search</i> view. It allows you to find hosts based on the
number of services they have. That way you can find e.g. hosts where
no service inventory has been done or your hosts that produce most
of your services.
---
.werks/1033 | 12 ++++++++++++
ChangeLog | 1 +
web/plugins/views/builtin.py | 1 +
web/plugins/views/filters.py | 2 ++
4 files changed, 16 insertions(+)
diff --git a/.werks/1033 b/.werks/1033
new file mode 100644
index 0000000..068e0fd
--- /dev/null
+++ b/.werks/1033
@@ -0,0 +1,12 @@
+Title: New Mutisite filter for the number of services a host has
+Level: 1
+Component: multisite
+Version: 1.2.5i5
+Date: 1403860884
+Class: feature
+
+This filter is available for all views but currently added only in
+the <i>Host search</i> view. It allows you to find hosts based on the
+number of services they have. That way you can find e.g. hosts where
+no service inventory has been done or your hosts that produce most
+of your services.
diff --git a/ChangeLog b/ChangeLog
index 39bc22c..5028a38 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -14,6 +14,7 @@
Multisite:
* 1013 Sort host names naturally, e.g. foobar11 comes after foobar2...
+ * 1033 New Mutisite filter for the number of services a host has...
* 0945 FIX: Sidebar snapin "Problem hosts": Now excludes hosts and services
in downtime
WATO:
diff --git a/web/plugins/views/builtin.py b/web/plugins/views/builtin.py
index a13f422..4896045 100644
--- a/web/plugins/views/builtin.py
+++ b/web/plugins/views/builtin.py
@@ -1154,6 +1154,7 @@ multisite_builtin_views.update({
'host_tags',
'hostalias',
'host_favorites',
+ 'host_num_services',
],
'sorters': [],
'title': _('Host search'),
diff --git a/web/plugins/views/filters.py b/web/plugins/views/filters.py
index 08100b5..c7938c3 100644
--- a/web/plugins/views/filters.py
+++ b/web/plugins/views/filters.py
@@ -519,6 +519,8 @@ class FilterNumberRange(Filter): # type is int
declare_filter(232, FilterNumberRange("host_notif_number", _("Current Host
Notification Number"), "host", "current_notification_number"))
declare_filter(232, FilterNumberRange("svc_notif_number", _("Current
Service Notification Number"), "service",
"current_notification_number"))
+declare_filter(234, FilterNumberRange("host_num_services", _("Number of
Services of the Host"), "host", "num_services"))
+
# Filter for setting time ranges, e.g. on last_state_change and last_check