Module: check_mk
Branch: master
Commit: f3bc7674a09a4f192a07b6411763e7944b00149b
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f3bc7674a09a4f…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Mon May 28 10:23:29 2018 +0200
Use .tar.gz instead of .7z for snap7.
Change-Id: Ie78ce47ce2c62e7f2a80683db061b69e65903b1c
---
omd/packages/snap7/Makefile | 18 ++++++++++++++----
omd/packages/snap7/snap7-full-1.4.2.7z | Bin 20591252 -> 0 bytes
omd/packages/snap7/snap7-full-1.4.2.tar.gz | Bin 0 -> 877241 bytes
3 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/omd/packages/snap7/Makefile b/omd/packages/snap7/Makefile
index 854caaa..52fb590 100644
--- a/omd/packages/snap7/Makefile
+++ b/omd/packages/snap7/Makefile
@@ -10,11 +10,11 @@ ifeq ($(ARCH),i686)
ARCH=i386
endif
-.PHONY: build install skel clean
+.PHONY: build install skel clean repackage
build: check-python
- 7z x $(DIR).7z
- cd $(DIR)/build/unix && $(MAKE) -f $(ARCH)_linux.mk
+ tar xzf $(DIR).tar.gz
+ $(MAKE) -C $(DIR)/build/unix -f $(ARCH)_linux.mk
install:
mkdir -p $(DESTDIR)$(OMD_ROOT)/lib
@@ -23,4 +23,14 @@ install:
skel:
clean:
- rm -rf $(DIR) $(PY_DIR)
+ rm -rf $(DIR) $(DIR).7z
+
+# The original 7z file is quite large (20MB), because it contains tons of
+# executables, but we don't need any of them. An equivalent .tar.gz would almost
+# be 60MB. Furthermore, requiring a 7z command at build time on a ton of
+# platforms is annoying (adding repos, varying names, etc.), so we repackage the
+# 7z file to a standard gzipped tar file.
+repackage: clean
+ wget https://sourceforge.net/projects/snap7/files/$(VERSION)/$(DIR).7z
+ 7z x $(DIR).7z
+ GZIP=-9 tar cvzf $(DIR).tar.gz $(DIR)/build $(DIR)/src $(DIR)/*.txt
diff --git a/omd/packages/snap7/snap7-full-1.4.2.7z b/omd/packages/snap7/snap7-full-1.4.2.7z
deleted file mode 100644
index 96d4565..0000000
Binary files a/omd/packages/snap7/snap7-full-1.4.2.7z and /dev/null differ
diff --git a/omd/packages/snap7/snap7-full-1.4.2.tar.gz b/omd/packages/snap7/snap7-full-1.4.2.tar.gz
new file mode 100644
index 0000000..4ecb82f
Binary files /dev/null and b/omd/packages/snap7/snap7-full-1.4.2.tar.gz differ
Module: check_mk
Branch: master
Commit: 43a91603fe44c293a70caf9685843815465cfcdb
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=43a91603fe44c2…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon May 28 08:15:21 2018 +0200
6180 FIX docker: Try to execute agent only in containers having the bash
Change-Id: I8d579a6dc5831780ca41598af537c0254ec068c7
---
.werks/6180 | 11 +++++++++++
agents/check_mk_agent.linux | 8 ++------
2 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/.werks/6180 b/.werks/6180
new file mode 100644
index 0000000..0bc6c78
--- /dev/null
+++ b/.werks/6180
@@ -0,0 +1,11 @@
+Title: docker: Try to execute agent only in containers having the bash
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1527445495
+
+
diff --git a/agents/check_mk_agent.linux b/agents/check_mk_agent.linux
index 85c7d4c..4347424 100755
--- a/agents/check_mk_agent.linux
+++ b/agents/check_mk_agent.linux
@@ -1047,12 +1047,8 @@ if type docker > /dev/null 2>&1 ; then
AGENT_PATH=$(docker container exec "$CONTAINER_ID" which check_mk_agent 2>/dev/null)
if [ -n "$AGENT_PATH" ]; then
docker container exec --env "REMOTE=$REMOTE" "$CONTAINER_ID" check_mk_agent
- else
- # TODO: In case the docker part is added to the official agent script
- # erase the hard coded path and replace it with 'basename "$0"'.
- # In case the docker stuff remains as plugin, at least replace it with
- # to get the agent path $(type check_mk_agent).
- docker container exec --env "MK_FROM_NODE=1,REMOTE=$REMOTE" -i "$CONTAINER_ID" bash </usr/bin/check_mk_agent
+ elif docker container exec "$CONTAINER_ID" which bash >/dev/null 2>&1; then
+ docker container exec --env "MK_FROM_NODE=1,REMOTE=$REMOTE" -i "$CONTAINER_ID" bash < "$0"
fi
echo "<<<<>>>>"
Module: check_mk
Branch: master
Commit: e9232fd829c0cc7615694a6b7fad999166161d02
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e9232fd829c0cc…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon May 28 08:18:01 2018 +0200
6181 FIX Improved execution of agent in containers
When the docker command is available in a container and the Check_MK agent is
executed in this container while it was started from the node, it does not
execute the docker logic.
The REMOTE environment variable was not set correctly in previous 1.5 releases.
Change-Id: I04cde2bd8442061664d56b453e1704abd2d93287
---
.werks/6181 | 15 +++++++++++++++
agents/check_mk_agent.linux | 6 +++---
2 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/.werks/6181 b/.werks/6181
new file mode 100644
index 0000000..b76a5ab
--- /dev/null
+++ b/.werks/6181
@@ -0,0 +1,15 @@
+Title: Improved execution of agent in containers
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1527446328
+
+When the docker command is available in a container and the Check_MK agent is
+executed in this container while it was started from the node, it does not
+execute the docker logic.
+
+The REMOTE environment variable was not set correctly in previous 1.5 releases.
diff --git a/agents/check_mk_agent.linux b/agents/check_mk_agent.linux
index 4347424..14696be 100755
--- a/agents/check_mk_agent.linux
+++ b/agents/check_mk_agent.linux
@@ -992,7 +992,7 @@ if type pvecm > /dev/null 2>&1 ; then
fi
# Iterate all running containers and report piggyback data for them
-if type docker > /dev/null 2>&1 ; then
+if type docker > /dev/null 2>&1 && [ -z "$MK_IS_PIGGYBACKED" ]; then
NODE_NAME=$(docker info --format "{{json .Name}}")
echo "<<<docker_node_info>>>"
@@ -1046,9 +1046,9 @@ if type docker > /dev/null 2>&1 ; then
# a little more complex setup. Have a look at the documentation.
AGENT_PATH=$(docker container exec "$CONTAINER_ID" which check_mk_agent 2>/dev/null)
if [ -n "$AGENT_PATH" ]; then
- docker container exec --env "REMOTE=$REMOTE" "$CONTAINER_ID" check_mk_agent
+ docker container exec --env MK_IS_PIGGYBACKED=1 --env "REMOTE=$REMOTE" "$CONTAINER_ID" check_mk_agent
elif docker container exec "$CONTAINER_ID" which bash >/dev/null 2>&1; then
- docker container exec --env "MK_FROM_NODE=1,REMOTE=$REMOTE" -i "$CONTAINER_ID" bash < "$0"
+ docker container exec --env MK_IS_PIGGYBACKED=1 --env MK_FROM_NODE=1 --env "REMOTE=$REMOTE" -i "$CONTAINER_ID" bash < "$0"
fi
echo "<<<<>>>>"
Module: check_mk
Branch: master
Commit: 80eddba50341daf382347ac46d3e9a328390fe86
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=80eddba50341da…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon May 28 09:28:44 2018 +0200
6182 FIX Users: Fixed misleading message "User synchronization successful" when opening users page
Sometimes, after the user sync has been executed, when opening the users page, it showed the
message "User synchronization successful" even when no user synchronization is configured.
This message is not shown anymore.
Change-Id: I2cbfc6b89494c2575259e2796a564d8b243dd44d
---
.werks/6182 | 13 +++++++++++++
web/htdocs/wato.py | 6 +++---
2 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/.werks/6182 b/.werks/6182
new file mode 100644
index 0000000..27fae6a
--- /dev/null
+++ b/.werks/6182
@@ -0,0 +1,13 @@
+Title: Users: Fixed misleading message "User synchronization successful" when opening users page
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1527492452
+
+Sometimes, after the user sync has been executed, when opening the users page, it showed the
+message "User synchronization successful" even when no user synchronization is configured.
+This message is not shown anymore.
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 6ff6b96..5c78e66 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -10911,11 +10911,11 @@ class ModeUsers(WatoMode):
url = html.makeuri([])
html.immediate_browser_redirect(2, url)
- elif self._job_snapshot.state() == gui_background_job.background_job.JobStatus.state_finished and not\
- self._job_snapshot.acknowledged_by():
+ elif self._job_snapshot.state() == gui_background_job.background_job.JobStatus.state_finished \
+ and not self._job_snapshot.acknowledged_by():
# Just finished, auto-acknowledge
userdb.UserSyncBackgroundJob().acknowledge(config.user.id)
- html.message(_("User synchronization successful"))
+ #html.message(_("User synchronization successful"))
elif not self._job_snapshot.acknowledged_by() and self._job_snapshot.has_exception():
# Finished, but not OK - show info message with links to details
Module: check_mk
Branch: master
Commit: 16bdad2c12f8ea14e52fa1e00112435ec1052771
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=16bdad2c12f8ea…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri May 25 20:52:27 2018 +0200
6175 FIX docker_container_status: Fixed broken check regression in 1.5.0b5
Change-Id: I201b52975adacb227398fdbfbcb7d755ebef1098
---
.werks/6175 | 11 +++++++++++
checks/docker_container_status | 4 ++--
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/.werks/6175 b/.werks/6175
new file mode 100644
index 0000000..b5d65cc
--- /dev/null
+++ b/.werks/6175
@@ -0,0 +1,11 @@
+Title: docker_container_status: Fixed broken check regression in 1.5.0b5
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1527274321
+
+
diff --git a/checks/docker_container_status b/checks/docker_container_status
index 09e47e4..68604bb 100644
--- a/checks/docker_container_status
+++ b/checks/docker_container_status
@@ -28,14 +28,14 @@
def parse_docker_container_status(info):
- if not info:
+ if not info or not info[0]:
return
# In case there are multiple lines of output sent by the agent only process the first
# line. We assume that this a full JSON object. The rest of the section is skipped.
# When a container got piggyback data from multiple hosts (e.g. a cluster) this results
# in multiple JSON objects handed over to this check.
- json_raw_data = info[0]
+ json_raw_data = info[0][0]
import json
return json.loads(json_raw_data)