Hello community,

here is the log from the commit of package nagios-plugins for openSUSE:Factory 
checked in at 2013-03-14 17:29:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/nagios-plugins (Old)
 and      /work/SRC/openSUSE:Factory/.nagios-plugins.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "nagios-plugins", Maintainer is "lr...@suse.com"

Changes:
--------
--- /work/SRC/openSUSE:Factory/nagios-plugins/nagios-plugins.changes    
2013-01-13 14:30:12.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.nagios-plugins.new/nagios-plugins.changes       
2013-03-14 17:29:40.000000000 +0100
@@ -1,0 +2,18 @@
+Fri Feb 22 15:08:06 UTC 2013 - l...@linux-schulserver.de
+
+- release for 12.1 & 12.2 as update: fixes bnc #778970 & bnc #789428
+
+-------------------------------------------------------------------
+Fri Feb  1 15:04:09 UTC 2013 - l...@linux-schulserver.de
+
+- added nagios-plugins-cups from m...@suse.cz
+- recommend additional plugins in nagios-plugins-all
+- decrease dependency in nagios-plugins and nagios-plugins-extras 
+  to allow obsoleting the old packages
+
+-------------------------------------------------------------------
+Wed Jan 30 17:40:59 CET 2013 - r...@suse.de
+
+- allow name resolving for check-ntp plugin in apparmor config 
+
+-------------------------------------------------------------------

Old:
----
  nagios-plugins-check_disk_printf.patch

New:
----
  nagios-plugins-too_few_arguments_for_check_disk.patch
  nagios-plugins.check_cups.sh

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ nagios-plugins.spec ++++++
--- /var/tmp/diff_new_pack.w0JAwz/_old  2013-03-14 17:29:42.000000000 +0100
+++ /var/tmp/diff_new_pack.w0JAwz/_new  2013-03-14 17:29:42.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package nagios-plugins
 #
-# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -35,6 +35,7 @@
 Source15:       nagios-plugins-README.SuSE-check_ide_smart
 Source16:       usr.lib.nagios.plugins.check_dhcp
 Source17:       usr.lib.nagios.plugins.check_ntp_time
+Source18:       nagios-plugins.check_cups.sh
 Patch1:         nagios-plugins-1.4.14-ntpd.patch
 Patch2:         nagios-plugins-1.4.14-check_log.patch
 Patch3:         nagios-plugins-1.4.14-command_cfg.patch
@@ -45,8 +46,8 @@
 Patch12:        nagios-plugins-postgresql.patch
 Patch13:        nagios-plugins.negate.validate_arguments.patch
 Patch14:        nagios-plugins-stdio.h.patch
+Patch15:        nagios-plugins-too_few_arguments_for_check_disk.patch
 Patch116:       nagios-plugins-wrong_return_in_check_swap.patch
-Patch117:       nagios-plugins-check_disk_printf.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  bind-utils
 BuildRequires:  dhcp-devel
@@ -88,56 +89,57 @@
 %endif
 # recommend the old, included checks to allow an easy update - but 
 # also allow users to deselect some of the new sub-packages
-Requires:       %{name}-bgpstate
-Requires:       %{name}-breeze
-Requires:       %{name}-by_ssh
-Requires:       %{name}-cluster
-Requires:       %{name}-dhcp
-Requires:       %{name}-dig
-Requires:       %{name}-disk
-Requires:       %{name}-disk_smb
-Requires:       %{name}-dns
-Requires:       %{name}-dummy
-Requires:       %{name}-file_age
-Requires:       %{name}-flexlm
-Requires:       %{name}-http
-Requires:       %{name}-icmp
-Requires:       %{name}-ide_smart
-Requires:       %{name}-ifoperstatus
-Requires:       %{name}-ifstatus
-Requires:       %{name}-ircd
-Requires:       %{name}-linux_raid
-Requires:       %{name}-load
-Requires:       %{name}-log
-Requires:       %{name}-mailq
-Requires:       %{name}-mrtg
-Requires:       %{name}-mrtgtraf
+Recommends:     %{name}-bgpstate
+Recommends:     %{name}-breeze
+Recommends:     %{name}-by_ssh
+Recommends:     %{name}-cluster
+Recommends:     %{name}-dhcp
+Recommends:     %{name}-dig
+Recommends:     %{name}-disk
+Recommends:     %{name}-disk_smb
+Recommends:     %{name}-dns
+Recommends:     %{name}-dummy
+Recommends:     %{name}-file_age
+Recommends:     %{name}-flexlm
+Recommends:     %{name}-http
+Recommends:     %{name}-icmp
+Recommends:     %{name}-ide_smart
+Recommends:     %{name}-ifoperstatus
+Recommends:     %{name}-ifstatus
+Recommends:     %{name}-ircd
+Recommends:     %{name}-linux_raid
+Recommends:     %{name}-load
+Recommends:     %{name}-log
+Recommends:     %{name}-mailq
+Recommends:     %{name}-mrtg
+Recommends:     %{name}-mrtgtraf
 Suggests:       %{name}-nagios
