Checkmk Enterprise Edition 2.0.0p12
If you have CUPS queues with dashes in the name, like “Cups-PDF”, they will not be reported by mk_cups_queues. The reason is the Perl expression in line 19: “\w+” doesn’t match dashes. It only matches [A-Za-z0-9_].
Please change the expression to “[A-Za-z0-9_-]+”.
You can apply the following patch:
--- old/mk_cups_queues 2022-01-13 13:29:01.000000000 +0100
+++ mk_cups_queues 2022-01-13 14:07:03.505227248 +0100
@@ -16,7 +16,7 @@
echo "<<<cups_queues>>>"
CPRINTCONF=/etc/cups/printers.conf
if [ -r "$CPRINTCONF" ] ; then
- LOCAL_PRINTERS=$(perl -ne '/<(?:Default)?Printer (\w+)>/ && print "$1\n"' $CPRINTCONF)
+ LOCAL_PRINTERS=$(perl -ne '/<(?:Default)?Printer ([A-Za-z0-9_-]+)>/ && print "$1\n"' $CPRINTCONF)
lpstat -h localhost -p | while read LINE
do
PRINTER=$(echo "$LINE" | awk '{print $2}')