Hello community,

here is the log from the commit of package nagios-plugins for openSUSE:Factory 
checked in at 2014-04-22 07:38:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/nagios-plugins (Old)
 and      /work/SRC/openSUSE:Factory/.nagios-plugins.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "nagios-plugins"

Changes:
--------
--- /work/SRC/openSUSE:Factory/nagios-plugins/nagios-plugins.changes    
2013-03-14 17:29:40.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.nagios-plugins.new/nagios-plugins.changes       
2014-04-22 07:38:17.000000000 +0200
@@ -1,0 +2,144 @@
+Sat Apr 12 14:34:01 UTC 2014 - [email protected]
+
+- do not package check_game for openSUSE > 13.1 as the needed binary
+  is not in Factory 
+
+-------------------------------------------------------------------
+Fri Mar 28 11:16:53 UTC 2014 - [email protected]
+
+- also recommend/require apparmor-profiles to get tunables/global
+- do not package check_apt on 13.1 and beyond as Factory maintainers
+  do not want a package requiring the binary
+
+-------------------------------------------------------------------
+Tue Mar 11 15:21:27 UTC 2014 - [email protected]
+
+- remove nagios-plugins-xenvm as this is now provided by 
+  nagios-xen-host package
+
+-------------------------------------------------------------------
+Sat Mar  1 23:19:24 UTC 2014 - [email protected]
+
+- added new check_ircd, which allows to monitor SSL enabled IRCd
+  and prints out perfdata
+  + require IO::Socket::SSL and IO::Socket::INET6
+
+-------------------------------------------------------------------
+Wed Jan 22 09:31:45 UTC 2014 - [email protected]
+
+- remove left overs from former bgpstate package
+- add dbi-{mysql,pgsql,sqlite3} plugin package(s)
+- add nagios-plugins-rpmlintrc for the virtual packages that 
+  require the appropriate library for the dbi check
+
+-------------------------------------------------------------------
+Sun Jan 19 01:47:43 UTC 2014 - [email protected]
+
+- adapt URL to new upstream page (bnc#859105)
+
+-------------------------------------------------------------------
+Sun Dec 22 11:14:55 UTC 2013 - [email protected]
+
+- Add SNMPv3 context support to check_snmp following an idea of
+  Lars Mathwig <[email protected]>
+
+-------------------------------------------------------------------
+Wed Nov 27 19:56:08 UTC 2013 - [email protected]
+
+- Get rid of the old SUSE spelling in READMEs
+
+-------------------------------------------------------------------
+Tue Nov 19 11:37:39 UTC 2013 - [email protected]
+
+- update to 1.5
+ * removed contrib directory
+ * New check_dbi plugin for checking an (SQL) database using DBI
+ * Let OpenSSL load its configuration file (see the 
+   OPENSSL_config(3) man page)
+ * Add performance data to check_apt
+ * Add performance data to check_procs
+ * Added -4/-6 options to check_dig
+ * New check_oracle --connect option to perform real login
+ * New check_nagios -t option to override the default timeout
+ * New check_disk -f/--freespace-ignore-reserved option to 
+   ignore space reserved for root
+ * New check_disk -N/--include-type option to limit the filesystem 
+   types to check
+ * Allow for building the plugins in parallel
+ * Add --without-{dbi,ldap,radius} options to ./configure
+ * Made Verbose output of check_sensors compliant
+ * New switch -E/--extended-perfdata for check_http to print 
+   additional performance data
+ * New check_http -d option to specify a string to expect within 
+   the response headers
+ * New check_http -J/-K options for client certificate 
+   authentication support
+ * Add support for executing queries to check_pgsql
+ * Let check_pgsql accept a UNIX socket directory as hostname
+ * New check_pgsql -o option to specify additional connection parameters
+ * New check_fping -S option to specify the source IP address
+ * New check_fping -I option to specify the interface to bind to
+ * Let check_fping support IPv6
+ * New check_procs -k option to ignore kernel threads (on Linux)
+ * Let check_procs use /proc/<PID>/exe (if available) instead of 
+   getpid(2), unless -T is specified
+ * Let check_mysql support SSL
+ * Let check_mysql add perfromance metrics for all checks
+ * New check_mysql -f option to specify a client options file
+ * New check_mysql -g option to specify a client options group
+ * New check_snmp --offset option to allow for adding/substracting 
+   an offset value to sensor data
+ * Let check_snmp support an arbitrary number of OIDs
+
+ * Fixes: 
+   + Change the MAIL FROM command generated by check_smtp to be 
+     RFC compliant
+   + Fix compilation of check_http without SSL support
+   + Fix check_snmp reversed threshold ranges
+     (backward-compatibility)
+   + Fix check_snmp memory violation when using more than 8 OIDs
+   + Fix check_apt security regular expression
+   + Fix check_http handling extra header (-k) containing semicolons
+   + Fix check_apt handling unknown exit codes from apt-get
+   + Fix deprecated imports of check_nmap.py
+ 
+
+-------------------------------------------------------------------
+Wed Oct 23 17:00:38 UTC 2013 - [email protected]
+
+- update apparmor profiles usr.lib.nagios.plugins.check_cups and
+  usr.lib.nagios.plugins.check_ping with /usr/bin/ paths (bnc#847229)
+
+-------------------------------------------------------------------
+Fri Aug 30 11:14:59 UTC 2013 - [email protected]
+
+- allow family="inet6" sock_type="raw" in apparmor profile for 
+  check_ping
+
+-------------------------------------------------------------------
+Tue Aug 13 10:37:17 CEST 2013 - [email protected]
+
+- update apparmor profile for ntp check (added nameservice) 
+
+-------------------------------------------------------------------
+Sun Aug 11 23:46:52 UTC 2013 - [email protected]
+
+- add capabilities sys_admin and sys_rawio to ide_smart check
+
+-------------------------------------------------------------------
+Mon Aug  5 14:10:18 CEST 2013 - [email protected]
+
+- add apparmor profiles for these checks:
+  icmp, ide_smart, ping, ssh 
+
+-------------------------------------------------------------------
+Wed Jul 17 13:01:40 UTC 2013 - [email protected]
+
+- enhance the documentation for checks with special privileges
+
+-------------------------------------------------------------------
+Thu May 23 13:50:14 UTC 2013 - [email protected]
+
+- add check_procs_perf plugin
+
+-------------------------------------------------------------------

Old:
----
  nagios-plugins-1.4.14-check_inodes.patch
  nagios-plugins-1.4.14-command_cfg.patch
  nagios-plugins-1.4.14-nmap.patch
  nagios-plugins-1.4.16.tar.bz2
  nagios-plugins-README.SuSE
  nagios-plugins-README.SuSE-check_dhcp
  nagios-plugins-README.SuSE-check_icmp
  nagios-plugins-README.SuSE-check_ide_smart
  nagios-plugins-stdio.h.patch
  nagios-plugins.check_xenvm.sh

New:
----
  check_ircd_ssl
  nagios-plugins-1.5.tar.bz2
  nagios-plugins-README.SUSE
  nagios-plugins-README.SUSE-check_cups
  nagios-plugins-README.SUSE-check_dhcp
  nagios-plugins-README.SUSE-check_icmp
  nagios-plugins-README.SUSE-check_ide_smart
  nagios-plugins-rpmlintrc
  nagios-plugins.check_snmp.snmpv3-context.patch
  usr.lib.nagios.plugins.check_cups
  usr.lib.nagios.plugins.check_icmp
  usr.lib.nagios.plugins.check_ide_smart
  usr.lib.nagios.plugins.check_ping
  usr.lib.nagios.plugins.check_ssh

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

Other differences:
------------------
++++++ nagios-plugins.spec ++++++
++++ 637 lines (skipped)
++++ between /work/SRC/openSUSE:Factory/nagios-plugins/nagios-plugins.spec
++++ and /work/SRC/openSUSE:Factory/.nagios-plugins.new/nagios-plugins.spec

++++++ check_ircd_ssl ++++++
#! /usr/bin/perl -w
#
# Copyright (C) 2014, SUSE Linux Products GmbH, Nuremberg
# Author: Lars Vogdt
#
# 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.
#
use Getopt::Long;
use IO::Socket::INET6;
use strict;
use vars qw($PROGNAME $VERSION);
use vars qw($opt_V $opt_h $opt_t $opt_p $opt_H $opt_w $opt_c $ssl $verbose);
use lib '/usr/lib/nagios/plugins';
use utils qw($TIMEOUT %ERRORS &print_revision &support &usage);

# ----------------------------------------------------[ Function Prototypes ]--
sub print_help ();
sub print_usage ();

# -------------------------------------------------------------[ Enviroment ]--
$ENV{PATH}     = '';
$ENV{ENV}      = '';
$ENV{BASH_ENV} = '';

# -----------------------------------------------------------------[ Global ]--
$PROGNAME        = 'check_ircd';
$VERSION         = '1.5.0';
my $nick         = "ircd$$";

# -------------------------------------------------------------[ print_help ]--
sub print_help ()
{
    print_revision($PROGNAME,$VERSION);
    print "Copyright (c) 2014 SUSE Linux Products GmbH, Nuremberg
based on the original work of Richard Mayhew/Karl DeBisschop in 2000

Perl Check IRCD plugin for Nagios

";
    print_usage();
    print "
-H, --hostname=HOST
   Name or IP address of host to check
-w, --warning=INTEGER
   Number of connected users which generates a warning state (Default: 50)
-c, --critical=INTEGER
   Number of connected users which generates a critical state (Default: 100)
-p, --port=INTEGER
   Port that the ircd daemon is running on <host> (Default: 6667)
-v, --verbose
   Print extra debugging information
-s, --ssl
   Use SSL for connection (NOTE: might need '-p 6697' option)
";
}

# ------------------------------------------------------------[ print_usage ]--
sub print_usage () {
    print "Usage: $PROGNAME -H <host> [-w <warn>] [-c <crit>] [-p <port>] 
[-s]\n";
}

# ------------------------------------------------------------------[ debug ]--
sub debug ($$)
{
    my ($string,$verbose) = @_;
    if ($verbose){
        print STDOUT "DEBUG: $string";
    }
}

# ----------------------------------------------------------------[ connect ]--
sub connection ($$$$$$) {
    my ($server,$port,$ssl,$ping_timeout,$nick,$verbose) = @_;
    my $user=-1;
    debug("Attempting connect.\n",$verbose);
    # Connect to server
    debug("Connecting ...........\n",$verbose);
    my $sock = IO::Socket::INET6->new( PeerAddr => $server,
                                       PeerPort => $port,
                                       Proto => 'tcp',
                                       Domain => AF_UNSPEC ) or return ($user);
    if($ssl) {
        use IO::Socket::SSL;
        debug("Starting SSL .........\n",$verbose);
        IO::Socket::SSL->start_SSL( $sock,
                                    SSL_verify_mode => 0, # Do not verify 
certificate
        ) or die "SSL handshake failed: $SSL_ERROR";
    }
    debug("Connected to server:   $server on port: $port\n",$verbose);
    # Set nick and username
    debug("Sending user info ....\n",$verbose);
    print $sock "NICK $nick\nUSER monitor localhost localhost : \n";
    # Catch SIGALRM from the OS when timeout expired.
    local $SIG{ALRM} = sub {$sock->shutdown(0);};
    # Send all incomming data to the parser
    while (<$sock>) {
        alarm 0;
        chomp($_);
        if (/^PING \:(.+)/) {
            debug("Received PING request, sending PONG :$1\n",$verbose);
            print $sock "PONG :$1\n";
        }
        elsif (/\:I have\s+(\d+)/){
            $user=$1;
            last;
        }
        alarm $ping_timeout;
    }
    debug("Closing socket.\n",$verbose);
    close $sock;
    return $user;
}

# ------------------------------------------------------------[ check_users ]--
sub check_users ($$$){
    my ($users,$crit,$warn)=@_;
        $users =~ s/\ //g;
    my ($state,$answer);
    if ($users >= 0) {
        if ($users > $crit) {
                $state = "CRITICAL";
                $answer = "Critical Number Of Clients Connected : $users (Limit 
= $crit)";
        
        } elsif ($users > $warn) {
                $state = "WARNING";
                $answer = "Warning Number Of Clients Connected : $users (Limit 
= $warn)";
        
        } else {
                $state = "OK";
                $answer = "IRCD ok - Current Local Users: $users";
        }
        $answer.="|users=$users;$warn;$crit;0\n";
    } else {
        $state = "UNKNOWN";
        $answer = "Server has less than 0 users! Something is Really WRONG!\n";
    }
        return ($answer,$state)
}