-Requires:       %{name}-netapp
-Requires:       %{name}-nt
-Requires:       %{name}-ntp_peer
-Requires:       %{name}-ntp_time
-Requires:       %{name}-nwstat
-Requires:       %{name}-oracle
-Requires:       %{name}-overcr
-Requires:       %{name}-ping
-Requires:       %{name}-procs
-Requires:       %{name}-real
-Requires:       %{name}-rpc
+Recommends:     %{name}-netapp
+Recommends:     %{name}-nt
+Recommends:     %{name}-ntp_peer
+Recommends:     %{name}-ntp_time
+Recommends:     %{name}-nwstat
+Recommends:     %{name}-oracle
+Recommends:     %{name}-overcr
+Recommends:     %{name}-ping
+Recommends:     %{name}-procs
+Recommends:     %{name}-real
+Recommends:     %{name}-rpc
 %ifnarch ppc ppc64 sparc sparc64 s390 s390x
-Requires:       %{name}-sensors
+Recommends:     %{name}-sensors
 %endif
-Requires:       %{name}-smtp
-Requires:       %{name}-ssh
-Requires:       %{name}-swap
-Requires:       %{name}-tcp
-Requires:       %{name}-time
-Requires:       %{name}-ups
-Requires:       %{name}-users
-Requires:       %{name}-wave
+Recommends:     %{name}-smtp
+Recommends:     %{name}-ssh
+Recommends:     %{name}-swap
+Recommends:     %{name}-tcp
+Recommends:     %{name}-time
+Recommends:     %{name}-ups
+Recommends:     %{name}-users
+Recommends:     %{name}-wave
 %ifarch x86_64
 Suggests:       %{name}-xenvm
 %endif
+Suggests:       %{name}-cups
 %define         apt_get_command %{_bindir}/apt-get
 %define         qstat_command   %{_bindir}/qstat
 
@@ -155,15 +157,15 @@
 %package  extras
 Summary:        Plug-Ins which depend on additional packages
 Group:          System/Monitoring
-Requires:       %{name}-apt
-Requires:       %{name}-fping
+Suggests:       %{name}-apt
+Recommends:     %{name}-fping
 Suggests:       %{name}-game
 Requires:       %{name}-common = %{version}
-Requires:       %{name}-hpjd
-Requires:       %{name}-ldap
-Requires:       %{name}-mysql
-Requires:       %{name}-pgsql
-Requires:       %{name}-snmp
+Recommends:     %{name}-hpjd
+Recommends:     %{name}-ldap
+Recommends:     %{name}-mysql
+Recommends:     %{name}-pgsql
+Recommends:     %{name}-snmp
 
 %description extras
 These are additional monitoring plug-ins for Nagios or Icinga.
@@ -175,12 +177,18 @@
 Group:          System/Monitoring
 Recommends:     %{name}-apt
 Recommends:     %{name}-bgpstate
+Recommends:     %{name}-bind
+Recommends:     %{name}-bonding
 Recommends:     %{name}-breeze
 Recommends:     %{name}-by_ssh
+Recommends:     %{name}-clamav
 Recommends:     %{name}-cluster
+Recommends:     %{name}-contentage
+Recommends:     %{name}-cups
 Recommends:     %{name}-dhcp
 Recommends:     %{name}-dig
 Recommends:     %{name}-disk
