Module: check_mk
Branch: master
Commit: 7ffe03be169f44eba027e6273122541110aa78f6
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7ffe03be169f44…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Oct 14 15:18:26 2015 +0200
#2652 FIX jolokia_metrics: better handling of situation where agent does not respond
In case the Jolokia agent cannot be queried the Check_MK services does not
any longer complain about missing agent sections. Instead on the main
service of the instance goes CRIT and all other services will be skipped
and become stale. This avoids bogus notifcations.
---
.werks/2652 | 12 ++++++++
ChangeLog | 1 +
agents/plugins/mk_jolokia | 20 +++++++------
checks/jolokia_metrics | 68 ++++++++++++++++++++++++++++++++++++++++++---
4 files changed, 88 insertions(+), 13 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=7ffe03be16…
Module: check_mk
Branch: master
Commit: b69814241601c422ef762423766d6453a83e1e9d
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b69814241601c4…
Author: Sven Rueß <sr(a)mathias-kettner.de>
Date: Wed Oct 14 15:00:56 2015 +0200
Add of new bug
---
.bugs/2389 | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/.bugs/2389 b/.bugs/2389
new file mode 100644
index 0000000..f6d37b7
--- /dev/null
+++ b/.bugs/2389
@@ -0,0 +1,10 @@
+Title: Logout problem after site copy
+Component: multisite
+State: open
+Date: 2015-10-14 14:56:27
+Targetversion: 1.2.6
+Class: bug
+
+If one monitoring sites is copied with omd cp, the logout will not work.
+After the successful login in one of the sites you can use the other one.
+If you do a logout in one sites you are automatically logged in again.
Module: check_mk
Branch: master
Commit: 19bf583cc28c4424fd74a658ebf6586d46e0ad24
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=19bf583cc28c44…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Oct 14 14:05:04 2015 +0200
#2651 Do not allow adding of duplicate hosts anymore
WATO now makes sure that you cannot add a host with a name that already
exists in some folder anymore. That avoids problems when later activating
changes (where duplicate hosts are not allowed anyway). Note: In previous
versions you <i>could</i> have created a host with the same name on different
sites. This is not possible anymore.
---
.werks/2651 | 13 +++++++++++++
ChangeLog | 1 +
web/htdocs/wato.py | 12 ++++++++++++
3 files changed, 26 insertions(+)
diff --git a/.werks/2651 b/.werks/2651
new file mode 100644
index 0000000..bce6b4a
--- /dev/null
+++ b/.werks/2651
@@ -0,0 +1,13 @@
+Title: Do not allow adding of duplicate hosts anymore
+Level: 1
+Component: wato
+Compatible: compat
+Version: 1.2.7i3
+Date: 1444824195
+Class: feature
+
+WATO now makes sure that you cannot add a host with a name that already
+exists in some folder anymore. That avoids problems when later activating
+changes (where duplicate hosts are not allowed anyway). Note: In previous
+versions you <i>could</i> have created a host with the same name on different
+sites. This is not possible anymore.
diff --git a/ChangeLog b/ChangeLog
index 96903d4..8f6bb12 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -290,6 +290,7 @@
* 2486 Remove special handling for non-distributed-setups in WATO...
* 2487 Remove dangerous <i>Factory Reset</i> button...
* 2649 Bulk renaming of hosts in WATO...
+ * 2651 Do not allow adding of duplicate hosts anymore...
* 2344 FIX: Improved validation of selected rules when editing BI aggregations...
* 2346 FIX: Notifications: Fixed garbled page when switching on/off bulks/backlog/user rules
* 2372 FIX: Avoid freezing WATO during bulk discovery if hosts do not respond in a timely manner
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 451ede8..dd4ca21 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -2104,6 +2104,7 @@ def mode_edithost(phase, new, cluster):
go_to_diag = html.var("diag_host")
if html.check_transaction():
if new:
+ validate_host_uniqueness(hostname)
add_hosts_to_folder(g_folder, {hostname: host})
else:
update_hosts_in_folder(g_folder, {hostname: {"set": host}})
@@ -19818,6 +19819,17 @@ def validate_all_hosts(hostnames, force_all = False):
else:
return {}
+
+def validate_host_uniqueness(host_name):
+ for existing_host_name, existing_host in collect_hosts(g_root_folder).items():
+ if existing_host_name == host_name:
+ folder = existing_host[".folder"]
+ folder_name = get_folder_aliaspath(folder)
+ folder_url = html.makeuri_contextless([("mode", "folder"), ("folder", folder[".path"])])
+ raise MKUserError("host", _('A host with the name <b><tt>%s</tt></b> already '
+ 'exists in the folder <a href="%s">%s</a>.') %
+ (host_name, folder_url, folder_name))
+
#.
# .--Helpers-------------------------------------------------------------.
# | _ _ _ |