Module: check_mk
Branch: master
Commit: ab2212af950b967bb34c48aeca5490e0ca717326
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ab2212af950b96…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Sep 28 10:26:15 2018 +0200
6773 FIX Fixed URL redirect from /[site]/ when using custom ports
Requests to the GUI were not done correctly when a non standard port is used
for accessing the GUI. The redirect from <tt>/[site]/</tt> or <tt>/[site]</tt>
to <tt>/[site]/check_mk/</tt> was setting the URL back to standard ports.
Change-Id: I905b696c5d28dcd4b3cefe36d2560d83ea18ae9c
---
.werks/6773 | 13 +++++++++++++
omd/packages/omd/skel/etc/apache/conf.d/omd.conf | 2 +-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/.werks/6773 b/.werks/6773
new file mode 100644
index 0000000..c9cfeca
--- /dev/null
+++ b/.werks/6773
@@ -0,0 +1,13 @@
+Title: Fixed URL redirect from /[site]/ when using custom ports
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1538113544
+
+Requests to the GUI were not done correctly when a non standard port is used
+for accessing the GUI. The redirect from <tt>/[site]/</tt> or <tt>/[site]</tt>
+to <tt>/[site]/check_mk/</tt> was setting the URL back to standard ports.
diff --git a/omd/packages/omd/skel/etc/apache/conf.d/omd.conf b/omd/packages/omd/skel/etc/apache/conf.d/omd.conf
index 49949c0..607f56d 100644
--- a/omd/packages/omd/skel/etc/apache/conf.d/omd.conf
+++ b/omd/packages/omd/skel/etc/apache/conf.d/omd.conf
@@ -9,7 +9,7 @@ RewriteCond %{HTTP:X-Forwarded-Proto} =https [OR]
RewriteCond %{HTTPS} =on
RewriteRule ^/###SITE###(/?|/check_mk)$ - [env=proto:https]
-RewriteRule ^/###SITE###(/?|/check_mk)$ %{ENV:proto}://%{SERVER_NAME}/###SITE###/check_mk/ [R=302]
+RewriteRule ^/###SITE###(/?|/check_mk)$ %{ENV:proto}://%{HTTP_HOST}/###SITE###/check_mk/ [R=302,L]
Alias /###SITE###/omd "###ROOT###/share/omd/htdocs"
Module: check_mk
Branch: master
Commit: 6f384ade9e63c69b11272d59c7b1ac9ab72fd110
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6f384ade9e63c6…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Sep 27 16:10:22 2018 +0200
6771 FIX Fixed minor graph rendering issues when using the modern theme
The graph time axis labels had a slightly wrong background color. And
the graph hover indicator line had a wrong position in relation to the
mouse pointer.
Change-Id: Ic9101460775ed49d2a610515368250765f338308
---
.werks/6771 | 12 ++++++++++++
web/htdocs/themes/facelift/theme.css | 1 -
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/.werks/6771 b/.werks/6771
new file mode 100644
index 0000000..4ae7d4e
--- /dev/null
+++ b/.werks/6771
@@ -0,0 +1,12 @@
+Title: Fixed minor graph rendering issues when using the modern theme
+Level: 1
+Component: metrics
+Compatible: compat
+Edition: cee
+Version: 1.6.0i1
+Date: 1538057332
+Class: fix
+
+The graph time axis labels had a slightly wrong background color. And
+the graph hover indicator line had a wrong position in relation to the
+mouse pointer.
diff --git a/web/htdocs/themes/facelift/theme.css b/web/htdocs/themes/facelift/theme.css
index dedd152..fef0d1c 100644
--- a/web/htdocs/themes/facelift/theme.css
+++ b/web/htdocs/themes/facelift/theme.css
@@ -644,7 +644,6 @@ tr.groupheader a, tr.groupheader body.main .popup_menu span, body.main .popup_me
div.graph_with_timeranges {
margin-bottom: 32px; }
div.graph_with_timeranges div.graph {
- padding: 8px !important;
box-shadow: none !important;
border: 1px solid #cccfdb !important;
background-color: transparent !important;
Module: check_mk
Branch: master
Commit: fb1644cd1ce0a06c97cc554dc02841ce1407c10f
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fb1644cd1ce0a0…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Sep 28 10:29:06 2018 +0200
6772 FIX LDAP: Only save users on changed configuration
The LDAP synchronization was rewriting the user configuration during
every synchronization, even when no change has been made to the user
configuration.
This needless operation resulted in subsequent load because some
processes, like the Check_MK alert and notify helper were reloading
their configuration in case of a changed Check_MK config file.
Change-Id: I331028d50d7ea99b5f6c18ecdc555cbb437156ac
---
.werks/6772 | 17 +++++++++++++++++
cmk/gui/plugins/userdb/ldap_connector.py | 5 ++++-
cmk/gui/userdb.py | 6 +++++-
3 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/.werks/6772 b/.werks/6772
new file mode 100644
index 0000000..af71d52
--- /dev/null
+++ b/.werks/6772
@@ -0,0 +1,17 @@
+Title: LDAP: Only save users on changed configuration
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1538063535
+
+The LDAP synchronization was rewriting the user configuration during
+every synchronization, even when no change has been made to the user
+configuration.
+
+This needless operation resulted in subsequent load because some
+processes, like the Check_MK alert and notify helper were reloading
+their configuration in case of a changed Check_MK config file.
diff --git a/cmk/gui/plugins/userdb/ldap_connector.py b/cmk/gui/plugins/userdb/ldap_connector.py
index bdf1cdf..8af2b1a 100644
--- a/cmk/gui/plugins/userdb/ldap_connector.py
+++ b/cmk/gui/plugins/userdb/ldap_connector.py
@@ -1103,7 +1103,10 @@ class LDAPUserConnector(UserConnector):
if changes and config.wato_enabled and not config.is_wato_slave_site():
watolib.add_change("edit-users", "<br>\n".join(changes), add_user=False)
- userdb.save_users(users)
+ if changes:
+ userdb.save_users(users)
+ else:
+ userdb.release_users_lock()
self._set_last_sync_time()
diff --git a/cmk/gui/userdb.py b/cmk/gui/userdb.py
index 8d226ee..920382a 100644
--- a/cmk/gui/userdb.py
+++ b/cmk/gui/userdb.py
@@ -754,7 +754,7 @@ def save_users(profiles):
# Release the lock to make other threads access possible again asap
# This lock is set by load_users() only in the case something is expected
# to be written (like during user syncs, wato, ...)
- store.release_lock(root_dir + "contacts.mk")
+ release_users_lock()
# populate the users cache
# TODO: Can we clean this up?
@@ -764,6 +764,10 @@ def save_users(profiles):
hooks.call("users-saved", updated_profiles)
+def release_users_lock():
+ store.release_lock(root_dir + "contacts.mk")
+
+
# TODO: Isn't this needed only while generating the contacts.mk?
# Check this and move it to the right place
def _add_custom_macro_attributes(profiles):
Module: check_mk
Branch: master
Commit: 79e551186b02cfbdbc1a9f681a6c07ac231984a8
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=79e551186b02cf…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Thu Sep 27 16:47:59 2018 +0200
6735 FIX cpu_util_unix: Fixed calculation of CPU usage on UNIX
Thanks to Juergen Raschke for his patch!
The result of the cpu_usage is wrong. The cpu_time_guest is included in
cpu_time_user: See
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/kerne…
for more information:
<code>
/*
* Account guest CPU time to a process.
* @p: the process that the CPU time gets accounted to
* @cputime: the CPU time spent in virtual machine since the last update
*/
void account_guest_time(struct task_struct *p, u64 cputime)
{
u64 *cpustat = kcpustat_this_cpu->cpustat;
/* Add guest time to process. */
p->utime += cputime;
account_group_user_time(p, cputime);
p->gtime += cputime;
/* Add guest time to cpustat. */
if (task_nice(p) > 0) {
cpustat[CPUTIME_NICE] += cputime;
cpustat[CPUTIME_GUEST_NICE] += cputime;
} else {
cpustat[CPUTIME_USER] += cputime;
cpustat[CPUTIME_GUEST] += cputime;
}
}
</code>
FEED-935
Change-Id: Ic26ae1d06da1284b61649831e4967776f0a89684
---
.werks/6735 | 40 ++++++++++++++++++++++++++++++++++++++++
checks/cpu_util.include | 16 +++++++++++++---
2 files changed, 53 insertions(+), 3 deletions(-)
diff --git a/.werks/6735 b/.werks/6735
new file mode 100644
index 0000000..4b5ed95
--- /dev/null
+++ b/.werks/6735
@@ -0,0 +1,40 @@
+Title: cpu_util_unix: Fixed calculation of CPU usage on UNIX
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1538059527
+
+The result of the cpu_usage is wrong. The cpu_time_guest is included in
+cpu_time_user: See
+https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/kernel/sched/cputime.c
+for more information:
+
+<code>
+/*
+ * Account guest CPU time to a process.
+ * @p: the process that the CPU time gets accounted to
+ * @cputime: the CPU time spent in virtual machine since the last update
+ */
+void account_guest_time(struct task_struct *p, u64 cputime)
+{
+ u64 *cpustat = kcpustat_this_cpu->cpustat;
+
+ /* Add guest time to process. */
+ p->utime += cputime;
+ account_group_user_time(p, cputime);
+ p->gtime += cputime;
+
+ /* Add guest time to cpustat. */
+ if (task_nice(p) > 0) {
+ cpustat[CPUTIME_NICE] += cputime;
+ cpustat[CPUTIME_GUEST_NICE] += cputime;
+ } else {
+ cpustat[CPUTIME_USER] += cputime;
+ cpustat[CPUTIME_GUEST] += cputime;
+ }
+}
+</code>
diff --git a/checks/cpu_util.include b/checks/cpu_util.include
index c5557cc..eb429af 100644
--- a/checks/cpu_util.include
+++ b/checks/cpu_util.include
@@ -132,8 +132,8 @@ def check_cpu_util(util, params, this_time=None, cores=None):
# - 5 - irq: servicing interrupts
# - 6 - softirq: servicing softirqs
# - 7 - steal: involuntary wait
-# - 8 - guest: time spent in guest OK
-# - 9 - guest_nice: time spent in niced guest OK
+# - 8 - guest: time spent in guest OK, also counted in 0 (user)
+# - 9 - guest_nice: time spent in niced guest OK, also counted in 1 (nice)
def check_cpu_util_unix(values, params, cores = None):
this_time = time.time()
# Compute jiffi-differences of all relevant counters
@@ -150,7 +150,17 @@ def check_cpu_util_unix(values, params, cores = None):
if sum_jiffies == 0:
raise MKCounterWrapped("Too short time difference since last check")
- user = diff_values[0] + diff_values[1] # add user + nice
+ user = diff_values[0] + diff_values[1] # add user + nice
+ if len(values) >= 10: # and (values[8] or values[9]):
+ # https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/kerne…
+ # see 'account_guest_time'
+ # if task_nice(p) <= 0:
+ # cpustat[CPUTIME_USER] += cputime;
+ # cpustat[CPUTIME_GUEST] += cputime;
+ subtrahend = diff_values[8] + diff_values[9]
+ user -= subtrahend
+ sum_jiffies -= subtrahend
+
system = diff_values[2] + diff_values[5] + diff_values[6]
wait = diff_values[4]
user_perc = 100.0 * float(user) / float(sum_jiffies)
Module: check_mk
Branch: master
Commit: 6b2ede752bb46a76aed48a4cdbc4bbd2b6144a1f
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6b2ede752bb46a…
Author: Andreas Umbreit <au(a)mathias-kettner.de>
Date: Fri Sep 28 09:49:41 2018 +0200
5511 FIX cmk-update-agent: Improve prelink handling
With werk #5507, we tried to mitigate the impact of prelink on the agent updater binary.
However, it turned out that the corresponding files did not survive every Check_MK Agent
update scenarios.
First of all, please note that we do not recommend the usage of prelink at all, as its benefit is questionable and there are some issues (not limited the the cmk-update-agent binary) that may occur by applying it to a system.
Now, with this werk, the prelink exception for the cmk-update-agent is placed on the target
system in a more robust way.
A blacklist-file at <pre>/etc/prelink.conf.d/cmk-update-agent.conf</pre> is now placed on the target
system regardless of an existing prelink-installation.
If prelink is installed on the target system (i.e. the file /etc/prelink.conf exists),
our blacklist-file will be referenced as an additional prelink configuration file.
If prelink gets installed on the system after the Check_MK Agent, you have to reference
the blacklist-file by yourself. You can do this by adding a line
<pre>
-c /etc/prelink.conf.d/cmk-update-agent.conf
</pre>
to <pre>/etc/prelink.conf</pre>.
However, this mechanism is only available for .rpm and .deb Check_MK Agent pakages.
(Jira Issue: CMK-1056)
Change-Id: Ia65d9dbdc214c405dbe04aa991e43c48c5fa7ab8
---
.werks/5511 | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/.werks/5511 b/.werks/5511
new file mode 100644
index 0000000..c970407
--- /dev/null
+++ b/.werks/5511
@@ -0,0 +1,32 @@
+Title: cmk-update-agent: Improve prelink handling
+Level: 1
+Component: agents
+Class: fix
+Compatible: compat
+Edition: cee
+State: unknown
+Version: 1.6.0i1
+Date: 1538119495
+
+
+With werk #5507, we tried to mitigate the impact of prelink on the agent updater binary.
+However, it turned out that the corresponding files did not survive every Check_MK Agent
+update scenarios.
+
+First of all, please note that we do not recommend the usage of prelink at all,
+as its benefit is questionable and there are some issues
+(not limited the the cmk-update-agent binary) that may occur by applying it to a system.
+
+Now, with this werk, the prelink exception for the cmk-update-agent is placed on the target
+system in a more robust way.
+A blacklist-file at <tt>/etc/prelink.conf.d/cmk-update-agent.conf</tt> is
+now placed on the target system regardless of an existing prelink-installation.
+If prelink is installed on the target system (i.e. the file <tt>/etc/prelink.conf</tt> exists),
+our blacklist-file will be referenced as an additional prelink configuration file.
+If prelink gets installed on the system after the Check_MK Agent, you have to reference
+the blacklist-file by yourself. You can do this by adding a line
+<pre>-c /etc/prelink.conf.d/cmk-update-agent.conf</pre>
+to <tt>/etc/prelink.conf</tt>.
+
+However, this mechanism is only available for .rpm and .deb Check_MK Agent pakages.
+