+Recommends:     %{name}-diskio
 Recommends:     %{name}-disk_smb
 Recommends:     %{name}-dns
 Recommends:     %{name}-dummy
@@ -188,23 +196,30 @@
 Recommends:     %{name}-flexlm
 Recommends:     %{name}-fping
 Recommends:     %{name}-game
+Recommends:     %{name}-hpasm
 Recommends:     %{name}-hpjd
 Recommends:     %{name}-http
 Recommends:     %{name}-icmp
 Recommends:     %{name}-ide_smart
 Recommends:     %{name}-ifoperstatus
 Recommends:     %{name}-ifstatus
+Recommends:     %{name}-ipmi-sensor1
 Recommends:     %{name}-ircd
 Recommends:     %{name}-ldap
 Recommends:     %{name}-linux_raid
 Recommends:     %{name}-load
 Recommends:     %{name}-log
+Recommends:     %{name}-maintenance
+Recommends:     %{name}-mem
 Recommends:     %{name}-mailq
 Recommends:     %{name}-mrtg
 Recommends:     %{name}-mrtgtraf
 Recommends:     %{name}-mysql
+Recommends:     %{name}-mysql_health
 Recommends:     %{name}-nagios
 Recommends:     %{name}-netapp
+Recommends:     %{name}-nfsmounts
+Recommends:     %{name}-nis
 Recommends:     %{name}-nt
 Recommends:     %{name}-ntp_peer
 Recommends:     %{name}-ntp_time
@@ -214,9 +229,11 @@
 Recommends:     %{name}-pgsql
 Recommends:     %{name}-ping
 Recommends:     %{name}-procs
+Recommends:     %{name}-qlogic_sanbox
 Recommends:     %{name}-radius
 Recommends:     %{name}-real
 Recommends:     %{name}-rpc
+Recommends:     %{name}-rsync
 %ifnarch ppc ppc64 sparc sparc64 s390 s390x
 Recommends:     %{name}-sensors
 %endif
@@ -227,9 +244,11 @@
 Recommends:     %{name}-tcp
 Recommends:     %{name}-time
 Recommends:     %{name}-ups
+Recommends:     %{name}-ups_alarm
 Recommends:     %{name}-users
 Recommends:     %{name}-wave
 Recommends:     %{name}-xenvm
+Recommends:     %{name}-zypper
 
 %description all
 This virtual package recommends all currently available, official 
@@ -875,6 +894,16 @@
 or a critical message if the number exceeds the thresholds specified.
 %endif
 
+%package cups
+Summary:        Check cups service
+Group:          System/Monitoring
+Requires:       cups-client
+
+%description cups
+Check the status of a remote CUPS server, all printers there 
+or one selected. It can also check queue there:
+it will provide the size of the queue of age of queue.
+
 %prep
 %setup -q -n %{name}-%{version}
 %{__mkdir_p} example/permissions.d
@@ -893,9 +922,9 @@
 %patch12
 %patch13
 %patch14 -p1
+%patch15 -p0
 # Debian patches
 %patch116 -p1
-%patch117 -p1
 pushd contrib
 %{__rm} -r aix
 find -type f -exec %{__chmod} 644 {} \;
@@ -937,6 +966,7 @@
 %ifarch x86_64
 %{__install} -m 0755 %{S:10} $RPM_BUILD_ROOT%{nagios_plugindir}/check_xenvm
 %endif
+%{__install} -m 0755 %{S:18} $RPM_BUILD_ROOT%{nagios_plugindir}/check_cups
 %{__install} -m 0755 contrib/check_linux_raid.pl 
$RPM_BUILD_ROOT%{nagios_plugindir}/check_linux_raid
 %{__install} -m 0755 contrib/check_netapp.pl 
$RPM_BUILD_ROOT%{nagios_plugindir}/check_netapp
 %{__install} -m 0755 contrib/check_bgpstate.pl 
$RPM_BUILD_ROOT%{nagios_plugindir}/check_bgpstate
@@ -1347,4 +1377,9 @@
 %{nagios_plugindir}/check_xenvm
 %endif
 
+%files cups
+%defattr(0755,root,root)
+%dir %{nagios_plugindir}
+%{nagios_plugindir}/check_cups
+
 %changelog

