Module: check_mk
Branch: master
Commit: 709e8d522ac6ec014d31a09c0e1623d7437c6839
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=709e8d522ac6ec…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Mar 22 08:16:27 2017 +0100
Updated bug entries #2420
Change-Id: Iba2312d81db7507141cf18a2eb24c48cc3a8c832
---
.bugs/2420 | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/.bugs/2420 b/.bugs/2420
index aa9179f..ad9860e 100644
--- a/.bugs/2420
+++ b/.bugs/2420
@@ -1,12 +1,15 @@
Title: Renaming hosts can lead to duplicate host names
Component: wato
-State: open
+Class: bug
+State: done
Date: 2016-02-10 12:12:50
Targetversion: 1.4.0
-Class: bug
You have host A in folder F and host B in folder G. Now you can rename
B into A without WATO complaining. You end with two times A - which causes
*lots* of trouble.
We need to check better for duplicate hosts when renaming.
+
+2017-03-22 08:16:24: changed state open -> done
+Fixed.
Module: check_mk
Branch: master
Commit: df186996b2cba8db66d5383ec1b114effe6ae0d1
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=df186996b2cba8…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Mar 22 08:15:23 2017 +0100
4510 FIX Checking for name conflict during host rename
The host rename function is now performing a check whether or not the
host name is already used by another host. In case the name is in use
an error is displayed.
Change-Id: Iffa6df31c24bada87fbcec8fd44d8f9db15a5c96
---
.bugs/2510 | 2 +-
.werks/4510 | 12 ++++++++++++
web/htdocs/wato.py | 9 +--------
web/htdocs/watolib.py | 14 +++++++++-----
4 files changed, 23 insertions(+), 14 deletions(-)
diff --git a/.bugs/2510 b/.bugs/2510
index c9772a2..2e5a5b0 100644
--- a/.bugs/2510
+++ b/.bugs/2510
@@ -2,7 +2,7 @@ Title: local active checks
Component: checks
State: open
Date: 2017-02-23 13:11:32
-Targetversion: 1.4.0
+Targetversion: 1.5.0
Class: bug
The GUI is only using the active checks under ~/lib/nagios/plugins and
diff --git a/.werks/4510 b/.werks/4510
new file mode 100644
index 0000000..9e53d43
--- /dev/null
+++ b/.werks/4510
@@ -0,0 +1,12 @@
+Title: Checking for name conflict during host rename
+Level: 1
+Component: wato
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1490166831
+Class: fix
+
+The host rename function is now performing a check whether or not the
+host name is already used by another host. In case the name is in use
+an error is displayed.
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 9d916d7..ceb0b58 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -1466,19 +1466,12 @@ def action_edit_host(mode, hostname, is_cluster):
return "folder"
-def validate_host_uniqueness(host_name):
- host = Host.host(host_name)
- if host:
- 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, host.folder().url(), host.folder().alias_path()))
-
-
def check_new_host_name(varname, host_name):
if not host_name:
raise MKUserError(varname, _("Please specify a host name."))
elif Folder.current().has_host(host_name):
raise MKUserError(varname, _("A host with this name already exists in this folder."))
+ validate_host_uniqueness(varname, host_name)
Hostname().validate_value(host_name, varname)
diff --git a/web/htdocs/watolib.py b/web/htdocs/watolib.py
index de2dff9..b445d9e 100644
--- a/web/htdocs/watolib.py
+++ b/web/htdocs/watolib.py
@@ -1728,11 +1728,7 @@ class Folder(BaseFolder):
for host_name, attributes, cluster_nodes in entries:
must_be_in_contactgroups(attributes.get("contactgroups"))
- existing_host = Host.host(host_name)
- if existing_host:
- 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, existing_host.folder().url(), existing_host.folder().alias_path()))
+ validate_host_uniqueness("host", host_name)
# 2. Actual modification
self._load_hosts_on_demand()
@@ -1920,6 +1916,14 @@ class Folder(BaseFolder):
+def validate_host_uniqueness(varname, host_name):
+ host = Host.host(host_name)
+ if host:
+ raise MKUserError(varname, _('A host with the name <b><tt>%s</tt></b> already '
+ 'exists in the folder <a href="%s">%s</a>.') %
+ (host_name, host.folder().url(), host.folder().alias_path()))
+
+
#.
# .--Search Folder-------------------------------------------------------.
# | ____ _ _____ _ _ |
Module: check_mk
Branch: master
Commit: 9e0e327d5990f9eba41f239a302f5f00ca65f2d5
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9e0e327d5990f9…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Mar 22 08:49:01 2017 +0100
Updated bug entries #2551
Change-Id: I40623fa70ce50516865bad516d551e9dc8438998
---
.bugs/2551 | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 53 insertions(+), 2 deletions(-)
diff --git a/.bugs/2551 b/.bugs/2551
index f99028d..d558097 100644
--- a/.bugs/2551
+++ b/.bugs/2551
@@ -1,9 +1,9 @@
Title: Option -N on omd backup (and om cp) disregards various historic data
Component: core
-State: open
+Class: bug
+State: done
Date: 2017-01-24 12:01:59
Targetversion: future
-Class: bug
It seems that <tt>-N</tt> just skips the monitoring history and the RRDs.
Several possible large files are still handled, e.g.
@@ -11,3 +11,54 @@ the EC archive and the HW/SW-Inventory history. Also we could
arguably consider var/log/*.log as historic data and drop
that. Maybe also a git Konfiguration history, WATO snapshots
and other stuff.
+
+---------
+
+In fact the following paths are skipped:
+
+ if "no-rrds" in options or "no-past" in options:
+ excludes.append("var/pnp4nagios/perfdata/*")
+ excludes.append("var/pnp4nagios/spool/*")
+ excludes.append("var/rrdcached/*")
+ excludes.append("var/pnp4nagios/states/*")
+ excludes.append("var/check_mk/rrd/*")
+
+ if "no-logs" in options or "no-past" in options:
+ excludes.append("var/log/*/*")
+ excludes.append("var/nagios/nagios.log")
+ excludes.append("var/nagios/archive/")
+ excludes.append("var/pnp4nagios/log/*")
+ excludes.append("var/pnp4nagios/perfdata.dump")
+ excludes.append("var/mkeventd/history/*")
+ # CMC
+ excludes.append("var/check_mk/core/history")
+ excludes.append("var/check_mk/core/archive/*")
+
+
+The help shows the following info:
+
+ Possible options for this command:
+ --no-rrds do not copy RRD files (performance data
+ --no-logs do not copy log files
+ -N,--no-past do not copy RRD file and log files
+ --no-compression do not compress tar archive
+
+The name of the option is a bit missleading, but the help of the options is a
+bit clearer. From that description we would not have to add more files.
+
+The question is about the use case: The user may want to have a backup that
+is done fast and where the resulting file is small. Assuming this, adding more
+files would be good.
+
+We add the following now to the "--no-logs" and "--no-past" options:
+
+var/log/*.log
+var/check_mk/inventory_archive/*/*
+var/check_mk/wato/snapshots/*.tar
+var/check_mk/wato/log/audit.log
+
+
+where
+
+2017-03-22 08:49:00: changed state open -> done
+Has been fixed now.
Module: check_mk
Branch: master
Commit: 738de4498c0e4227df927cfbee22426197d5ba17
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=738de4498c0e42…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Tue Mar 21 11:26:35 2017 +0100
Do not strip the NEB.
This blows up livestatus.o from 2.8MB to 28MB, but the ability to get
detailed stack traces is extremely valuable. Note that this affects only
the size on disk, not in memory: The dynamic linker does not load the debug
info into the Nagios process.
Change-Id: Ie5bade334193b620bc921addd18435306d182a74
---
livestatus/src/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/livestatus/src/Makefile.am b/livestatus/src/Makefile.am
index 8f6ea8f..efdf542 100644
--- a/livestatus/src/Makefile.am
+++ b/livestatus/src/Makefile.am
@@ -163,7 +163,7 @@ liblivestatus_a_CXXFLAGS = -fPIC
livestatus.o: $(liblivestatus_a_OBJECTS)
# Note: libstdc++fs is only available as a static library, so we are lucky
- $(CXX) $(LDFLAGS) -s -shared $^ -o $@ -lstdc++fs -lpthread -static-libstdc++ @BOOST_LDFLAGS@
+ $(CXX) $(LDFLAGS) -shared $^ -o $@ -lstdc++fs -lpthread -static-libstdc++ @BOOST_LDFLAGS@
# To make sure we can dlopen() our NEB later
$(CXX) $(liblivestatus_a_CXXFLAGS) $(CXXFLAGS) -c NagiosMockup.cc -o NagiosMockup.o
$(CXX) $(liblivestatus_a_CXXFLAGS) $(CXXFLAGS) NagiosMockup.o $@ -o NagiosMockup