Module: check_mk
Branch: master
Commit: b664ea5608d2e53ac3f0d37eccd9551881faf823
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b664ea5608d2e5…
Author: Andreas Umbreit <au(a)mathias-kettner.de>
Date: Mon Oct 22 16:52:45 2018 +0200
5516 FIX cmk-update-agent: Catch HTTPS redirect
A communication between the Agent Updater and the Check_MK-Server
won't succeed if the communication protocol is configured to HTTP
while the server enforces HTTPS. The reason is that the POST data
sent by the Agent Updater will be lost on the redirect.
So far, this is normal HTTP behavior. Nonetheless, the Agent Updater
now handles this situation by detecting the redirect and directly
sending its data via (unverified) HTTPS.
A warning will therefore be displayed to the user respectively written
to log.
(Jira: FEED-3002)
Change-Id: I0e43e5706cafcb4029c4d0e3bfe1c58fd8a7e70d
---
.werks/5516 | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/.werks/5516 b/.werks/5516
new file mode 100644
index 0000000..4bcd19b
--- /dev/null
+++ b/.werks/5516
@@ -0,0 +1,21 @@
+Title: cmk-update-agent: Catch HTTPS redirect
+Level: 1
+Component: agents
+Class: fix
+Compatible: compat
+Edition: cee
+State: unknown
+Version: 1.6.0i1
+Date: 1540222280
+
+A communication between the Agent Updater and the Check_MK-Server
+won't succeed if the communication protocol is configured to HTTP
+while the server enforces HTTPS. The reason is that the POST data
+sent by the Agent Updater will be lost on the redirect.
+
+So far, this is normal HTTP behavior. Nonetheless, the Agent Updater
+now handles this situation by detecting the redirect and directly
+sending its data via (unverified) HTTPS.
+
+A warning will therefore be displayed to the user respectively written
+to log.
Module: check_mk
Branch: master
Commit: c1e00bd6c81cb7101bf74ec7baa1e7e34e87974d
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c1e00bd6c81cb7…
Author: Óscar Nájera <on(a)mathias-kettner.de>
Date: Mon Oct 22 12:53:21 2018 +0200
6645 FIX Solaris Agent: Correctly separate cputime and elapsed time
The process information delivered by the agent has been upgrated multiple
times by requirements of users or information available from the OS. The ps
agent tracked the memory outilization of a process by its name, but could
not access information of process id and the time of life(elapsed time) of
a running process, as such information was misplaced by the agent and thus
ignored by the check. This fix brings this data into consideration by the
check.
Change-Id: Ia6f2df3ee5c074c258ed9a301716c923a3a11451
---
.werks/6645 | 11 +++++++++++
agents/check_mk_agent.solaris | 2 +-
checks/ps.include | 27 ++++++++++++++++-----------
3 files changed, 28 insertions(+), 12 deletions(-)
diff --git a/.werks/6645 b/.werks/6645
new file mode 100644
index 0000000..b85a4a1
--- /dev/null
+++ b/.werks/6645
@@ -0,0 +1,11 @@
+Title: Solaris Agent: Correctly separate cputime and elapsed time in agent info
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.6.0i1
+Date: 1540280877
+Class: fix
+
+The process information delivered by the agent has been upgrated multiple times by requirements of users or information available from the OS. The ps agent tracked the memory outilization of a process by its name, but could not access information of process id and the time of life(elapsed time) of a running process, as such information was misplaced by the agent and thus ignored by the check. This fix brings this data into consideration by the check.
+
diff --git a/agents/check_mk_agent.solaris b/agents/check_mk_agent.solaris
index 5810ee2..fbab57b 100755
--- a/agents/check_mk_agent.solaris
+++ b/agents/check_mk_agent.solaris
@@ -228,7 +228,7 @@ echo '<<<ps>>>'
if [ -x /usr/ucb/ps ]; then
UCB_PS=$(/usr/ucb/ps -agwwwx)
PS=$(ps -o user,vsz,rss,pcpu,etime,pid,args $pszone | \
- sed -e 1d -e 's/ *\([^ ]*\) *\([^ ]*\) *\([^ ]*\) *\([^ ]*\) *\([^ ]*\) *\([^ ]*\) */(\1,\2,\3,\4,\5,\6) /')
+ sed -e 1d -e 's/ *\([^ ]*\) *\([^ ]*\) *\([^ ]*\) *\([^ ]*\) *\([^ ]*\) *\([^ ]*\) */(\1,\2,\3,\4\/\5,\6) /')
while read -r LINE; do
STATS=${LINE%) *}
PID=${STATS##*,}
diff --git a/checks/ps.include b/checks/ps.include
index 9ca4c99..c3a11a0 100644
--- a/checks/ps.include
+++ b/checks/ps.include
@@ -418,18 +418,21 @@ def check_ps_common(item, params, parsed, cpu_cores = 1, info_name = "processes"
else:
# process_info[3] contains the used CPU time and possibly, separated by /, also
# the total elapsed time since the birth of the process.
- if ":" in process_info[3]:
- if '/' in process_info[3]:
- pcpu_text, elapsed_text = process_info[3].split('/')
- elapsed = parse_ps_time(elapsed_text)
- max_elapsed = max(max_elapsed, elapsed)
- if min_elapsed is None:
- min_elapsed = elapsed
- else:
- min_elapsed = min(min_elapsed, elapsed)
+ if '/' in process_info[3]:
+ pcpu_text, elapsed_text = process_info[3].split('/')
+ else:
+ pcpu_text = process_info[3]
+ elapsed_text = None
+
+ if elapsed_text:
+ elapsed = parse_ps_time(elapsed_text)
+ max_elapsed = max(max_elapsed, elapsed)
+ if min_elapsed is None:
+ min_elapsed = elapsed
else:
- pcpu_text = process_info[3]
+ min_elapsed = min(min_elapsed, elapsed)
+ if ":" in pcpu_text:
total_seconds = parse_ps_time(pcpu_text)
pid = process_info[4]
try:
@@ -440,10 +443,12 @@ def check_ps_common(item, params, parsed, cpu_cores = 1, info_name = "processes"
pcpu = cputime * 100
process.append(("pid", (pid, "")))
else:
- pcpu = savefloat(process_info[3])
+ pcpu = float(pcpu_text)
+
percent_cpu += pcpu
process.append(("cpu usage", (pcpu, "%")))
+
elif command_line:
# otherwise we have only two fields, one of which is the node. if the remaining
# field is not the process name, that ps makes no sense at all
Module: check_mk
Branch: master
Commit: 9a04e136e523dcc9027e869d107f63ccb0c30d85
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9a04e136e523dc…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Oct 22 20:02:25 2018 +0200
Fixed loading of inline images (data:image/png;base64,...)
The recently introduced content security policy denied loading
this kind of images. We use them in some places, for example in
the modern theme or in the icon manager.
Change-Id: Ida5c355094a01d16ee8f7118e8d9a739e37bd16f
---
omd/packages/apache-omd/skel/etc/apache/conf.d/security.conf | 3 +++
1 file changed, 3 insertions(+)
diff --git a/omd/packages/apache-omd/skel/etc/apache/conf.d/security.conf b/omd/packages/apache-omd/skel/etc/apache/conf.d/security.conf
index 7122129..01e185a 100644
--- a/omd/packages/apache-omd/skel/etc/apache/conf.d/security.conf
+++ b/omd/packages/apache-omd/skel/etc/apache/conf.d/security.conf
@@ -16,6 +16,9 @@
# Default policy for all not configured ones
Header always set Content-Security-Policy "default-src 'self' 'unsafe-inline' 'unsafe-eval'"
+ # Allow local images and data URLs e.g. from CSS files
+ Header always set Content-Security-Policy "img-src 'self' data:"
+
# Allow AJAX calls to current scheme/url/port and the crash report API
Header always append Content-Security-Policy "connect-src 'self' https://mathias-kettner.de/crash_report.php"
Module: check_mk
Branch: master
Commit: 35925ccc998a23d9a843472955b81336ab20017a
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=35925ccc998a23…
Author: Moritz Kiemer <mo(a)mathias-kettner.de>
Date: Fri Oct 19 16:09:47 2018 +0200
6834 df: Optionally produce metrics compatible to unix df command
Exclude space reserved for the <tt>root</tt> user from calculation of used space.
By default Check_MK treats space that is reserved for the <tt>root</tt> user on
Linux and Unix as used space. Usually, 5% are being reserved for root when a new
filesystem is being created.
With this new option in the ruleset "Filesystem (used space and growth)" you can
have Check_MK exclude the current amount of reserved but yet unused space from
the calculations regarding the used space (absolute and percentage).
CMK-1181
Change-Id: I5fef83d8edbf965257815c06ed3e5bfb99705680
---
.werks/6834 | 18 ++++++++
checks/df.include | 52 ++++++++++++++--------
cmk/gui/plugins/metrics/check_mk.py | 34 +++++++++++++-
cmk/gui/plugins/wato/check_parameters.py | 14 +++++-
.../generictests/datasets/df_lnx_regression.py | 14 ++++++
.../datasets/netapp_api_qtree_quota_regression.py | 2 +-
6 files changed, 112 insertions(+), 22 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=35925ccc99…