++++++ nagios-plugins-too_few_arguments_for_check_disk.patch ++++++
Index: plugins/check_disk.c
===================================================================
--- plugins/check_disk.c.orig
+++ plugins/check_disk.c
@@ -958,7 +958,7 @@ get_stats (struct parameter_list *p, str
         if (verbose >= 3)
           printf("Group %s: adding %llu blocks sized %llu, (%s) used_units=%g 
free_units=%g total_units=%g fsu_blocksize=%llu mult=%llu\n",
                  p_list->group, tmpfsp.fsu_bavail, tmpfsp.fsu_blocksize, 
p_list->best_match->me_mountdir, p_list->dused_units, p_list->dfree_units,
-                 p_list->dtotal_units, mult);
+                 p_list->dtotal_units, tmpfsp.fsu_blocksize, mult);
 
         /* prevent counting the first FS of a group twice since its 
parameter_list entry 
          * is used to carry the information of all file systems of the entire 
group */
++++++ nagios-plugins.check_cups.sh ++++++
#!/bin/bash

# check_cups - nagios plugin
#
# Copyright (C) 2008-2010, Novell, Inc.
# Copyright (C) 2011-2013, SUSE Linux Products GmbH
# Author: Martin Caj <m...@suse.cz>
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
#   list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above copyright notice,
#   this list of conditions and the following disclaimer in the documentation
#   and/or other materials provided with the distribution.
#
# * Neither the name of the Novell nor the names of its contributors may be
#   used to endorse or promote products derived from this software without
#   specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# $Id$
#

# Autor notes:  I`d like to thank to John E. Vincent (nagios-pl...@lusis.org)
#               I learn a lof from his check CUPS print queue plugin.
#               Then I`d like to thank to Mark Shirley for his 
check_cups_printer.sh
#               script, which was also inspiration for me.
#               Both of them you can find on http://exchange.nagios.org/ web 
site.
#               Martin Caj 31/01/2013 <m...@suse.cz>


# check_cups - nagios plugin for checking cups service
# Description:
#
# This plugin will check the status of a remote CUPS
# print service for the printer status, then if status is ok 
# it will check the queue. It can check all avaible printes
# on the cups, or just one of them.
# Then the plugin will check the queue:
# it will provide the size of the queue
# and optionally the age of the queue
#
# Version : 0.1


#searchning the lpstat:
LPSTAT="$(which lpstat)"

# debug the script:
#set -x

# Nagios return codes
STATE_OK=0
STATE_WARNING=1
STATE_CRITICAL=2
STATE_UNKNOWN=3
STATE_DEPENDENT=4


# check it lpstat is missing.
if [ ! -x "$LPSTAT" ]
then
        echo "UNKNOWN: "$LPSTAT" not found or is not executable by the nagios 
user"
        exitstatus="$STATE_UNKNOWN"
        exit "$exitstatus"
fi

PROGNAME=$(basename $0)


print_usage() {
# Name: print_usage
# Desc: It just print the usage out. 

        echo "Usage: "$PROGNAME" -H <hostname> -P -p<The CUPS printer name> | 
-Q <s|b>  -w <size warning level> -c <size critical level> -a <max age>"
        echo 
        echo "Notes:"
        echo "-H: Hostname - Can be a hostname or IP address"
        echo "-P: Check only the printers status it doesn't check queue"
        echo "-p: It will check only one specific printer"
        echo "-Q: Type of check - Can be queue size (s) or both queu size and 
queue age (b)"
        echo "-w: WARNING level for queue size"
        echo "-c: CRITICAL level for queue size"
        echo "-a: Max age of queue. Returns CRITICAL if jobs exists older than 
<max age> days"
        echo 
}

print_help() {
# Name: print_help
# Desc: It just print the usage and the help out. Then it end with exit code 0

        print_usage
        echo 
        echo "This plugin will check the CUPS print service for the printer 
status, then if status is ok"
        echo "it will check the queue on a remote (or local with -H localhost) 
CUPS server."
        echo "It can check both the size of the queue and the age of the oldest 
print job in the queue."
        echo "-w and -c are for reporting warning and critical levels of the 
queue size."
        echo "-a is optional for specifying the max age of a job in the print 
queue. Anything older thatn <max age>"
        echo "will return a CRITICAL"
        echo 
        exit 0
}


