Module: check_mk
Branch: master
Commit: 95848f87ff1b462fe945636dfd91e30a8563c23e
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=95848f87ff1b46…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Fri Jan 18 11:56:28 2019 +0100
6966 Expose HW/SW inventory via HTTP API
Check_MK already has an API to retrieve the HW/SW inventory (see Werk
a new <tt>get_inventory</tt> call has been added to the latter, and this is
now the recommended way to retrieve the HW/SW inventory.
The <tt>get_inventory</tt> call has one mandatory key <tt>hosts</tt>, which
has to be a list of host names for which the inventory should be retrieved.
In addtion, two optional keys are supported:
<ul>
<li><tt>paths</tt>: a list of inventory paths for filtering the inventory tree</li>
<li><tt>site</tt>: the site to use</li>
</ul>
Change-Id: Ibf0efe0bf299021029b084ce076fcb293b7d8d02
---
.werks/6966 | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/.werks/6966 b/.werks/6966
new file mode 100644
index 0000000..3dd1668
--- /dev/null
+++ b/.werks/6966
@@ -0,0 +1,22 @@
+Title: Expose HW/SW inventory via HTTP API
+Level: 1
+Component: inv
+Compatible: compat
+Edition: cre
+Version: 1.6.0i1
+Date: 1547808070
+Class: feature
+
+Check_MK already has an API to retrieve the HW/SW inventory (see Werk
+#3585), but it is totally separate from the rest of our usual HTTP API. Now
+a new <tt>get_inventory</tt> call has been added to the latter, and this is
+now the recommended way to retrieve the HW/SW inventory.
+
+The <tt>get_inventory</tt> call has one mandatory key <tt>hosts</tt>, which
+has to be a list of host names for which the inventory should be retrieved.
+In addtion, two optional keys are supported:
+
+<ul>
+<li><tt>paths</tt>: a list of inventory paths for filtering the inventory tree</li>
+<li><tt>site</tt>: the site to use</li>
+</ul>
Module: check_mk
Branch: master
Commit: 4b6733f8b8ff3d4d39a7476c8d8e0d644784a797
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4b6733f8b8ff3d…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Thu Jan 17 12:56:45 2019 +0100
7009 FIX cpu.threads: On Solaris the number of threads was calculated incorrectly
In order to get the number of threads correctly we use 'ps -AL'
instead of 'ps -o comm $ZONE'.
Perhaps you have to adapt configured rules {{Number of threads}}.
Change-Id: I9d1e762dcba95aa0e014c217d246cb288b73622c
---
.werks/7009 | 13 +++++++++++++
agents/check_mk_agent.solaris | 4 ++--
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/.werks/7009 b/.werks/7009
new file mode 100644
index 0000000..b13befe
--- /dev/null
+++ b/.werks/7009
@@ -0,0 +1,13 @@
+Title: cpu.threads: On Solaris the number of threads was calculated incorrectly
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.6.0i1
+Date: 1547725852
+Class: fix
+
+In order to get the number of threads correctly we use 'ps -AL'
+instead of 'ps -o comm $ZONE'.
+
+Perhaps you have to adapt configured rules {{Number of threads}}.
diff --git a/agents/check_mk_agent.solaris b/agents/check_mk_agent.solaris
index c92143a..0a2c320 100755
--- a/agents/check_mk_agent.solaris
+++ b/agents/check_mk_agent.solaris
@@ -289,9 +289,9 @@ fi
# Simulated Output of Linux /proc/cpu
echo '<<<cpu>>>'
load=$(uptime|sed -e 's;.*average: \([0-9]\{1,\}\.[0-9]\{1,\}\), \([0-9]\{1,\}\.[0-9]\{1,\}\), \([0-9]\{1,\}\.[0-9]\{1,\}\).*;\1 \2 \3;')
-ps=$(($(ps -o comm $pszone | wc -l)))
+nthreads=$(ps -AL --no-headers | wc -l)
procs=$(($(psrinfo | wc -l)))
-echo $load 1/$ps $$ $procs
+echo $load 1/$nthreads $$ $procs
# zpool status
Module: check_mk
Branch: master
Commit: 4d585dc76b4c107a2f2fb51ff10927c73bf22f91
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4d585dc76b4c10…
Author: Moritz Kiemer <mo(a)mathias-kettner.de>
Date: Thu Jan 17 16:23:10 2019 +0100
6957 FIX mk_job: Allow monitoring of jobs of users without login shell
Previously, no shell was specified when changing the user ID to read
the users job files. This made it impossible to monitor jobs of users
without login shell, such as "www-data".
The environment variable SHELL is now passed to su.
Change-Id: I1fec0ed68b3ce959f4622b0b7b8f407b4cbe2178
---
.werks/6957 | 13 +++++++++++++
agents/check_mk_agent.linux | 2 +-
agents/check_mk_agent.openwrt | 2 +-
agents/check_mk_agent.solaris | 6 +++---
4 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/.werks/6957 b/.werks/6957
new file mode 100644
index 0000000..f5c6f5b
--- /dev/null
+++ b/.werks/6957
@@ -0,0 +1,13 @@
+Ttle: mk_job: Allow monitoring of jobs of users without login shell
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.6.0i1
+Date: 1547738482
+Class: fix
+
+Previously, no shell was specified when changing the user ID to read
+the users job files. This made it impossible to monitor jobs of users
+without login shell, such as "www-data".
+The environment variable SHELL is now passed to su.
diff --git a/agents/check_mk_agent.linux b/agents/check_mk_agent.linux
index 5e42273..2baf6fa 100755
--- a/agents/check_mk_agent.linux
+++ b/agents/check_mk_agent.linux
@@ -987,7 +987,7 @@ if pushd "$MK_VARDIR/job" >/dev/null; then
do
if [ -d "$username" ] && cd "$username" ; then
if [ $EUID -eq 0 ]; then
- su "$username" -c "head -n -0 -v *"
+ su -s "$SHELL" "$username" -c "head -n -0 -v *"
else
head -n -0 -v ./*
fi
diff --git a/agents/check_mk_agent.openwrt b/agents/check_mk_agent.openwrt
index 331b93c..71d6381 100755
--- a/agents/check_mk_agent.openwrt
+++ b/agents/check_mk_agent.openwrt
@@ -737,7 +737,7 @@ if pushd $MK_VARDIR/job >/dev/null; then
do
if [ -d "$username" ] && cd "$username" ; then
if [ $EUID -eq 0 ]; then
- su "$username" -c "head -n -0 -v *"
+ su -s "$SHELL" "$username" -c "head -n -0 -v *"
else
head -n -0 -v *
fi
diff --git a/agents/check_mk_agent.solaris b/agents/check_mk_agent.solaris
index 3420367..c92143a 100755
--- a/agents/check_mk_agent.solaris
+++ b/agents/check_mk_agent.solaris
@@ -166,14 +166,14 @@ if pushd $MK_VARDIR/job >/dev/null; then
for username in *
do
if [ -d "$username" ] && cd "$username" ; then
- count=$(su "$username" -c "ls -1 * | wc -l")
+ count=$(su -s "$SHELL" "$username" -c "ls -1 * | wc -l")
if [ "$count" -eq "1" ]; then
- filename=$(su "$username" -c "ls -1 *")
+ filename=$(su -s "$SHELL" "$username" -c "ls -1 *")
echo "==> $filename <=="
fi
- su "$username" -c "head -n1000 *"
+ su -s "$SHELL" "$username" -c "head -n1000 *"
cd ..
fi
done