Module: check_mk
Branch: master
Commit: d31c104b2b0c87a9a0aae85ae817182e130baa4f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d31c104b2b0c87…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Dec 8 14:09:21 2014 +0100
#1708 FIX cups_queues: fix outputting of current printer jobs if printer daemon is CUPS
The fix is in <tt>check_mk_agent.linux</tt> so you need to update the agent if
you
want to deploy that fix. Thanks to Gerald Schroll.
---
.werks/1708 | 10 ++++++++++
ChangeLog | 1 +
agents/check_mk_agent.linux | 2 +-
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/.werks/1708 b/.werks/1708
new file mode 100644
index 0000000..43a7934
--- /dev/null
+++ b/.werks/1708
@@ -0,0 +1,10 @@
+Title: cups_queues: fix outputting of current printer jobs if printer daemon is CUPS
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.5i7
+Date: 1418044064
+Class: fix
+
+The fix is in <tt>check_mk_agent.linux</tt> so you need to update the agent
if you
+want to deploy that fix. Thanks to Gerald Schroll.
diff --git a/ChangeLog b/ChangeLog
index d98610d..fd8d079 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -125,6 +125,7 @@
* 1455 FIX: hp_proliant_mem: avoid a crash of the check when module_condition is
empty
* 1688 FIX: juniper_screenos_mem: Fixed wrong total memory computation
* 1658 FIX: agent_vsphere: no longer crashes when decommissioned vms report no
hardware information...
+ * 1708 FIX: cups_queues: fix outputting of current printer jobs if printer daemon is
CUPS...
Multisite:
* 1508 Allow input of plugin output and perfdata when faking check results...
diff --git a/agents/check_mk_agent.linux b/agents/check_mk_agent.linux
index 40d0b7e..a0d7b78 100755
--- a/agents/check_mk_agent.linux
+++ b/agents/check_mk_agent.linux
@@ -454,7 +454,7 @@ if type lpstat > /dev/null 2>&1; then
echo '---'
lpstat -o | while read LINE
do
- PRINTER=$(echo $LINE | awk '{print $2}')
+ PRINTER=${LINE%%-*}
if echo "$LOCAL_PRINTERS" | grep -q "$PRINTER"; then
echo $LINE
fi