check_queue_size() {
# Name: check_queue_size
# Desc: It check the status of the CUPS queue size.
# $exitstatus= might be ok|warn"crittical deppends on -w and -c 
                        
if [ "$JOBCOUNT" -ge "$critlevel" ]
then
        MESSAGE="CRITICAL: CUPS queue size - "$JOBCOUNT"| "$PERFDATA""
        exitstatus="$STATE_CRITICAL"
elif [ "$JOBCOUNT" -ge "$warnlevel" ]
then
        MESSAGE="WARNING: CUPS queue size - "$JOBCOUNT"| "$PERFDATA""
        exitstatus="$STATE_WARNING"
else
        MESSAGE="OK: CUPS queue size - "$JOBCOUNT"| "$PERFDATA""
        exitstatus="$STATE_OK"
fi 

}

check_printer_status() {
# Name:check_printer_status
# Desc: It check status of all printers or one specific printer 
# output is store in $OUTPUT and $exitstatus

if [ -z $printername ]
        then
        echo "Checking all printers..."
        RESULT=$("$LPSTAT" -h "$hostname" -p )
        if [ $? != 0 ]
        then
                echo "ERROR:  Probably wrong host name: "$hostname", or CUPS is 
not running there." 
                exit "$STATE_UNKNOWN"
        fi

else
        echo "Checking only the printer "$printername"."
        RESULT=$("$LPSTAT" -h "$hostname" -p "$printername")
        if [ $? != 0 ] 
        then
                echo "ERROR: the printer "$printername" doesn't exist on the 
cups server "$hostname"." 
                echo "please check command: '"$LPSTAT" -h "$hostname" -p' 
without printer name."
                exit "$STATE_UNKNOWN"
        fi
fi

case "$RESULT" in
        *Rejecting*)
                OUTPUT="CRITICAL - CUPS printer "$printername" is rejecting 
jobs."
                exitstatus="$STATE_CRITICAL"
        ;;
        *Unable*)
                OUTPUT="CRITICAL - CUPS Unable to connect to "$printername"."
                exitstatus="$STATE_CRITICAL"
        ;;
        *disabled*)
                OUTPUT="CRITICAL - CUPS printer "$printername" is stopped."
                exitstatus="$STATE_CRITICAL"
        ;;
        *Paused*)
                OUTPUT="WARNING: - CUPS printer "$printername" is stopped."
                exitstatus="$STATE_WARNING"
        ;;
        *printing*)
                OUTPUT="OK - CUPS printer "$printername" is printing."
                exitstatus="$STATE_OK"
        ;;
        *idle*)
                OUTPUT="OK - CUPS printer "$printername" is idle."
                exitstatus="$STATE_OK"
        ;;
        *)
                OUTPUT="CRITICAL - Unknown error occured while checking 
"$printername"."
                exitstatus="$STATE_CRITICAL"
        ;;
esac

}

# It testing how many variable user add on command line
# The minimu for test printes only is 3

if [ $# -lt 3 ]; then
        print_usage
        exit "$STATE_UNKNOWN"
fi

# this set default exit status to:
exitstatus="$STATE_UNKNOWN"

# testing arguments:
while test -n "$1"; do
        case "$1" in
                --help)
                        print_help
                        exit "$STATE_OK"
                        ;;
                -h)
                        print_help
                        exit "$STATE_OK"
                        ;;
                -P)
                        testprinter="1"
                        ;;
                -p)
                        printername="$2"
                        shift
                        ;;
                -H)
                        hostname=$2
                        shift
                        ;;
                -Q)
                        testtype=$2
                        shift
                        ;;
                -w)
                        warnlevel=$2
                        shift
                        ;;
                -c)     
                        critlevel=$2
                        shift
                        ;;
                -a)     
                        maxage=$2
                        shift
                        ;;
        esac
        shift
done

# Check arguments for validity:
if [ -z $hostname ]
then
        echo "You must specify a hostname (or localhost to test the local 
system)"
        print_usage
        exitstatus="$STATE_UNKNOWN"
        exit "$exitstatus"
