Module: check_mk
Branch: master
Commit: 557ed47273849057788b7d10382d8f370fc6f3df
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=557ed472738490…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Wed Jan 9 11:42:57 2019 +0100
Exclude check man pages from GUI crawl for now.
Because of roughly 4000 automation calls, crawling the check man pages took
about 80% (= about 15 minutes on our CI) of the whole crawling time. We
will re-enable this later when the automation calls are gone.
Change-Id: I68ab53bb6125d0f1ab491442e168f9a0c9bfc17c
---
tests/integration/cmk/gui/test_crawl.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/tests/integration/cmk/gui/test_crawl.py b/tests/integration/cmk/gui/test_crawl.py
index d5f033a..ffdab28 100644
--- a/tests/integration/cmk/gui/test_crawl.py
+++ b/tests/integration/cmk/gui/test_crawl.py
@@ -246,6 +246,13 @@ class Worker(threading.Thread):
if "selection=" in url:
raise InvalidUrl("Skipping selection URL: %s" % url)
+ # TODO: Remove this exclude when ModeCheckManPage works without an
+ # automation call. Currently we have to use such a call to enrich the
+ # man page with some additional info from config.check_info, see
+ # AutomationGetCheckManPage.
+ if "mode=check_manpage" in url and "wato.py" in url:
+ raise InvalidUrl("Skipping man page URL: %s" % url)
+
# Don't follow filled in filter form views
if "view.py" in url and "filled_in=filter" in url:
raise InvalidUrl("Skipping filled in filter URL: %s" % url)
Module: check_mk
Branch: master
Commit: 77abfb161f02141abdd26717e75208c8453124ed
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=77abfb161f0214…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Jan 8 14:06:41 2019 +0100
7022 Backup can now be configured to exclude historical data
The site backup in WATO can now be configured to create partial backups of a site. The backup
excludes the metric data (RRD files), the monitoring history and log files in this mode. Such
backups are much smaller in general and can be created much faster.
CMK-539
Change-Id: I81641662045315fd962c8c464cabb611582cabe1
---
.werks/7022 | 12 ++++++++++++
bin/mkbackup | 7 +++++++
cmk/gui/wato/pages/backup.py | 14 ++++++++++++++
3 files changed, 33 insertions(+)
diff --git a/.werks/7022 b/.werks/7022
new file mode 100644
index 0000000..d32d794
--- /dev/null
+++ b/.werks/7022
@@ -0,0 +1,12 @@
+Title: Backup can now be configured to exclude historical data
+Level: 1
+Component: wato
+Compatible: compat
+Edition: cre
+Version: 1.6.0i1
+Date: 1546952557
+Class: feature
+
+The site backup in WATO can now be configured to create partial backups of a site. The backup
+excludes the metric data (RRD files), the monitoring history and log files in this mode. Such
+backups are much smaller in general and can be created much faster.
diff --git a/bin/mkbackup b/bin/mkbackup
index 2e2a1bc..46129f0 100755
--- a/bin/mkbackup
+++ b/bin/mkbackup
@@ -600,6 +600,9 @@ def do_site_backup(opts, site=None, try_stop=True):
if not compress_archives():
cmd.append("--no-compression")
+ if backup_without_history():
+ cmd.append("--no-past")
+
# When executed as site user, "omd backup" is executed without the site
# name and always performing backup for the current site. When executed
# as root, the site argument has to be given and must be handed over to
@@ -1036,6 +1039,10 @@ def compress_archives():
return g_job_config["compress"]
+def backup_without_history():
+ return g_job_config.get("no_history", False)
+
+
def encrypt_archives():
return g_job_config["encrypt"] is not None
diff --git a/cmk/gui/wato/pages/backup.py b/cmk/gui/wato/pages/backup.py
index 0f2ad3a..d43dec6 100644
--- a/cmk/gui/wato/pages/backup.py
+++ b/cmk/gui/wato/pages/backup.py
@@ -34,6 +34,7 @@ from cmk.gui.i18n import _
from cmk.gui.globals import html
from cmk.gui.plugins.wato.utils.context_buttons import home_button
from cmk.gui.plugins.wato.utils.base_modes import WatoWebApiMode
+from cmk.gui.valuespec import Checkbox
from cmk.gui.plugins.wato import (
WatoMode,
@@ -149,6 +150,19 @@ class ModeEditBackupJob(backup.PageEditBackupJob, WatoMode):
def keys(self):
return SiteBackupKeypairStore()
+ def custom_job_attributes(self):
+ return [
+ ("no_history",
+ Checkbox(
+ title=_("Do not backup historical data"),
+ help=_(
+ "You may use this option to create a much smaller partial backup of the site."
+ ),
+ label=_(
+ "Do not backup metric data (RRD files), the monitoring history and log files"),
+ )),
+ ]
+
@mode_registry.register
class ModeBackupJobState(backup.PageBackupJobState, WatoMode):