Module: check_mk
Branch: master
Commit: b429a99e32df4b54626f25ed26992cb531640022
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b429a99e32df4b…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Apr 13 15:02:59 2016 +0200
3397 Show IP addresses of a host when hovering over its name
This works in several views, like {{All hosts}}. That way can get to know the
address of a host without going to its detail page.
---
.werks/3397 | 11 +++++++++++
ChangeLog | 1 +
web/plugins/views/builtin.py | 2 +-
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/.werks/3397 b/.werks/3397
new file mode 100644
index 0000000..449497d
--- /dev/null
+++ b/.werks/3397
@@ -0,0 +1,11 @@
+Title: Show IP addresses of a host when hovering over its name
+Level: 1
+Component: multisite
+Class: feature
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1460552531
+
+This works in several views, like {{All hosts}}. That way can get to know the
+address of a host without going to its detail page.
diff --git a/ChangeLog b/ChangeLog
index 4c365c1..7ec53a2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -155,6 +155,7 @@
* 3328 Default cloned views to be not public...
* 3376 Cleaned up handling of setting Livestatus AuthUser for "see all" users...
NOTE: Please refer to the migration notes!
+ * 3397 Show IP addresses of a host when hovering over its name...
* 3059 FIX: Fixed highlighting of availability timeline time slices
* 3175 FIX: Fix timeranges of graphs that are embedded in a dashboard...
* 3076 FIX: fixed broken views in check_mk raw edition
diff --git a/web/plugins/views/builtin.py b/web/plugins/views/builtin.py
index f43f295..d95bfac 100644
--- a/web/plugins/views/builtin.py
+++ b/web/plugins/views/builtin.py
@@ -43,7 +43,7 @@ host_service_view_painters.insert(1, ('host', 'host'))
host_view_painters = [
('host_state', None),
# ('host_type_icon', None),
- ('host', 'host'),
+ ('host', 'host', 'host_addresses'),
('host_icons', None),
('num_services_ok', 'host_ok'),
('num_services_warn', 'host_warn'),
Module: check_mk
Branch: master
Commit: 0344428ea821781b49b713103cf24e781e51bf10
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0344428ea82178…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Apr 13 14:04:30 2016 +0200
3376 Cleaned up handling of setting Livestatus AuthUser for "see all" users
This change affects only users which have the "general.see_all" permission, normally Administrators
and Guests. But the most affected users will be the admins.
Previous Check_MK versions had the options "Visibility of Hosts/Services" and
"Visibility of Hosts/Services (Webservice)" which could be set in the user profile. These options
could be used by all users which have the "see all" permission to limit the shown hosts and services
to only the ones which they are really a contact for.
The later option has been deprecated now. It was first integrated to make users of external tools
like Nagstamon, which fetches it's list of host and service problems from the Check_MK webservice,
be able to show only the the problems of their hosts and services.
But this option also had a side effect: When it is enabled and the option "Visibility of Hosts/Services"
was not enabled, the admin could see all hosts/services in the GUI but when executing a CSV export
he was only getting the hosts/services he is a contact for.
To fix this situation we decided to deprecate the "Visibility of Hosts/Services (Webservice)" and
replace it with a URL variable which can be used to filter each page individually. The new URL
variable <tt>force_authuser</tt> can be used on any view and set to:
<ul>
<li><tt>1<tt> to show only the hosts/services the user is a contact for</li>
<li><tt>0<tt> to show all hosts/services</li>
<li><tt>[username]<tt> to show all hosts/services the given user is a contact for</li>
</ul>
The now deprecated option will still be working as before but you are recommended to uncheck
the option and use the new mechanism. If you are using it for Nagstamon you will need to
use a Nagstamon 2.0 release newer than ALPHA-20160307 once it is available.
---
.werks/3376 | 36 ++++++++++++++++++++++++++++
ChangeLog | 2 ++
web/htdocs/sites.py | 42 +++++++++++++++++++++++----------
web/plugins/userdb/user_attributes.py | 6 +++--
4 files changed, 71 insertions(+), 15 deletions(-)
diff --git a/.werks/3376 b/.werks/3376
new file mode 100644
index 0000000..ede1f92
--- /dev/null
+++ b/.werks/3376
@@ -0,0 +1,36 @@
+Title: Cleaned up handling of setting Livestatus AuthUser for "see all" users
+Level: 1
+Component: multisite
+Compatible: incomp
+Version: 1.2.9i1
+Date: 1460548346
+Class: feature
+
+This change affects only users which have the "general.see_all" permission, normally Administrators
+and Guests. But the most affected users will be the admins.
+
+Previous Check_MK versions had the options "Visibility of Hosts/Services" and
+"Visibility of Hosts/Services (Webservice)" which could be set in the user profile. These options
+could be used by all users which have the "see all" permission to limit the shown hosts and services
+to only the ones which they are really a contact for.
+
+The later option has been deprecated now. It was first integrated to make users of external tools
+like Nagstamon, which fetches it's list of host and service problems from the Check_MK webservice,
+be able to show only the the problems of their hosts and services.
+But this option also had a side effect: When it is enabled and the option "Visibility of Hosts/Services"
+was not enabled, the admin could see all hosts/services in the GUI but when executing a CSV export
+he was only getting the hosts/services he is a contact for.
+
+To fix this situation we decided to deprecate the "Visibility of Hosts/Services (Webservice)" and
+replace it with a URL variable which can be used to filter each page individually. The new URL
+variable <tt>force_authuser</tt> can be used on any view and set to:
+
+<ul>
+ <li><tt>1<tt> to show only the hosts/services the user is a contact for</li>
+ <li><tt>0<tt> to show all hosts/services</li>
+ <li><tt>[username]<tt> to show all hosts/services the given user is a contact for</li>
+</ul>
+
+The now deprecated option will still be working as before but you are recommended to uncheck
+the option and use the new mechanism. If you are using it for Nagstamon you will need to
+use a Nagstamon 2.0 release newer than ALPHA-20160307 once it is available.
diff --git a/ChangeLog b/ChangeLog
index 49a8d58..1d4c042 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -153,6 +153,8 @@
* 2237 Unique name for columns of Host Groups and Service Groups...
* 3310 New dashlet which shows user notifications
* 3328 Default cloned views to be not public...
+ * 3376 Cleaned up handling of setting Livestatus AuthUser for "see all" users...
+ NOTE: Please refer to the migration notes!
* 3059 FIX: Fixed highlighting of availability timeline time slices
* 3175 FIX: Fix timeranges of graphs that are embedded in a dashboard...
* 3076 FIX: fixed broken views in check_mk raw edition
diff --git a/web/htdocs/sites.py b/web/htdocs/sites.py
index 6fde86d..41bd63c 100644
--- a/web/htdocs/sites.py
+++ b/web/htdocs/sites.py
@@ -150,27 +150,43 @@ def connect_single_site():
# If Multisite is retricted to data the user is a contact for, we need to set an
# AuthUser: header for livestatus.
def set_livestatus_auth():
- if html.output_format == 'html':
- perm = "force_authuser"
- else:
- perm = "force_authuser_webservice"
-
- use_livestatus_auth = True
- if config.may("general.see_all") and not config.user.get(perm):
- use_livestatus_auth = False
-
- if use_livestatus_auth == True:
- _live.set_auth_user('read', config.user_id)
- _live.set_auth_user('action', config.user_id)
+ user_id = livestatus_auth_user()
+ if user_id != None:
+ _live.set_auth_user('read', user_id)
+ _live.set_auth_user('action', user_id)
# May the user see all objects in BI aggregations or only some?
if not config.may("bi.see_all"):
- _live.set_auth_user('bi', config.user_id)
+ _live.set_auth_user('bi', user_id)
# Default auth domain is read. Please set to None to switch off authorization
_live.set_auth_domain('read')
+# Returns either None when no auth user shal be set or the name of the user
+# to be used as livestatus auth user
+def livestatus_auth_user():
+ if not config.may("general.see_all"):
+ return config.user_id
+
+ force_authuser = html.var("force_authuser")
+ if force_authuser == "1":
+ return config.user_id
+ elif force_authuser == "0":
+ return None
+ elif force_authuser:
+ return force_authuser # set a different user
+
+ # TODO: Remove this with 1.5.0/1.6.0
+ if html.output_format != 'html' and config.user.get("force_authuser_webservice"):
+ return config.user_id
+
+ if config.user.get("force_authuser"):
+ return config.user_id
+
+ return None
+
+
def disconnect():
global _live, _site_status
_live = None
diff --git a/web/plugins/userdb/user_attributes.py b/web/plugins/userdb/user_attributes.py
index d48aa57..a2a5a8c 100644
--- a/web/plugins/userdb/user_attributes.py
+++ b/web/plugins/userdb/user_attributes.py
@@ -37,11 +37,13 @@ declare_user_attribute(
permission = "general.see_all"
)
+# TODO: Remove this with 1.5.0/1.6.0
declare_user_attribute(
"force_authuser_webservice",
Checkbox(
- title = _("Visibility of Hosts/Services (Webservice)"),
- label = _("Export only hosts and services the user is a contact for"),
+ title = _("Hosts/Service visibility (Webservice, Deprecated)"),
+ label = _("Export only hosts and services the user is a contact for. "
+ "<b>Please don't use this option anymore, it is deprecated.</b>"),
help = _("When this option is checked, then the Multisite webservice "
"will only export hosts and services that the user is a contact for - "
"even if he has the permission for seeing all objects."),
Module: check_mk
Branch: master
Commit: ee498bc7109099cb36cbc7f1a7f5faf61517bf91
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ee498bc7109099…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Apr 13 13:44:02 2016 +0200
3396 Change default setting of Precompile aggregations on demand to ON now
The global setting {{Precompile aggregations on demand}} improves the
performance of BI in case where not all aggregations are needed at once. This
is especially true for the case of single-host aggregations. This setting
now exists for a long time and we have finally regarded that feature as
stable enough in order to make it the default.
We might remove the setting from WATO totally in future.
---
.werks/3396 | 16 ++++++++++++++++
ChangeLog | 1 +
web/plugins/config/bi.py | 2 +-
web/plugins/wato/check_mk_configuration.py | 2 +-
4 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/.werks/3396 b/.werks/3396
new file mode 100644
index 0000000..7fb5a2d
--- /dev/null
+++ b/.werks/3396
@@ -0,0 +1,16 @@
+Title: Change default setting of Precompile aggregations on demand to ON now
+Level: 2
+Component: bi
+Class: feature
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1460547726
+
+The global setting {{Precompile aggregations on demand}} improves the
+performance of BI in case where not all aggregations are needed at once. This
+is especially true for the case of single-host aggregations. This setting
+now exists for a long time and we have finally regarded that feature as
+stable enough in order to make it the default.
+
+We might remove the setting from WATO totally in future.
diff --git a/ChangeLog b/ChangeLog
index 43e5d06..49a8d58 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -264,6 +264,7 @@
BI:
* 3271 New option in aggregation for tuning aggregation of downtimes...
+ * 3396 Change default setting of Precompile aggregations on demand to ON now...
* 3247 FIX: Do not allow multiple BI aggregates with the same title...
* 3232 FIX: BI: Only querying site of host for specific host status info...
* 3291 FIX: Improved error handling when searching for BI aggregations with invalid regex
diff --git a/web/plugins/config/bi.py b/web/plugins/config/bi.py
index a55b1a3..b2a1485 100644
--- a/web/plugins/config/bi.py
+++ b/web/plugins/config/bi.py
@@ -29,4 +29,4 @@ aggregations = []
host_aggregations = []
bi_packs = {}
bi_compile_log = None
-bi_precompile_on_demand = False
+bi_precompile_on_demand = True
diff --git a/web/plugins/wato/check_mk_configuration.py b/web/plugins/wato/check_mk_configuration.py
index 66ef2a5..1392ad6 100644
--- a/web/plugins/wato/check_mk_configuration.py
+++ b/web/plugins/wato/check_mk_configuration.py
@@ -398,7 +398,7 @@ register_configvar(group,
"to change the precompilation to be executed on demand. BI only precompiles the "
"aggregations which are really requested by the users."
),
- default_value = False),
+ default_value = True),
domain = "multisite")
register_configvar(group,
Module: check_mk
Branch: master
Commit: d3b7be700c083542b9835afdd04d39539d5483c2
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d3b7be700c0835…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Apr 13 12:20:41 2016 +0200
3395 FIX Fix performance issue when many BI aggregations are active
If you have created 1000 or more aggregations and show a view with many
hosts or services than you could get massive performance and memory problems
in your Apache process. The reason is the computation of the BI icon in the
drop down menus of hosts and services. This was only done in order to
check the visibility of the menu itself. The menu is now always visible
and thus the computation is not longer neccessary.
---
.werks/3395 | 15 +++++++++++++++
ChangeLog | 1 +
web/plugins/icons/builtin.py | 4 ----
3 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/.werks/3395 b/.werks/3395
new file mode 100644
index 0000000..9cfedc0
--- /dev/null
+++ b/.werks/3395
@@ -0,0 +1,15 @@
+Title: Fix performance issue when many BI aggregations are active
+Level: 2
+Component: multisite
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1460542721
+
+If you have created 1000 or more aggregations and show a view with many
+hosts or services than you could get massive performance and memory problems
+in your Apache process. The reason is the computation of the BI icon in the
+drop down menus of hosts and services. This was only done in order to
+check the visibility of the menu itself. The menu is now always visible
+and thus the computation is not longer neccessary.
diff --git a/ChangeLog b/ChangeLog
index d7c0289..43e5d06 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -192,6 +192,7 @@
* 3374 FIX: Fixed broken Logwatch page when a host has no log directory (yet)
* 3375 FIX: Fixed exception when adding a bookmark while having a list not named my_bookmarks
* 3118 FIX: Availability view now takes daylight saving time into account
+ * 3395 FIX: Fix performance issue when many BI aggregations are active...
WATO:
diff --git a/web/plugins/icons/builtin.py b/web/plugins/icons/builtin.py
index 801d69a..29e84c7 100644
--- a/web/plugins/icons/builtin.py
+++ b/web/plugins/icons/builtin.py
@@ -84,10 +84,6 @@ def paint_action_menu(what, row, tags, host_custom_vars):
if html.has_var('_display_options'):
url_vars.append(('_display_options', html.var('_display_options')))
- icons = get_icons(what, row, toplevel=False)
- if not icons:
- return # Don't paint the menu trigger when the menu would be empty
-
return html.render_popup_trigger(
html.render_icon('menu', _('Open the action menu'), cssclass="iconbutton"),
'action_menu', 'action_menu', url_vars=url_vars)