Module: check_mk
Branch: master
Commit: 1dee163bbe7de4b233d25ebb6aa08f2e4bc8b3cd
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1dee163bbe7de4…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Mon Nov 6 09:52:18 2017 +0100
5194 FIX Fixed time zone handling for Stats: columns.
The time zone specified via the Localtime: header was ignored for Stats:
columns, so their returned value was wrong when it was a time-related
column. This has been fixed.
Change-Id: Iaa8293b710600532f9ecb6a75129f61eeae969b7
---
.werks/5194 | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/.werks/5194 b/.werks/5194
new file mode 100644
index 0000000..5c04f76
--- /dev/null
+++ b/.werks/5194
@@ -0,0 +1,12 @@
+Title: Fixed time zone handling for Stats: columns.
+Level: 1
+Component: livestatus
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1509958241
+Class: fix
+
+The time zone specified via the Localtime: header was ignored for Stats:
+columns, so their returned value was wrong when it was a time-related
+column. This has been fixed.
Module: check_mk
Branch: master
Commit: b41689f3f71ddfbc87150bc1da07bde761c3a731
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b41689f3f71ddf…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Mon Nov 6 09:50:13 2017 +0100
5193 FIX Fixed authorization handling for Livestatus queries.
Depending on the monitoring core used, several columns did not respect the
AuthUser: header, so more hosts/services/groups were returned than
requested. This has been fixed.
Change-Id: I3447d980f23b88141c1b83364b3b250816efb15b
---
.werks/5193 | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/.werks/5193 b/.werks/5193
new file mode 100644
index 0000000..0217425
--- /dev/null
+++ b/.werks/5193
@@ -0,0 +1,12 @@
+Title: Fixed authorization handling for Livestatus queries.
+Level: 1
+Component: livestatus
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1509958056
+Class: fix
+
+Depending on the monitoring core used, several columns did not respect the
+AuthUser: header, so more hosts/services/groups were returned than
+requested. This has been fixed.
Module: check_mk
Branch: master
Commit: 5c7b839ce25e79c412fb79f96906f0b33f6134ed
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5c7b839ce25e79…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Nov 6 09:11:57 2017 +0100
5432 Network scan: The tag for the "criticality" host tag group can now be configured
Before this change all new hosts found by the network scan were added as offline hosts
(Criticality: Do not monitor this host). It is now possible to configure this value
in the properties of the network scan.
Change-Id: I639e216b97d833fd79b4a83d8a47c6e1c85109bc
---
.werks/5432 | 12 ++++++++++++
web/htdocs/wato.py | 6 ++++--
web/htdocs/watolib.py | 7 +++++++
web/plugins/wato/builtin_attributes.py | 15 +++++++++++++++
4 files changed, 38 insertions(+), 2 deletions(-)
diff --git a/.werks/5432 b/.werks/5432
new file mode 100644
index 0000000..b7c1503
--- /dev/null
+++ b/.werks/5432
@@ -0,0 +1,12 @@
+Title: Network scan: The tag for the "criticality" host tag group can now be configured
+Level: 1
+Component: wato
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1509955833
+Class: feature
+
+Before this change all new hosts found by the network scan were added as offline hosts
+(Criticality: Do not monitor this host). It is now possible to configure this value
+in the properties of the network scan.
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index d9331d1..584eb8f 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -16496,7 +16496,9 @@ def find_folder_to_scan():
def add_scanned_hosts_to_folder(folder, found):
- translation = folder.attribute("network_scan").get("translate_names", {})
+ network_scan_properties = folder.attribute("network_scan")
+
+ translation = network_scan_properties.get("translate_names", {})
entries = []
for host_name, ipaddress in found:
@@ -16504,7 +16506,7 @@ def add_scanned_hosts_to_folder(folder, found):
attrs = {
"ipaddress" : ipaddress,
- "tag_criticality" : "offline",
+ "tag_criticality" : network_scan_properties.get("tag_criticality", "offline"),
}
if not watolib.Host.host_exists(host_name):
entries.append((host_name, attrs, None))
diff --git a/web/htdocs/watolib.py b/web/htdocs/watolib.py
index ce67a5b..94d59fe 100644
--- a/web/htdocs/watolib.py
+++ b/web/htdocs/watolib.py
@@ -6395,6 +6395,13 @@ class HosttagGroup(object):
return response
+ def get_tag_choices(self):
+ choices = []
+ for tag in self.tags:
+ choices.append((tag.id, tag.title))
+ return choices
+
+
class HosttagsConfiguration(object):
def __init__(self):
super(HosttagsConfiguration, self).__init__()
diff --git a/web/plugins/wato/builtin_attributes.py b/web/plugins/wato/builtin_attributes.py
index abae99b..e7c1812 100644
--- a/web/plugins/wato/builtin_attributes.py
+++ b/web/plugins/wato/builtin_attributes.py
@@ -254,6 +254,13 @@ class NetworkScanAttribute(ValueSpecAttribute):
return [ (user_id, "%s (%s)" % (user_id, user.get("alias", user_id)))
for user_id, user in userdb.load_users(lock = False).items() ]
+ def tag_criticality_choices():
+ tags = watolib.HosttagsConfiguration()
+ tags.load()
+
+ criticality = tags.get_tag_group("criticality")
+ return criticality.get_tag_choices()
+
ValueSpecAttribute.__init__(self, "network_scan",
Dictionary(
elements = [
@@ -278,6 +285,14 @@ class NetworkScanAttribute(ValueSpecAttribute):
help = _("Limit the execution of the scan to this time range."),
allow_empty=False,
)),
+ ("tag_criticality", DropdownChoice(
+ title = _("Set criticality host tag"),
+ help = _("Added hosts will be created as \"offline\" host by default. You "
+ "can change this option to activate monitoring of new hosts after "
+ "next activation of the configuration after the scan."),
+ choices = tag_criticality_choices,
+ default_value = "offline",
+ )),
("max_parallel_pings", Integer(
title = _("Parallel pings to send"),
help = _("Set the maximum number of concurrent pings sent to target IP "
Module: check_mk
Branch: master
Commit: 127a46af3721a844c1a205cc2d8fab1dd901619a
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=127a46af3721a8…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Fri Nov 3 14:54:01 2017 +0100
Do not derive time-related columns/filtes/aggregators from their int counterparts.
They have different semantics (time zone offset!), and we derived only to
re-use code, which is considered an anti-pattern. We will fix the newly
introduced code duplication later, the main point of this completely
mechanical commit is to get the class hierarchies right.
Change-Id: I23d43fd79fdb8d3caea7fd3502d5ee26dd37c16c
---
livestatus/src/IntColumn.h | 10 +--
livestatus/src/IntFilter.h | 6 +-
livestatus/src/Makefile.am | 1 +
livestatus/src/TimeAggregator.cc | 122 +++++++++++++++++++++++++++
livestatus/src/TimeAggregator.h | 56 +++++++++++++
livestatus/src/TimeColumn.cc | 6 +-
livestatus/src/TimeColumn.h | 15 ++--
livestatus/src/TimeFilter.cc | 177 +++++++++++++++++++++++++++++++++++++++
livestatus/src/TimeFilter.h | 33 ++++++--
9 files changed, 404 insertions(+), 22 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=127a46af37…
Module: check_mk
Branch: master
Commit: c74ba91d47b000fe42923bc11e05f1aa50592505
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c74ba91d47b000…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Sat Aug 19 20:44:41 2017 +0200
Improved separation of watolib and wato
The wato.py was importing all things of the watolib.py via star import to it's
own namespace. With the later plugin loading mechanism confusions (and bugs)
could occur easily because there are not only functions and classes, but also
data structures loaded from watolib.py.
The current idea of these both modules is now:
- wato: Implementation of WATO pages (the views you can open in browser) and
registration of things to configure via plugins
(rulesets, global settings, ...).
- watolib: Implementation of the logic and data structures. Plugins for the
watolib extend the internal functionality of WATO.
The watolib module is allowed to be imported from the whole GUI code.
The wato module should only be imported for accessing the pages.
The thing that has been changed now is that the star import has been
removed and all references from wato to watolib has been made explicit.
Most wato plugins should be compatible with this change. Plugins that
are doing more than just registering some configuration options may miss
some variables / methods that were available before. This can mostly be
solved by specifying the module name <tt>watolib.</tt> before the name.
Change-Id: I95e8530c36293ca3916e538a576e1981fcc1f33e
---
web/htdocs/notifications.py | 2 +-
web/htdocs/userdb.py | 8 +-
web/htdocs/wato.py | 1375 ++++++++++++----------------
web/htdocs/watolib.py | 237 ++++-
web/plugins/pages/wato.py | 3 +-
web/plugins/sidebar/shipped.py | 5 +-
web/plugins/sidebar/wato.py | 9 +-
web/plugins/userdb/hook_auth.py | 5 +-
web/plugins/userdb/ldap.py | 12 +-
web/plugins/views/wato.py | 5 +-
web/plugins/visuals/wato.py | 6 +-
web/plugins/wato/backup_domains.py | 2 +-
web/plugins/wato/bi.py | 14 +-
web/plugins/wato/builtin_attributes.py | 2 +-
web/plugins/wato/check_mk_configuration.py | 10 +-
web/plugins/wato/datasource_programs.py | 26 +-
web/plugins/wato/mkeventd.py | 14 +-
web/plugins/wato/omd_configuration.py | 14 +-
18 files changed, 914 insertions(+), 835 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=c74ba91d47…