fi

# testing priner(s) 
if [ -z $testprinter ] #Check printes and continue with the script
then
        check_printer_status $printname 

# if there is differnt exit status then 0 doesn`t maka any sance to 
# continue with the check. exit it ASAP.
        if [ $exitstatus != 0 ]
        then
                echo "$OUTPUT"
                exit "$exitstatus"
        fi
else                    #Check printers only and end the sctipt.
        check_printer_status
        echo "$OUTPUT"
        exit "$exitstatus"
fi

# testing arguments for the queue checks:
if [[ -z $critlevel || -z $warnlevel ]] # Did we get warn and crit values?
then    
        echo "You must specify a warning and critical level"
        print_usage
        exitstatus="$STATE_UNKNOWN"
        exit "$exitstatus" 
elif [ $critlevel -lt $warnlevel ] # Do the warn/crit values make sense?
then
        echo "CRITICAL value of "$critlevel" is less than WARNING level of 
"$warnlevel""
        print_usage
        exitstatus="$STATE_UNKNOWN"
        exit "$exitstatus"
fi

# what kind of queue test will be run:
if [ -z $testtype ]
then

        echo "You must specify a test type"
        print_usage
        exitstatus="$STATE_UNKNOWN"
        exit "$exitstatus"
# this is a very nice elif, it match if -a X is missing
elif [[ "$testtype" = [b]* && -z $maxage ]] 
then
        echo "You must specify <max age> when using a test type of 'b'"
        print_usage
        exitstatus="$STATE_UNKNOWN"
        exit "$exitstatus"
else
        
        JOBTMP=$(mktemp -t lpstat.XXXXXX) # Create a tmpfile to store the 
lpstat results
        STALEJOBCOUNT=0 # default number of old jobs
        CURDATETS=$(date +%s) # Get the current date as unixtime
        "$LPSTAT" -h "$hostname" -o > "$JOBTMP" # run the lpstat command 
against the host.

        if [ $? -ne 0 ]
        then
            rm -rf "$JOBTMP"
                echo "UNKNOWN: lpstat command returned an error. Please test 
this script manually."
                exitstatus="$STATE_UNKNOWN"
                exit "$exitstatus"
        fi
        JOBCOUNT=$(wc -l < $JOBTMP) # populate the jobcount
        PERFDATA="print_jobs="$JOBCOUNT";"$warnlevel";"$critlevel";0"
        if [[ "$JOBCOUNT" -gt 0 && $maxage ]]
        then
                MAXAGETS=$(echo "86400 * $maxage" | bc) # 86400 seconds in a 
day * maxage
                exec<"$JOBTMP" # read the file to determine job age
                while read PRINTJOB
                do
                        # Grab the job date from the job listing
                        JOBDATE=$(echo $PRINTJOB | awk '{ print $4, $5, $6, $7, 
$8 }') 
                        # Convert the job date to unixtime
                        JOBDATETS=$(date --date="$JOBDATE" +%s) 
                        DATEDIFF=$(echo "($CURDATETS - $JOBDATETS)" | bc)
                        if [ $DATEDIFF -gt $MAXAGETS ]
                        then
                                MESSAGE="CRITICAL: Some CUPS jobs are older 
than "$maxage" days| "$PERFDATA""
                                exitstatus="$STATE_CRITICAL"
                        else
                                check_queue_size
                        fi
                done
        else
                check_queue_size
        fi
        rm -rf "$JOBTMP"
fi


# end: print the results and end with exit code for Nagios
echo "$OUTPUT"
echo "$MESSAGE"
exit "$exitstatus"
++++++ usr.lib.nagios.plugins.check_ntp_time ++++++
--- /var/tmp/diff_new_pack.w0JAwz/_old  2013-03-14 17:29:43.000000000 +0100
+++ /var/tmp/diff_new_pack.w0JAwz/_new  2013-03-14 17:29:43.000000000 +0100
@@ -15,5 +15,7 @@
 
   /etc/gai.conf r,
   /usr/lib/nagios/plugins/check_ntp_time rm,
+  /etc/hosts r,
+  /etc/resolv.conf r,
   /var/run/nscd/* r,
 }

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to