Module: check_mk
Branch: master
Commit: cd5276074483256326c318cd7b90d2df9a544fd2
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=cd527607448325…
Author: Marcel Arentz <ma(a)mathias-kettner.de>
Date: Tue Jul 4 09:07:53 2017 +0200
4912 FIX rds_licenses: Fixed exception if agent bakery is used to deploy this plugin
The Agent Bakery threw an exception if someone tried to configure the
deployment by the ruleset. The reason for this has been a wrong path to
the plugin.
Thanks to Stephan Glotzbach for reporting this issue!
Change-Id: Ied842fc1217f2f00e65813700efcb51397cc894c
---
.werks/4912 | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/.werks/4912 b/.werks/4912
new file mode 100644
index 0000000..f51ddf5
--- /dev/null
+++ b/.werks/4912
@@ -0,0 +1,14 @@
+Title: rds_licenses: Fixed exception if agent bakery is used to deploy this plugin
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1499151446
+Class: fix
+
+The Agent Bakery threw an exception if someone tried to configure the
+deployment by the ruleset. The reason for this has been a wrong path to
+the plugin.
+
+Thanks to Stephan Glotzbach for reporting this issue!
Module: check_mk
Branch: master
Commit: 63ce31a7a94e23549796f4a2d82e05d97d60ca28
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=63ce31a7a94e23…
Author: Marcel Arentz <ma(a)mathias-kettner.de>
Date: Wed Apr 5 16:17:40 2017 +0200
4554 FIX cups_queues: Moved agent section into own plugin script
Due performance issues we decided to remove this section from the linux agent
and put into a plugin. Now you are able to define individual caching ages
instead of being forced having a caching of five minutes to satisfy large
environments even if you do not have one.
Change-Id: I068f563794f44f2302f18a242b072a6f20b84d01
---
.werks/4554 | 13 +++++++++++
agents/check_mk_agent.linux | 39 -------------------------------
agents/plugins/mk_cups_queues | 54 +++++++++++++++++++++++++++++++++++++++++++
3 files changed, 67 insertions(+), 39 deletions(-)
diff --git a/.werks/4554 b/.werks/4554
new file mode 100644
index 0000000..50f6236
--- /dev/null
+++ b/.werks/4554
@@ -0,0 +1,13 @@
+Title: cups_queues: Moved agent section into own plugin script
+Level: 1
+Component: checks
+Compatible: incomp
+Edition: cre
+Version: 1.5.0i1
+Date: 1491400977
+Class: fix
+
+Due performance issues we decided to remove this section from the linux agent
+and put into a plugin. Now you are able to define individual caching ages
+instead of being forced having a caching of five minutes to satisfy large
+environments even if you do not have one.
diff --git a/agents/check_mk_agent.linux b/agents/check_mk_agent.linux
index 8af57f4..caeed2a 100755
--- a/agents/check_mk_agent.linux
+++ b/agents/check_mk_agent.linux
@@ -577,45 +577,6 @@ if [ -e /proc/drbd ]; then
cat /proc/drbd
fi
-# Status of CUPS printer queues
-if type lpstat > /dev/null 2>&1; then
- # Systemd starts cupsd on demand: Instead of checking that the cupsd is
- # running we check that the cups service exists and is enabled.
- if pgrep -f "\bcupsd" > /dev/null 2>&1 \
- || (type systemctl >/dev/null 2>&1 && systemctl is-enabled cups.service); then
- # first define a function to check cups
- function cups_queues () {
- CPRINTCONF=/etc/cups/printers.conf
- if [ -r "$CPRINTCONF" ] ; then
- LOCAL_PRINTERS=$(grep -E "<(Default)?Printer .*>" $CPRINTCONF | awk '{print $2}' | sed -e 's/>//')
- lpstat -p | while read LINE
- do
- PRINTER=$(echo $LINE | awk '{print $2}')
- if echo "$LOCAL_PRINTERS" | grep -q "$PRINTER"; then
- echo $LINE
- fi
- done
- echo '---'
- lpstat -o | while read LINE
- do
- PRINTER=${LINE%%-*}
- if echo $LOCAL_PRINTERS | grep -q $PRINTER; then
- echo $LINE
- fi
- done
- else
- lpstat -p
- echo '---'
- lpstat -o | sort
- fi
- }
- # Make cups_queues available for subshell
- export -f cups_queues
- # Use cups_queues function with run_cached and cache time of 5 mins
- run_cached -s cups_queues 300 "cups_queues"
- fi
-fi
-
# Heartbeat monitoring
# Different handling for heartbeat clusters with and without CRM
# for the resource state
diff --git a/agents/plugins/mk_cups_queues b/agents/plugins/mk_cups_queues
new file mode 100755
index 0000000..986a7ef
--- /dev/null
+++ b/agents/plugins/mk_cups_queues
@@ -0,0 +1,54 @@
+#!/bin/bash
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2017 mk(a)mathias-kettner.de |
+# +------------------------------------------------------------------+
+#
+# This file is part of Check_MK.
+# The official homepage is at http://mathias-kettner.de/check_mk.
+#
+# check_mk is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation in version 2. check_mk is distributed
+# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
+# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE. See the GNU General Public License for more de-
+# tails. You should have received a copy of the GNU General Public
+# License along with GNU Make; see the file COPYING. If not, write
+# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+# Boston, MA 02110-1301 USA.
+
+if type lpstat > /dev/null 2>&1 ; then
+ export LC_TIME="en_US.UTF-8"
+ echo "<<<cups_queues>>>"
+ CPRINTCONF=/etc/cups/printers.conf
+ if [ -r "$CPRINTCONF" ] ; then
+ LOCAL_PRINTERS=$(grep -E "<(Default)?Printer .*>" $CPRINTCONF | awk '{print $2}' | sed -e 's/>//')
+ lpstat -p | while read LINE
+ do
+ PRINTER=$(echo $LINE | awk '{print $2}')
+ if echo "$LOCAL_PRINTERS" | grep -q "$PRINTER"; then
+ echo $LINE
+ fi
+ done
+ echo '---'
+ lpstat -o | while read LINE
+ do
+ PRINTER=${LINE%%-*}
+ if echo $LOCAL_PRINTERS | grep -q $PRINTER; then
+ echo $LINE
+ fi
+ done
+ else
+ PRINTER=$(lpstat -p)
+ echo $PRINTER
+ echo '---'
+ QUEUE=$(lpstat -o | sort)
+ echo $QUEUE
+ fi
+fi
Module: check_mk
Branch: master
Commit: fb0d9ff62c70549b851cd6e98a217351f7786a98
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fb0d9ff62c7054…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Jul 4 07:50:03 2017 +0200
Fix an issue with if check family after check file separation
Change-Id: I88b3f511cd6b28994e26fb0975371346c86475c2
---
cmk_base/checks.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/cmk_base/checks.py b/cmk_base/checks.py
index 5ed07d4..ba0e41b 100644
--- a/cmk_base/checks.py
+++ b/cmk_base/checks.py
@@ -156,6 +156,13 @@ def load_checks(filelist):
else:
context_ident_list += new_checks
+ # Hack to make dependencies between multiple includes work. In case we
+ # need more here we need to find another solution.
+ # TODO(lm): This needs to be cleaned up. Try to move the includes to
+ # python modules that are separated from each other and can refer to
+ # each other.
+ _include_contexts["if64.include"].update(_include_contexts["if.include"])
+
config.add_check_variables(check_variable_defaults)
# Now convert check_info to new format.
Module: check_mk
Branch: master
Commit: 650e400ad7178bcecee44b02ba9a00c2433cc34c
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=650e400ad7178b…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Jul 3 14:39:29 2017 +0200
Updated bug entries #2176
Change-Id: I0cd05e6859c9d956c3f9782ed0142e673df1b151
---
.bugs/2176 | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/.bugs/2176 b/.bugs/2176
index 705cf9e..0aad377 100644
--- a/.bugs/2176
+++ b/.bugs/2176
@@ -8,3 +8,13 @@ Class: bug
If logwatch detects a new logfile it starts at the end of this file.
If a logfile is generated daily with a new timestamp the initial lines
are skipped and error messages might get lost.
+
+The logwatch.cfg needs to be exteded to give the user the option to tell mk_logwatch
+that to start from beginning of new files instead from the end of that file
+
+The option could be named e.g. "fromstart"
+
+Todos:
+
+- Add option parsing (line ~500)
+- Implementation in process_logfile()