# ===================================================================[ MAIN ]==
MAIN:
{
    my $answer = 'IRCD UNKNOWN: Unknown error - maybe could not authenticate\n';
    my $state = 'UNKOWN';
    my $hostname;
    Getopt::Long::Configure('bundling');
    GetOptions
         (      "V"   => \$opt_V,  "version"    => \$opt_V,
            "h"   => \$opt_h,  "help"       => \$opt_h,
            "v"   => \$verbose,"verbose"    => \$verbose,
            "s"   => \$ssl,    "ssl"        => \$ssl,
            "t=i" => \$opt_t,  "timeout=i"  => \$opt_t,
            "w=i" => \$opt_w,  "warning=i"  => \$opt_w,
            "c=i" => \$opt_c,  "critical=i" => \$opt_c,
            "p=i" => \$opt_p,  "port=i"     => \$opt_p,
            "H=s" => \$opt_H,  "hostname=s" => \$opt_H);
    if ($opt_V) {
        print_revision($PROGNAME,$VERSION);
        exit $ERRORS{'OK'};
    }
    if ($opt_h) {print_help(); exit $ERRORS{'OK'};}
    ($opt_H) || ($opt_H = shift @ARGV) || usage("Host name/address not 
specified\n");
    my $server = $1 if ($opt_H =~ /([-.A-Za-z0-9]+)/);
    ($server) || usage("Invalid host: $opt_H\n");
    ($opt_w) || ($opt_w = shift @ARGV) || ($opt_w = 50);
    my $warn = $1 if ($opt_w =~ /^([0-9]+)$/);
    ($warn) || usage("Invalid warning threshold: $opt_w\n");
    ($opt_c) || ($opt_c = shift @ARGV) || ($opt_c = 100);
    my $crit = $1 if ($opt_c =~ /^([0-9]+)$/);
    ($crit) || usage("Invalid critical threshold: $opt_c\n");
    if ($crit < $warn){
            usage("Invalid threshold: $crit for critical is lower than $warn 
for warning\n");
    }
    ($opt_p) || ($opt_p = shift @ARGV) || ($opt_p = 6667);
    my $port = $1 if ($opt_p =~ /^([0-9]+)$/);
    ($port) || usage("Invalid port: $opt_p\n");
    if ($opt_t && $opt_t =~ /^([0-9]+)$/) { $TIMEOUT = $1; }
    # Just in case of problems, let's not hang Nagios
    $SIG{'ALRM'} = sub {
        print "Somthing is Taking a Long Time, Increase Your TIMEOUT (Currently 
Set At $TIMEOUT Seconds)\n";
        exit $ERRORS{"UNKNOWN"};
    };
    alarm($TIMEOUT);
    my $ping_timeout=$TIMEOUT-1;
    my $users=connection($server,$port,$ssl,$ping_timeout,$nick,$verbose);
    ($answer,$state)=check_users($users,$crit,$warn);
    print "$answer";
    exit $ERRORS{$state};
}
++++++ nagios-plugins-1.4.16.tar.bz2 -> nagios-plugins-1.5.tar.bz2 ++++++
++++ 162856 lines of diff (skipped)

++++++ nagios-plugins-README.SUSE ++++++
README.SUSE for nagios-plugins

== Features and documentation ==

Please refer to the upstream documentation on 
* http://www.nagios.org/docs/
* http://nagiosplugins.org/
* http://www.nagioscommunity.org/wiki/index.php/Main_Page

The openSUSE package contains most of the currently available plugins.

All plugins are installed in ''/usr/lib/nagios/plugins/'' on every 
architecture. 

== Special permissions for some plugins ==

The following checks require special handling as they need some root privileges 
to run:
* check_dhcp
* check_icmp
* check_ide_smart

In a default installation, those checks will not work if executed as user with 
limited
rights (such as nagios or icinga). Please have a look into the corresponding 
documentation 
for those packages for more details. 
( /usr/share/doc/packages/nagios-plugins-icmp/README.SUSE-check_icmp for 
example )

++++++ nagios-plugins-README.SUSE-check_cups ++++++
README.SUSE for nagios-plugins-dhcp

== check_cups  ==

Nagios plugin for checking cups service

This plug-in will check the status of a remote CUPS print service for the 
printer status, 
Its able to check all available printers on the cups, or just one of them.
(for example if you have testing printer - is normally disable/off you don't 
need to check it.)
It can also check only the queue status. it will provide the size of the queue 
and
optionally the age of the queue.

Generally I sugesst to create separate check for each printer only and then 
additional check for
the queue itself.

it using Nagios standards exit codes:

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

Usage: check_cups -H <hostname> -P -p<The CUPS printer name> | -Q <s|b>  -w 
<size warning level> -c <size critical level> -a <max age>

Notes:
-H: Hostname - Can be a hostname or IP address.
-P: Check only the printers status.
-p: It will check only one specific printer. 
-Q: Type of check - Can be queue size (s) or both queu size and queue age (b)
-w: WARNING level for queue size
-c: CRITICAL level for queue size
-a: Max age of queue. Returns CRITICAL if jobs exists older than <max age> days

Example of test run usage:
----------------
Test all available printers and the queue. 
(queue size warning is 3, critical 10 and max age 3 days):
  
nagios@nagios:~> /usr/lib/nagios/plugins/check_cups -H cups.server.org -P -Q s 
-w 3 -c 10 -a 3

Checking all printers...
OK - CUPS printer  is idle.
Testing queue on the CUPS...
OK: CUPS queue size - 0| print_jobs=0;3;10;0

Test one printer only : 
nagios@nagios:~> /usr/lib/nagios/plugins/check_cups  -H cups.suse.cz -P -p 
myprinter

Checking only the printer myprinter.
OK - CUPS printer myprinter is idle.

Test only the queue, do not test any printer  
(queue size warning is 3, critical 5 and max age 2 days):

nagios@nagios:~> /usr/lib/nagios/plugins/check_cups  -H cups.suse.cz -Q b -w 3 
-c 5 -a 2
No printer check is require. Checking the queue ...
Testing queue on the CUPS...

OK: CUPS queue size - 0| print_jobs=0;3;5;0

Example of Nagios/Icinga command settings:
----------------------------------

Example commands/check_cups.cfg:

# Check all printers in cups and queue size and queue age
define command{
        command_name check_cups_all_queue
        command_line $USER1$/check_cups -H $ARG1$ -P -Q b -w $ARG2$ -c $ARG3$ 
-a $ARG4$
}

# Check one printer in cups and queue size and queue age
define command{
        command_name check_cups_one_queue
        command_line $USER1$/check_cups -H $ARG1$ -P -p $ARG2$ -Q b -w $ARG3$ 
-c $ARG4$ -a $ARG5$
}

# Check all printers in cups and queue size and queue age
define command{
        command_name check_cups_all
        command_line $USER1$/check_cups -H $ARG1$ -P 
}

# Check one printer in cups.
define command{
        command_name check_cups_one
        command_line $USER1$/check_cups -H $ARG1$ -P -p $ARG2$ 
}

# Check only the queue
define command{
        command_name check_cups_queue
        command_line $USER1$/check_cups -H $ARG1$ -Q b -w $ARG2$ -c $ARG3$ -a 
$ARG4$
}


Security:
---------
In the version 0.2 I add appamor profile for the script 
usr.lib.nagios.plugins.check_cups 
into /etc/apparmor.d


Autor notes:
------------
I`d like to thank to John E. Vincent ([email protected])
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 <[email protected]>


Bugs:
------
Please report bugs to me [email protected]

Thanks and have lot printers online ;-)
Martin
++++++ nagios-plugins-README.SUSE-check_dhcp ++++++
README.SUSE for nagios-plugins-dhcp

== check_dhcp and SuSEfirewall ==

If you run the check_dhcp script on the server, please make sure your UDP ports
67 and 68 on the _client_ are opened in the firewall. You also need to allow
the receive broadcasts for this interface. Otherwise  the script will be unable
to detect anything.

If your client uses the "external" interface for the check, the entries in
/etc/sysconfig/SuSEfirewall2 should look like:

FW_SERVICES_EXT_UDP="67 68"
FW_ALLOW_FW_BROADCAST_EXT="67 68"

== Special privileges ==

To be "safe per default", SUSE doesn't install this plugin with the
suid bit set. There are two recommended ways about overriding this on
your system:

=== Set the suid bit ===

Copy the prepared permissions file from this directory to the right place 
in your file system:

~ # cp 
/usr/share/doc/packages/nagios-plugins-common/example/permissions.d/nagios-plugins
 \
    /etc/permissions.d/nagios-plugins

...afterwards adapt the file /etc/permissions.d/nagios-plugins to your needs
(see comments in the file) and run:

~ # SuSEconfig --module permissions

or (on newer openSUSE distributions without SuSEconfig):
~ # chkstat --system --set

This will set the correct permissions (from now on also during an update).

=== Alternative: Use sudo to grant the permission and modify your plugin config 
===

This way you need an entry like:

   nagios ALL = NOPASSWD: /usr/lib/nagios/plugins/check_dhcp

in ''/etc/sudoers'' and an adapted command definition like the following:

   define command{
        command_name    check_dhcp
        command_line    /usr/bin/sudo $USER1$/check_dhcp <other_options_here>
   }



++++++ nagios-plugins-README.SUSE-check_icmp ++++++
README.SUSE for nagios-plugins-icmp

== Special privileges ==

To be "safe per default", SUSE doesn't install this plugin with the
suid bit set. There are two recommended ways about overriding this on
your system:

=== Set the suid bit ===

Copy the prepared permissions file from this directory to the right place 
in your file system:

~ # cp 
/usr/share/doc/packages/nagios-plugins/example/permissions.d/nagios-plugins \
    /etc/permissions.d/nagios-plugins

...afterwards adapt the file /etc/permissions.d/nagios-plugins to your needs
(see comments in the file) and run:

~ # SuSEconfig --module permissions

or (on newer openSUSE distributions without SuSEconfig):

~ # chkstat --system --set

This will set the correct permissions (from now on also during an update).

=== Alternative: Use sudo to grant the permission and modify your plugin config 
===

This way you need an entry like:

   nagios ALL = NOPASSWD: /usr/lib/nagios/plugins/check_icmp

in ''/etc/sudoers'' and an adapted command definition like the following:

   define command{
        command_name    check_icmp
        command_line    /usr/bin/sudo $USER1$/check_icmp <other_options_here>
   }



++++++ nagios-plugins-README.SUSE-check_ide_smart ++++++
README.SUSE for nagios-plugins-ide_smart

== Special privileges ==

To be "safe per default", SUSE doesn't install this plugin with the
suid bit set. There are two recommended ways about overriding this on
your system:

=== Set the suid bit ===

Copy the prepared permissions file from this directory to the right place 
in your file system:

~ # cp 
/usr/share/doc/packages/nagios-plugins/example/permissions.d/nagios-plugins \
    /etc/permissions.d/nagios-plugins

...afterwards adapt the file /etc/permissions.d/nagios-plugins to your needs
(see comments in the file) and run:

~ # SuSEconfig --module permissions

or (on newer openSUSE distributions without SuSEconfig):

~ # chkstat --system --set

This will set the correct permissions (from now on also during an update).

=== Alternative: Use sudo to grant the permission and modify your plugin config 
===

This way you need an entry like:

   nagios ALL = NOPASSWD: /usr/lib/nagios/plugins/check_ide_smart

in ''/etc/sudoers'' and an adapted command definition like the following:

   define command{
        command_name    check_ide_smart
        command_line    /usr/bin/sudo $USER1$/check_ide_smart 
<other_options_here>
   }



++++++ nagios-plugins-permissions ++++++
--- /var/tmp/diff_new_pack.owB8a6/_old  2014-04-22 07:38:19.000000000 +0200
+++ /var/tmp/diff_new_pack.owB8a6/_new  2014-04-22 07:38:19.000000000 +0200
@@ -5,6 +5,8 @@
 # Afterwards the files below will be adapted after a nagios-plugins
 # update via 
 #             'SuSEconfig --module permissions'
+# or (on newer openSUSE distributions without SuSEconfig):
+#             'chkstat --system --set'
 # automatically. 
 #
 # Note: You may check/set the following variable in /etc/sysconfg/security

++++++ nagios-plugins-rpmlintrc ++++++
# the virtual dbi-{mysql,pgsql,sqlite3} packages are there to require 
# the needed library for the generic dbi package.
addFilter("explicit-lib-dependency.*libdbi-drivers-dbd-mysql");
addFilter("explicit-lib-dependency.*libdbi-drivers-dbd-sqlite3");
addFilter("explicit-lib-dependency.*libdbi-drivers-dbd-pgsql");
++++++ nagios-plugins.check_cups.sh ++++++
--- /var/tmp/diff_new_pack.owB8a6/_old  2014-04-22 07:38:19.000000000 +0200
+++ /var/tmp/diff_new_pack.owB8a6/_new  2014-04-22 07:38:19.000000000 +0200
@@ -44,6 +44,9 @@
 #              Both of them you can find on http://exchange.nagios.org/ web 
site.
 #              Martin Caj 31/01/2013 <[email protected]>
 
+#              version 0.3 has no awk any more, cut can do it as well.
+#              the appamor profile was fix as well.
+#              Martin Caj 01/11/2013 
 
 # check_cups - nagios plugin for checking cups service
 # Description:
@@ -56,8 +59,7 @@
 # it will provide the size of the queue
 # and optionally the age of the queue
 #
-# Version : 0.1
-
+# Version : 0.3
 
 #searchning the lpstat:
 LPSTAT="$(which lpstat)"
@@ -91,13 +93,13 @@
        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 "-H: Hostname - Can be a hostname or IP address."
+       echo "-P: Check only the printers status."
+       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 
 }
 
@@ -107,12 +109,13 @@
 
        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 "This plugin will check the CUPS print service for the printer 
status"
+       echo "it can 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 "For more details have look into README file. "
        echo 
        exit 0
 }
@@ -166,23 +169,27 @@
 
 case "$RESULT" in
         *Rejecting*)
-                OUTPUT="CRITICAL - CUPS printer "$printername" is rejecting 
jobs."
+               messages=$(echo "$RESULT"|grep -i rejecting )
+                OUTPUT="CRITICAL - CUPS printer is rejecting jobs for: 
"$messages"."
                 exitstatus="$STATE_CRITICAL"
         ;;
         *Unable*)
-                OUTPUT="CRITICAL - CUPS Unable to connect to "$printername"."
+               messages=$(echo "$RESULT"|grep -i unable )
+                OUTPUT="CRITICAL - CUPS Unable to connect: "$messages"."
                 exitstatus="$STATE_CRITICAL"
         ;;
         *disabled*)
-                OUTPUT="CRITICAL - CUPS printer "$printername" is stopped."
+               messages=$(echo "$RESULT"|grep -i disabled)
+                OUTPUT="CRITICAL - CUPS printer: "$messages"."
                 exitstatus="$STATE_CRITICAL"
        ;;
        *Paused*)
-               OUTPUT="WARNING: - CUPS printer "$printername" is stopped."
+               messages=$(echo "$RESULT"|grep -i paused)
+               OUTPUT="WARNING: - CUPS printer is: "$messages"."
                 exitstatus="$STATE_WARNING"
         ;;
        *printing*)
-                OUTPUT="OK - CUPS printer "$printername" is printing."
+                OUTPUT="OK - CUPS printer is printing now."
                 exitstatus="$STATE_OK"
         ;;
        *idle*)
@@ -190,7 +197,7 @@
                 exitstatus="$STATE_OK"
         ;;
         *)
-                OUTPUT="CRITICAL - Unknown error occured while checking 
"$printername"."
+                OUTPUT="CRITICAL - Unknown error occured while checking: 
"$RESULT"."
                 exitstatus="$STATE_CRITICAL"
         ;;
 esac
@@ -208,6 +215,10 @@
 # this set default exit status to:
 exitstatus="$STATE_UNKNOWN"
 
+# by default is test pritner disabled, you must allow it with -p $printer or 
-P all printers
+testprinter="0"
+
+
 # testing arguments:
 while test -n "$1"; do
        case "$1" in
@@ -223,7 +234,8 @@
                         testprinter="1"
                         ;;
                -p)
-                        printername="$2"
+                        testprinter="2"
+                       printername="$2"
                         shift
                         ;;
                -H)
@@ -260,21 +272,25 @@
 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 ]
+
+if [ $testprinter -eq 2 ] #Check specifics printer and continue with the script
+then
+        check_printer_status "$printername" 
+       
+       if [ -z $testtype ] # exits if there is no -Q checks
        then
                echo "$OUTPUT"
                exit "$exitstatus"
        fi
-else                   #Check printers only and end the sctipt.
-        check_printer_status
-       echo "$OUTPUT"
-        exit "$exitstatus"
+elif   [ $testprinter -eq 1 ]; then # check all printers 
+               check_printer_status
+       if [ -z $testtype ]; then # exits if there is no -Q checks
+               echo "$OUTPUT"
+                       exit "$exitstatus"
+       fi
+else # no cuos check is need 
+       echo "No printer check is require. Checking the queue ..."
 fi
 
 # testing arguments for the queue checks:
@@ -308,7 +324,7 @@
        exitstatus="$STATE_UNKNOWN"
        exit "$exitstatus"
 else
-       
+       echo "Testing queue on the CUPS..."     
        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
@@ -330,7 +346,7 @@
                while read PRINTJOB
                do
                        # Grab the job date from the job listing
-                       JOBDATE=$(echo $PRINTJOB | awk '{ print $4, $5, $6, $7, 
$8 }') 
+                       JOBDATE=$(echo $PRINTJOB | cut -c50-73) 
                        # Convert the job date to unixtime
                        JOBDATETS=$(date --date="$JOBDATE" +%s) 
                        DATEDIFF=$(echo "($CURDATETS - $JOBDATETS)" | bc)

++++++ nagios-plugins.check_snmp.snmpv3-context.patch ++++++
diff -ruNp nagios-plugins-1.5.orig/plugins/check_snmp.c 
nagios-plugins-1.5/plugins/check_snmp.c
--- nagios-plugins-1.5.orig/plugins/check_snmp.c        2013-12-24 
11:47:42.333131442 +0100
+++ nagios-plugins-1.5/plugins/check_snmp.c     2013-12-24 14:12:21.000000000 
+0100
@@ -104,6 +104,8 @@ int errcode, excode;
 
 char *server_address = NULL;
 char *community = NULL;
+char **context = NULL;
+char *v3context = NULL;
 char **authpriv = NULL;
 char *proto = NULL;
 char *seclevel = NULL;
@@ -128,6 +130,7 @@ size_t nunits = 0;
 size_t unitv_size = OID_COUNT_STEP;
 int numoids = 0;
 int numauthpriv = 0;
+int numcontext = 0;
 int verbose = 0;
 int usesnmpgetnext = FALSE;
 char *warning_thresholds = NULL;
@@ -297,8 +300,8 @@ main (int argc, char **argv)
                snmpcmd = strdup (PATH_TO_SNMPGET);
        }
 
-       /* 10 arguments to pass before authpriv options + 1 for host and 
numoids. Add one for terminating NULL */
-       command_line = calloc (10 + numauthpriv + 1 + numoids + 1, sizeof (char 
*));
+       /* 10 arguments to pass before context and authpriv options + 1 for 
host and numoids. Add one for terminating NULL */
+       command_line = calloc (10 + numcontext + numauthpriv + 1 + numoids + 1, 
sizeof (char *));
        command_line[0] = snmpcmd;
        command_line[1] = strdup ("-Le");
        command_line[2] = strdup ("-t");
@@ -310,23 +313,27 @@ main (int argc, char **argv)
        command_line[8] = "-v";
        command_line[9] = strdup (proto);
 
+       for (i = 0; i < numcontext; i++) {
+               command_line[10 + i] = context[i];
+       }
+       
        for (i = 0; i < numauthpriv; i++) {
-               command_line[10 + i] = authpriv[i];
+               command_line[10 + numcontext + i] = authpriv[i];
        }
 
-       xasprintf (&command_line[10 + numauthpriv], "%s:%s", server_address, 
port);
+       xasprintf (&command_line[10 + numcontext + numauthpriv], "%s:%s", 
server_address, port);
 
        /* This is just for display purposes, so it can remain a string */
-       xasprintf(&cl_hidden_auth, "%s -Le -t %d -r %d -m %s -v %s %s %s:%s",
-               snmpcmd, timeout_interval, retries, strlen(miblist) ? miblist : 
"''", proto, "[authpriv]",
+       xasprintf(&cl_hidden_auth, "%s -Le -t %d -r %d -m %s -v %s %s %s %s:%s",
+               snmpcmd, timeout_interval, retries, strlen(miblist) ? miblist : 
"''", proto, "[context]", "[authpriv]",
                server_address, port);
 
        for (i = 0; i < numoids; i++) {
-               command_line[10 + numauthpriv + 1 + i] = oids[i];
+               command_line[10 + numcontext + numauthpriv + 1 + i] = oids[i];
                xasprintf(&cl_hidden_auth, "%s %s", cl_hidden_auth, oids[i]);   
        }
 
-       command_line[10 + numauthpriv + 1 + numoids] = NULL;
+       command_line[10 + numcontext + numauthpriv + 1 + numoids] = NULL;
 
        if (verbose)
                printf ("%s\n", cl_hidden_auth);
@@ -646,6 +653,7 @@ process_arguments (int argc, char **argv
                {"retries", required_argument, 0, 'e'},
                {"miblist", required_argument, 0, 'm'},
                {"protocol", required_argument, 0, 'P'},
+               {"context", required_argument, 0, 'N'},
                {"seclevel", required_argument, 0, 'L'},
                {"secname", required_argument, 0, 'U'},
                {"authproto", required_argument, 0, 'a'},
@@ -675,7 +683,7 @@ process_arguments (int argc, char **argv
        }
 
        while (1) {
-               c = getopt_long (argc, argv, 
"nhvVOt:c:w:H:C:o:e:E:d:D:s:t:R:r:l:u:p:m:P:L:U:a:x:A:X:",
+               c = getopt_long (argc, argv, 
"nhvVOt:c:w:H:C:o:e:E:d:D:s:t:R:r:l:u:p:m:P:N:L:U:a:x:A:X:",
                                                                         
longopts, &option);
 
                if (c == -1 || c == EOF)
@@ -713,6 +721,9 @@ process_arguments (int argc, char **argv
                case 'P':       /* SNMP protocol version */
                        proto = optarg;
                        break;
+               case 'N':       /* SNMPv3 context */
+                       v3context = optarg;
+                       break;
                case 'L':       /* security level */
                        seclevel = optarg;
                        break;
@@ -960,6 +971,13 @@ validate_arguments ()
                authpriv[1] = strdup (community);
        }
        else if ( strcmp (proto, "3") == 0 ) {          /* snmpv3 args */
+               if (!(v3context == NULL)) {
+                       numcontext = 2;
+                       context = calloc (numcontext, sizeof (char *));
+                       context[0] = strdup ("-n");
+                       context[1] = strdup (v3context);
+               }
+               
                if (seclevel == NULL)
                        xasprintf(&seclevel, "noAuthNoPriv");
 
@@ -1101,6 +1119,8 @@ print_help (void)
        printf ("    %s\n", _("Use SNMP GETNEXT instead of SNMP GET"));
        printf (" %s\n", "-P, --protocol=[1|2c|3]");
        printf ("    %s\n", _("SNMP protocol version"));
+       printf (" %s\n", "-N, --context=CONTEXT");
+       printf ("    %s\n", _("SNMPv3 context"));
        printf (" %s\n", "-L, --seclevel=[noAuthNoPriv|authNoPriv|authPriv]");
        printf ("    %s\n", _("SNMPv3 securityLevel"));
        printf (" %s\n", "-a, --authproto=[MD5|SHA]");
@@ -1208,6 +1228,6 @@ print_usage (void)
        printf ("%s -H <ip_address> -o <OID> [-w warn_range] [-c 
crit_range]\n",progname);
        printf ("[-C community] [-s string] [-r regex] [-R regexi] [-t timeout] 
[-e retries]\n");
        printf ("[-l label] [-u units] [-p port-number] [-d delimiter] [-D 
output-delimiter]\n");
-       printf ("[-m miblist] [-P snmp version] [-L seclevel] [-U secname] [-a 
authproto]\n");
-       printf ("[-A authpasswd] [-x privproto] [-X privpasswd]\n");
+       printf ("[-m miblist] [-P snmp version] [-N context] [-L seclevel] [-U 
secname]\n");
+       printf ("[-a authproto] [-A authpasswd] [-x privproto] [-X 
privpasswd]\n");
 }
++++++ nagios-plugins.negate.validate_arguments.patch ++++++
--- /var/tmp/diff_new_pack.owB8a6/_old  2014-04-22 07:38:19.000000000 +0200
+++ /var/tmp/diff_new_pack.owB8a6/_new  2014-04-22 07:38:19.000000000 +0200
@@ -4,18 +4,18 @@
 
 Index: plugins/negate.c
 ===================================================================
---- plugins/negate.c.orig      2009-05-07 23:08:25.000000000 +0200
-+++ plugins/negate.c   2009-11-24 23:08:37.611524000 +0100
-@@ -42,7 +42,7 @@ const char *email = "nagiosplug-devel@li
+--- plugins/negate.c.orig
++++ plugins/negate.c
+@@ -44,7 +44,7 @@ const char *email = "nagiosplug-devel@li
  /* char *command_line; */
  
  static const char **process_arguments (int, char **);
 -int validate_arguments (char **);
 +void validate_arguments (char **);
+ int translate_state (char *);
  void print_help (void);
  void print_usage (void);
- int subst_text = FALSE;
-@@ -204,7 +204,7 @@ process_arguments (int argc, char **argv
+@@ -207,7 +207,7 @@ process_arguments (int argc, char **argv
  }
  
  

++++++ usr.lib.nagios.plugins.check_cups ++++++
# Last Modified: Mon Mar 11 14:58:16 2013
#include <tunables/global>

/usr/lib/nagios/plugins/check_cups {
  #include <abstractions/base>
  #include <abstractions/bash>
  #include <abstractions/consoles>
  #include <abstractions/nameservice>

  network inet dgram,
  network inet stream,

  /bin/bash rix,
  /bin/grep rix,
  /{usr/,}bin/which rix,
  /{usr/,}bin/lpstat rix,
  /{usr/,}bin/basename rix,
  /{usr/,}bin/mktemp rix,
  /{usr/,}bin/date rix,
  /{usr/,}bin/rm rix,
  /{usr/,}bin/cut rix,
  /{usr/,}bin/bc rix,
  /{usr/,}bin/wc rix,
  /tmp/lpstat* wr,

  /var/run/nscd/services r,

  /etc/cups/client.conf r,
  /proc/sys/crypto/fips_enabled r,

}
++++++ usr.lib.nagios.plugins.check_icmp ++++++
#include <tunables/global>
/usr/lib/nagios/plugins/check_icmp {
    #include <abstractions/base>
    #include <abstractions/nameservice>

    capability net_raw,
    capability setuid,
    network inet raw,
}
++++++ usr.lib.nagios.plugins.check_ide_smart ++++++
# Last Modified: Wed May 16 10:38:11 2012
#include <tunables/global>

/usr/lib/nagios/plugins/check_ide_smart {
  #include <abstractions/base>
  capability sys_admin,
  capability sys_rawio,
  /dev/s* r,
  /dev/h* r,
}
++++++ usr.lib.nagios.plugins.check_ntp_time ++++++
--- /var/tmp/diff_new_pack.owB8a6/_old  2014-04-22 07:38:19.000000000 +0200
+++ /var/tmp/diff_new_pack.owB8a6/_new  2014-04-22 07:38:19.000000000 +0200
@@ -3,6 +3,7 @@
 /usr/lib/nagios/plugins/check_ntp_time {
   #include <abstractions/base> 
   #include <abstractions/consoles>
+  #include <abstractions/nameservice>
   #include <abstractions/xad>
 
   network inet dgram,

++++++ usr.lib.nagios.plugins.check_ping ++++++
#include <tunables/global>
/usr/lib/nagios/plugins/check_ping {
    #include <abstractions/base>
    #include <abstractions/nameservice>

    capability net_raw,
    capability setuid,
    network inet raw,
    network inet6 raw,
    /{usr/,}bin/ping rix,
    /{usr/,}bin/ping6 rix,
}
++++++ usr.lib.nagios.plugins.check_ssh ++++++
#include <tunables/global>
/usr/lib/nagios/plugins/check_ssh flags=(complain) {
    #include <abstractions/base>
    #include <abstractions/nameservice>
}
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to