Module: check_mk
Branch: master
Commit: 606859bc9a98782dc912cf1b0da839b0d7e2478a
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=606859bc9a9878…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Dec 7 10:35:20 2016 +0100
Fixed broken duplicate host detection; Now also care about shadow_hosts in CEE
---
modules/check_mk.py | 45 +++++++++++++++++++++++++++++++++++----------
1 file changed, 35 insertions(+), 10 deletions(-)
diff --git a/modules/check_mk.py b/modules/check_mk.py
index 203d213..9834ab0 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -592,6 +592,21 @@ def all_active_hosts():
cache.update(all_active_realhosts(), all_active_clusters())
return cache
+
+# This function should only be used during duplicate host check! It has to work like
+# all_active_hosts() but with the difference that duplicates are not removed.
+def all_active_hosts_with_duplicates():
+ # Only available with CEE
+ if "shadow_hosts" in globals():
+ shadow_host_entries = shadow_hosts.keys()
+ else:
+ shadow_host_entries = []
+
+ return filter_active_hosts(strip_tags(all_hosts) \
+ + strip_tags(clusters.keys()) \
+ + strip_tags(shadow_host_entries), keep_duplicates=True)
+
+
# Returns a list of all hosts which are associated with this site,
# but have been removed by the "only_hosts" rule. Normally these
# are the hosts which have the tag "offline".
@@ -609,11 +624,13 @@ def duplicate_hosts():
# Sanity check for duplicate hostnames
seen_hostnames = set([])
duplicates = set([])
- for hostname in all_active_hosts():
+
+ for hostname in all_active_hosts_with_duplicates():
if hostname in seen_hostnames:
duplicates.add(hostname)
else:
seen_hostnames.add(hostname)
+
return sorted(list(duplicates))
@@ -640,22 +657,30 @@ def all_active_clusters():
# Returns a set of active hosts for this site
-def filter_active_hosts(hostlist, keep_offline_hosts=False):
+def filter_active_hosts(hostlist, keep_offline_hosts=False, keep_duplicates=False):
if only_hosts == None and distributed_wato_site == None:
- return hostlist
+ active_hosts = hostlist
+
elif only_hosts == None:
- return set([ hostname for hostname in hostlist
- if host_is_member_of_site(hostname, distributed_wato_site) ])
+ active_hosts = [ hostname for hostname in hostlist
+ if host_is_member_of_site(hostname, distributed_wato_site) ]
+
elif distributed_wato_site == None:
if keep_offline_hosts:
- return set(hostlist)
+ active_hosts = hostlist
else:
- return set([ hostname for hostname in hostlist
- if in_binary_hostlist(hostname, only_hosts) ])
+ active_hosts = [ hostname for hostname in hostlist
+ if in_binary_hostlist(hostname, only_hosts) ]
+
else:
- return set([ hostname for hostname in hostlist
+ active_hosts = [ hostname for hostname in hostlist
if (keep_offline_hosts or in_binary_hostlist(hostname, only_hosts))
- and host_is_member_of_site(hostname, distributed_wato_site) ])
+ and host_is_member_of_site(hostname, distributed_wato_site) ]
+
+ if keep_duplicates:
+ return active_hosts
+ else:
+ return set(active_hosts)
def host_is_member_of_site(hostname, site):
Module: check_mk
Branch: master
Commit: db7b46010f838ddcd911c26c9f837ad51e115edf
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=db7b46010f838d…
Author: Sven Rueß <sr(a)mathias-kettner.de>
Date: Tue Dec 6 15:35:20 2016 +0100
Added new ToDo for reporting
---
.bugs/2526 | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/.bugs/2526 b/.bugs/2526
new file mode 100644
index 0000000..f90dd1c
--- /dev/null
+++ b/.bugs/2526
@@ -0,0 +1,12 @@
+Title: Reporting: Support for standard time ranges
+Component: multisite
+State: open
+Date: 2016-12-06 15:31:26
+Targetversion: future
+Class: todo
+
+For our reporting scheduler we should support standard time ranges like week, month, quarter and year.
+Related to those time rages we should also support last week, last month, last quarter and last year.
+
+Additional we should be able to schedule the creation of those reports on this time ranges.
+That will help the customers to create the needed reports for their customers.
Module: check_mk
Branch: master
Commit: fd0227db3cb4d29f58efe5092be8fc93fe0d1a31
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fd0227db3cb4d2…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Dec 6 15:09:54 2016 +0100
Updated bug entries #2474
---
.bugs/2474 | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/.bugs/2474 b/.bugs/2474
new file mode 100644
index 0000000..8d07871
--- /dev/null
+++ b/.bugs/2474
@@ -0,0 +1,9 @@
+Title: Exception during WATO sync when master has EC enabled and slave not
+Component: wato
+State: open
+Date: 2016-12-06 15:08:41
+Targetversion: future
+Class: bug
+
+This happens when the master has EC related global settings configured and sync them to the slave
+while the slave does not know anything about the EC.