1
0

Accepting request 341451 from server:monitoring

- remove monitoring-plugins-postgresql.patch : fixed upstream
- remove monitoring-plugins.negate.validate_arguments.patch : fixed
  upstream
- add patch comments to spec file as requested by rpmlint
- rebase all patches to current code stream

- update to 2.1.2:
  ENHANCEMENTS
  + check_snmp's performance data now also includes warning/critical
    thresholds
  + New check_snmp "-N" option to specify SNMPv3 context name
  + New check_nt "-l" parameters: seconds|minutes|hours|days
  + New check_mailq -s option which tells the plugin to use sudo(8)
  + New -W/-C option for check_ldap to check number of entries (Gerhard Lausser)
  + The check_http -S/--ssl option now accepts the arguments "1.1" and "1.2"
    to force TLSv1.1 and TLSv1.2 connections, respectively
  + The check_http -S/--ssl option now allows for specifying the desired
    protocol with a "+" suffix to also accept newer versions
  FIXES
  + Let check_real terminate lines with CRLF when talking to the server, as
    mandated by 2326
  + Fix check_procs on HP-UX
  + check_smtp's -e/--expect option can now be combined with -S/--starttls
  + Fix incorrect performance data thresholds emitted by check_ups
  WARNINGS
  + The format of the performance data emitted by check_mrtgtraf has been
    changed to comply with the development guidelines
  + check_ssh now returns CRITICAL for protocol/version errors
  + If a plugin is invoked with -h/--help or -V/--version, the exit status
    is now UNKNOWN

OBS-URL: https://build.opensuse.org/request/show/341451
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/monitoring-plugins?expand=0&rev=2
This commit is contained in:
Dominique Leuenberger 2016-02-11 11:37:02 +00:00 committed by Git OBS Bridge
commit 266d9a3c70
23 changed files with 537 additions and 428 deletions

View File

@ -1,7 +1,9 @@
#! /usr/bin/perl -w
#!@PERL@ -w
#
# Copyright (C) 1999 Richard Mayhew <netsaint@splash.co.za>
# Copyright (C) 2014, SUSE Linux Products GmbH, Nuremberg
# Author: Lars Vogdt
# Author: Richard Mayhew - South Africa
# rewritten by: Lars Vogdt <lars@linux-schulserver.de>
#
# All rights reserved.
#
@ -31,12 +33,15 @@
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# Special thanks to Richard Mayhew for the original plugin written in
# 1999/09/20. Some code taken from Charlie Cook (check_disk.pl).
#
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 lib '@libexecdir@';
use utils qw($TIMEOUT %ERRORS &print_revision &support &usage);
# ----------------------------------------------------[ Function Prototypes ]--
@ -50,7 +55,7 @@ $ENV{BASH_ENV} = '';
# -----------------------------------------------------------------[ Global ]--
$PROGNAME = 'check_ircd';
$VERSION = '1.5.0';
$VERSION = '@NP_VERSION@';
my $nick = "ircd$$";
# -------------------------------------------------------------[ print_help ]--
@ -60,7 +65,7 @@ sub print_help ()
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
Perl Check IRCD monitoring plugin.
";
print_usage();
@ -171,7 +176,7 @@ MAIN:
my $hostname;
Getopt::Long::Configure('bundling');
GetOptions
( "V" => \$opt_V, "version" => \$opt_V,
( "V" => \$opt_V, "version" => \$opt_V,
"h" => \$opt_h, "help" => \$opt_h,
"v" => \$verbose,"verbose" => \$verbose,
"s" => \$ssl, "ssl" => \$ssl,

View File

@ -1,85 +0,0 @@
Index: plugins-scripts/check_log.sh
===================================================================
--- plugins-scripts/check_log.sh.orig
+++ plugins-scripts/check_log.sh
@@ -61,15 +61,16 @@
#PATH=""
ECHO="/bin/echo"
-GREP="/bin/egrep"
-DIFF="/bin/diff"
-TAIL="/bin/tail"
+GREP="/usr/bin/egrep"
+DIFF="/usr/bin/diff"
+TAIL="/usr/bin/tail"
CAT="/bin/cat"
RM="/bin/rm"
CHMOD="/bin/chmod"
-TOUCH="/bin/touch"
+TOUCH="/usr/bin/touch"
+MKTEMP="/bin/mktemp"
-PROGNAME=`/bin/basename $0`
+PROGNAME=`/usr/bin/basename $0`
PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'`
REVISION="@NP_VERSION@"
@@ -166,10 +167,10 @@
# If the source log file doesn't exist, exit
-if [ ! -e $logfile ]; then
+if [ ! -e "$logfile" ]; then
$ECHO "Log check error: Log file $logfile does not exist!\n"
exit $STATE_UNKNOWN
-elif [ ! -r $logfile ] ; then
+elif [ ! -r "$logfile" ] ; then
$ECHO "Log check error: Log file $logfile is not readable!\n"
exit $STATE_UNKNOWN
fi
@@ -178,8 +179,8 @@
# we're running this test, so copy the original log file over to
# the old diff file and exit
-if [ ! -e $oldlog ]; then
- $CAT $logfile > $oldlog
+if [ ! -e "$oldlog" ]; then
+ $CAT "$logfile" > "$oldlog"
$ECHO "Log check data initialized...\n"
exit $STATE_OK
fi
@@ -188,25 +189,25 @@
# The temporary file that the script should use while
# processing the log file.
-if [ -x /bin/mktemp ]; then
- tempdiff=`/bin/mktemp /tmp/check_log.XXXXXXXXXX`
+if [ -x "$MKTEMP" ]; then
+ tempdiff=`$MKTEMP /tmp/check_log.XXXXXXXXXX`
else
tempdiff=`/bin/date '+%H%M%S'`
tempdiff="/tmp/check_log.${tempdiff}"
- $TOUCH $tempdiff
- $CHMOD 600 $tempdiff
+ $TOUCH "$tempdiff"
+ $CHMOD 600 "$tempdiff"
fi
-$DIFF $logfile $oldlog | $GREP -v "^>" > $tempdiff
+$DIFF "$logfile" "$oldlog" | $GREP -v "^>" > "$tempdiff"
# Count the number of matching log entries we have
-count=`$GREP -c "$query" $tempdiff`
+count=`$GREP -c "$query" "$tempdiff"`
# Get the last matching entry in the diff file
-lastentry=`$GREP "$query" $tempdiff | $TAIL -1`
+lastentry=`$GREP "$query" "$tempdiff" | $TAIL -1`
-$RM -f $tempdiff
-$CAT $logfile > $oldlog
+$RM -f "$tempdiff"
+$CAT "$logfile" > "$oldlog"
if [ "$count" = "0" ]; then # no matches, exit with no error
$ECHO "Log check ok - 0 pattern matches found\n"

View File

@ -1,12 +0,0 @@
Index: plugins-scripts/check_ntp.pl
===================================================================
--- plugins-scripts/check_ntp.pl.orig
+++ plugins-scripts/check_ntp.pl
@@ -313,7 +313,6 @@
}
} else {
print "No match!\n" if $verbose;
- $jitter = '(not parsed)';
}
}

View File

@ -1,7 +1,7 @@
Index: plugins-root/Makefile.am
Index: monitoring-plugins-2.1.2/plugins-root/Makefile.am
===================================================================
--- plugins-root/Makefile.am.orig
+++ plugins-root/Makefile.am
--- monitoring-plugins-2.1.2.orig/plugins-root/Makefile.am
+++ monitoring-plugins-2.1.2/plugins-root/Makefile.am
@@ -47,7 +47,6 @@ INSTALL_SUID = \
echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(libexecdir)/$$p"; \
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(libexecdir)/$$p; \
@ -26,10 +26,10 @@ Index: plugins-root/Makefile.am
fi
# /* Author Coreutils team sub-citation */
Index: plugins-root/Makefile.in
Index: monitoring-plugins-2.1.2/plugins-root/Makefile.in
===================================================================
--- plugins-root/Makefile.in.orig
+++ plugins-root/Makefile.in
--- monitoring-plugins-2.1.2.orig/plugins-root/Makefile.in
+++ monitoring-plugins-2.1.2/plugins-root/Makefile.in
@@ -1341,7 +1341,6 @@ INSTALL_SUID = \
echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(libexecdir)/$$p"; \
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(libexecdir)/$$p; \

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:da55221547d56d680810c57ca943a83806aa38902c9afd3e44cda8d780fbff98
size 2209391

View File

@ -0,0 +1,90 @@
Index: monitoring-plugins-2.1.2/plugins-scripts/check_log.sh
===================================================================
--- monitoring-plugins-2.1.2.orig/plugins-scripts/check_log.sh
+++ monitoring-plugins-2.1.2/plugins-scripts/check_log.sh
@@ -115,27 +115,27 @@ while test -n "$1"; do
exit $STATE_OK
;;
--filename)
- logfile=$2
+ logfile="$2"
shift
;;
-F)
- logfile=$2
+ logfile="$2"
shift
;;
--oldlog)
- oldlog=$2
+ oldlog="$2"
shift
;;
-O)
- oldlog=$2
+ oldlog="$2"
shift
;;
--query)
- query=$2
+ query="$2"
shift
;;
-q)
- query=$2
+ query="$2"
shift
;;
-x)
@@ -157,10 +157,10 @@ done
# If the source log file doesn't exist, exit
-if [ ! -e $logfile ]; then
+if [ ! -e "$logfile" ]; then
echo "Log check error: Log file $logfile does not exist!"
exit $STATE_UNKNOWN
-elif [ ! -r $logfile ] ; then
+elif [ ! -r "$logfile" ] ; then
echo "Log check error: Log file $logfile is not readable!"
exit $STATE_UNKNOWN
fi
@@ -169,8 +169,8 @@ fi
# we're running this test, so copy the original log file over to
# the old diff file and exit
-if [ ! -e $oldlog ]; then
- cat $logfile > $oldlog
+if [ ! -e "$oldlog" ]; then
+ cat "$logfile" > "$oldlog"
echo "Log check data initialized..."
exit $STATE_OK
fi
@@ -184,20 +184,20 @@ if [ -x /bin/mktemp ]; then
else
tempdiff=`/bin/date '+%H%M%S'`
tempdiff="/tmp/check_log.${tempdiff}"
- touch $tempdiff
- chmod 600 $tempdiff
+ touch "$tempdiff"
+ chmod 600 "$tempdiff"
fi
-diff $logfile $oldlog | grep -v "^>" > $tempdiff
+diff "$logfile" "$oldlog" | grep -v "^>" > "$tempdiff"
# Count the number of matching log entries we have
-count=`grep -c "$query" $tempdiff`
+count=`grep -c "$query" "$tempdiff"`
# Get the last matching entry in the diff file
-lastentry=`grep "$query" $tempdiff | tail -1`
+lastentry=`grep "$query" "$tempdiff" | tail -1`
-rm -f $tempdiff
-cat $logfile > $oldlog
+rm -f "$tempdiff"
+cat "$logfile" > "$oldlog"
if [ "$count" = "0" ]; then # no matches, exit with no error
echo "Log check ok - 0 pattern matches found"

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e8b369f901c4442d890ff2650b76c7ff7e3aa9de93359f01abdc6d881227c765
size 2207739

View File

@ -67,6 +67,17 @@ not have to define sensitive credentials in the configuration of your
monitoring server and these options won't appear in the command line.
Permissions
===========
As some plugins require log in data, which are formerly stored in
/etc/{icinga,nagios}/resource.cfg
and can now be stored inside the extra-opts file, please remember that the same
security rules apply now also to this new extra-opts file. Under normal
circumstances, you should set restrictive permissions (600 or 640) on them.
User: root
Group: icinga or nagios, depending on your monitoring daemon
Further use of the /etc/monitoring-plugins directory
====================================================

View File

@ -1,12 +0,0 @@
Index: plugins/check_pgsql.c
===================================================================
--- plugins/check_pgsql.c.orig
+++ plugins/check_pgsql.c
@@ -36,6 +36,7 @@ const char *email = "devel@monitoring-pl
#include "utils.h"
#include "netutils.h"
+#include <pg_config_manual.h>
#include <libpq-fe.h>
#include <pg_config_manual.h>

View File

@ -1,8 +1,8 @@
Index: plugins/check_disk.c
Index: monitoring-plugins-2.1.2/plugins/check_disk.c
===================================================================
--- plugins/check_disk.c.orig
+++ plugins/check_disk.c
@@ -996,7 +996,7 @@ get_stats (struct parameter_list *p, str
--- monitoring-plugins-2.1.2.orig/plugins/check_disk.c
+++ monitoring-plugins-2.1.2/plugins/check_disk.c
@@ -1002,7 +1002,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,

View File

@ -29,10 +29,10 @@ SWAP CRITICAL - 0% free (0 MB out of 0 MB) |swap=0MB;0;0;0;0
Additional info:
https://bugzilla.redhat.com/512559
Index: monitoring-plugins-2.0/plugins/check_swap.c
Index: monitoring-plugins-2.1.2/plugins/check_swap.c
===================================================================
--- monitoring-plugins-2.0.orig/plugins/check_swap.c
+++ monitoring-plugins-2.0/plugins/check_swap.c
--- monitoring-plugins-2.1.2.orig/plugins/check_swap.c
+++ monitoring-plugins-2.1.2/plugins/check_swap.c
@@ -125,7 +125,7 @@ main (int argc, char **argv)
free_swap_mb += dskfree_mb;
if (allswaps) {

View File

@ -1,3 +1,114 @@
-------------------------------------------------------------------
Mon Oct 26 15:57:49 UTC 2015 - lars@linux-schulserver.de
- remove monitoring-plugins-postgresql.patch : fixed upstream
- remove monitoring-plugins.negate.validate_arguments.patch : fixed
upstream
- add patch comments to spec file as requested by rpmlint
- rebase all patches to current code stream
-------------------------------------------------------------------
Fri Oct 16 18:09:24 UTC 2015 - mardnh@gmx.de
- update to 2.1.2:
ENHANCEMENTS
+ check_snmp's performance data now also includes warning/critical
thresholds
+ New check_snmp "-N" option to specify SNMPv3 context name
+ New check_nt "-l" parameters: seconds|minutes|hours|days
+ New check_mailq -s option which tells the plugin to use sudo(8)
+ New -W/-C option for check_ldap to check number of entries (Gerhard Lausser)
+ The check_http -S/--ssl option now accepts the arguments "1.1" and "1.2"
to force TLSv1.1 and TLSv1.2 connections, respectively
+ The check_http -S/--ssl option now allows for specifying the desired
protocol with a "+" suffix to also accept newer versions
FIXES
+ Let check_real terminate lines with CRLF when talking to the server, as
mandated by 2326
+ Fix check_procs on HP-UX
+ check_smtp's -e/--expect option can now be combined with -S/--starttls
+ Fix incorrect performance data thresholds emitted by check_ups
WARNINGS
+ The format of the performance data emitted by check_mrtgtraf has been
changed to comply with the development guidelines
+ check_ssh now returns CRITICAL for protocol/version errors
+ If a plugin is invoked with -h/--help or -V/--version, the exit status
is now UNKNOWN
+ The superseded check_ntp.pl was removed, please use check_ntp_peer or
check_ntp_time instead
- use source url
-------------------------------------------------------------------
Thu Aug 20 11:22:34 UTC 2015 - lars@linux-schulserver.de
- fix wrong requires for monitoring-plugins-dbi* packages
(fixes bnc #914486)
-------------------------------------------------------------------
Sat Aug 1 19:09:11 UTC 2015 - lars@linux-schulserver.de
- add apparmor profiles for the following checks:
+ check_disk
+ check_load
+ check_procs
+ check_swap
+ check_users
-------------------------------------------------------------------
Sun Jul 26 10:17:12 UTC 2015 - lars@linux-schulserver.de
- add a note about permissions for the extra-opts file in README
-------------------------------------------------------------------
Wed Jan 21 11:22:54 UTC 2015 - lars@linux-schulserver.de
- use the check_ircd script as submitted via GitHub
-------------------------------------------------------------------
Sat Dec 27 12:41:01 UTC 2014 - lars@linux-schulserver.de
- update to 2.1.1:
FIXES
+ Fix check_ntp's jitter checking
+ Fix check_ntp's handling of invalid server responses
+ Fix check_apt's handling of invalid regular expressions
+ Fix check_real's server response processing
+ Fix backslash escaping in check_tcp's --help output
+ Fix check_jabber to work with Openfire servers
+ Fix check_oracle bad string matching when testing TNS server
+ Fixed check_ifstatus performance data output
+ Fixed expire time output for sslutils
+ check_dns now verifies if the answer is returning from the queried
server
+ Fix check_by_ssh to accept --hostname as argument
ENHANCEMENTS
+ New check_hpjd -p option for port specification (abrist)
+ New ./configure --with-qmail-qstat-command option to specify the path to
qmail-qstat(8)
+ New check_ifstatus -n option to ignore interfaces by name
+ check_ntp_peer has now specific state output for each metric
+ New check_mysql -n option to ignore authentication failures
+ Added IP and port or socket name to error messages
+ New check_ntp_time -o option to add expected offset
+ check_disk shows now troubled partions in verbose mode
+ check_dig has now support for drill and dig
+ check_dig has now support for -6 option
+ Add performance data to check_file_age
- removed upstreamed patches:
+ monitoring-plugins-1.4.14-ntpd.patch
+ plugins.negate.validate_arguments.patch
+ monitoring-plugins.check_ntp.c-64bit-portability-issue.patch
- adapted monitoring-plugins-1.4.14-check_log.patch to new version:
+ monitoring-plugins-2.1.1-check_logfile.patch
- added the following new patch:
+ monitoring-plugins.check_hpjd.c-64bit-portability-issue.patch
- refreshed the other patches
- ran spec-cleaner
- require portmap on older distributions for building instead of
rpcbind
- newer openSUSE versions use rsyslog: require virtual syslog
package for build
-------------------------------------------------------------------
Sun Aug 10 17:11:48 UTC 2014 - lars@linux-schulserver.de

View File

@ -0,0 +1,13 @@
Index: monitoring-plugins-2.1.2/plugins/check_hpjd.c
===================================================================
--- monitoring-plugins-2.1.2.orig/plugins/check_hpjd.c
+++ monitoring-plugins-2.1.2/plugins/check_hpjd.c
@@ -66,7 +66,7 @@ void print_usage (void);
char *community = NULL;
char *address = NULL;
-char *port = NULL;
+int port = NULL;
int
main (int argc, char **argv)

View File

@ -1,13 +0,0 @@
Index: monitoring-plugins-2.0/plugins/check_ntp.c
===================================================================
--- monitoring-plugins-2.0.orig/plugins/check_ntp.c
+++ monitoring-plugins-2.0/plugins/check_ntp.c
@@ -616,7 +616,7 @@ double jitter_request(const char *host,
if (bytes_read != ntp_cm_ints + req.count)
die(STATE_UNKNOWN, _("Invalid NTP response: %d bytes read does not equal %d plus %d data segment"), bytes_read, ntp_cm_ints, req.count);
/* else null terminate */
- strncpy(req.data[req.count], "\0", 1);
+ req.data[req.count] = "\0";
DBG(print_ntp_control_message(&req));

View File

@ -1,8 +1,8 @@
Index: plugins/check_snmp.c
Index: monitoring-plugins-2.1.2/plugins/check_snmp.c
===================================================================
--- plugins/check_snmp.c.orig
+++ plugins/check_snmp.c
@@ -567,7 +567,7 @@ main (int argc, char **argv)
--- monitoring-plugins-2.1.2.orig/plugins/check_snmp.c
+++ monitoring-plugins-2.1.2/plugins/check_snmp.c
@@ -566,7 +566,7 @@ main (int argc, char **argv)
len = sizeof(perfstr)-strlen(perfstr)-1;
strncat(perfstr, show, len>ptr-show ? ptr-show : len);

View File

@ -1,8 +1,8 @@
Index: monitoring-plugins-2.0/plugins/check_snmp.c
Index: monitoring-plugins-2.1.2/plugins/check_snmp.c
===================================================================
--- monitoring-plugins-2.0.orig/plugins/check_snmp.c
+++ monitoring-plugins-2.0/plugins/check_snmp.c
@@ -104,6 +104,8 @@ int errcode, excode;
--- monitoring-plugins-2.1.2.orig/plugins/check_snmp.c
+++ monitoring-plugins-2.1.2/plugins/check_snmp.c
@@ -103,6 +103,8 @@ int errcode, excode;
char *server_address = NULL;
char *community = NULL;
@ -11,7 +11,7 @@ Index: monitoring-plugins-2.0/plugins/check_snmp.c
char **authpriv = NULL;
char *proto = NULL;
char *seclevel = NULL;
@@ -128,6 +130,7 @@ size_t nunits = 0;
@@ -127,6 +129,7 @@ size_t nunits = 0;
size_t unitv_size = OID_COUNT_STEP;
int numoids = 0;
int numauthpriv = 0;
@ -19,7 +19,7 @@ Index: monitoring-plugins-2.0/plugins/check_snmp.c
int verbose = 0;
int usesnmpgetnext = FALSE;
char *warning_thresholds = NULL;
@@ -297,8 +300,8 @@ main (int argc, char **argv)
@@ -296,8 +299,8 @@ main (int argc, char **argv)
snmpcmd = strdup (PATH_TO_SNMPGET);
}
@ -30,7 +30,7 @@ Index: monitoring-plugins-2.0/plugins/check_snmp.c
command_line[0] = snmpcmd;
command_line[1] = strdup ("-Le");
command_line[2] = strdup ("-t");
@@ -310,23 +313,27 @@ main (int argc, char **argv)
@@ -309,23 +312,27 @@ main (int argc, char **argv)
command_line[8] = "-v";
command_line[9] = strdup (proto);
@ -64,7 +64,7 @@ Index: monitoring-plugins-2.0/plugins/check_snmp.c
if (verbose)
printf ("%s\n", cl_hidden_auth);
@@ -646,6 +653,7 @@ process_arguments (int argc, char **argv
@@ -645,6 +652,7 @@ process_arguments (int argc, char **argv
{"retries", required_argument, 0, 'e'},
{"miblist", required_argument, 0, 'm'},
{"protocol", required_argument, 0, 'P'},
@ -72,7 +72,7 @@ Index: monitoring-plugins-2.0/plugins/check_snmp.c
{"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
@@ -674,7 +682,7 @@ process_arguments (int argc, char **argv
}
while (1) {
@ -81,7 +81,7 @@ Index: monitoring-plugins-2.0/plugins/check_snmp.c
longopts, &option);
if (c == -1 || c == EOF)
@@ -713,6 +721,9 @@ process_arguments (int argc, char **argv
@@ -712,6 +720,9 @@ process_arguments (int argc, char **argv
case 'P': /* SNMP protocol version */
proto = optarg;
break;
@ -91,7 +91,7 @@ Index: monitoring-plugins-2.0/plugins/check_snmp.c
case 'L': /* security level */
seclevel = optarg;
break;
@@ -960,6 +971,13 @@ validate_arguments ()
@@ -959,6 +970,13 @@ validate_arguments ()
authpriv[1] = strdup (community);
}
else if ( strcmp (proto, "3") == 0 ) { /* snmpv3 args */
@ -105,7 +105,7 @@ Index: monitoring-plugins-2.0/plugins/check_snmp.c
if (seclevel == NULL)
xasprintf(&seclevel, "noAuthNoPriv");
@@ -1103,6 +1121,8 @@ print_help (void)
@@ -1102,6 +1120,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"));
@ -114,7 +114,7 @@ Index: monitoring-plugins-2.0/plugins/check_snmp.c
printf (" %s\n", "-L, --seclevel=[noAuthNoPriv|authNoPriv|authPriv]");
printf (" %s\n", _("SNMPv3 securityLevel"));
printf (" %s\n", "-a, --authproto=[MD5|SHA]");
@@ -1210,6 +1230,6 @@ print_usage (void)
@@ -1209,6 +1229,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");

View File

@ -1,26 +0,0 @@
---
plugins/negate.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: plugins/negate.c
===================================================================
--- 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);
@@ -207,7 +207,7 @@ process_arguments (int argc, char **argv
}
-int
+void
validate_arguments (char **command_line)
{
if (command_line[0] == NULL)

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,8 @@
#include <tunables/global>
/usr/lib/nagios/plugins/check_disk {
#include <abstractions/base>
#include <abstractions/consoles>
/etc/mtab r,
@{PROC}/[0-9]*/mounts r,
/usr/lib/nagios/plugins/check_disk rm,
}

View File

@ -0,0 +1,11 @@
#include <tunables/global>
/usr/lib/nagios/plugins/check_load {
#include <abstractions/base>
#include <abstractions/consoles>
#include <abstractions/wutmp>
/usr/lib/nagios/plugins/check_load rm,
/usr/bin/uptime rmix,
/proc/uptime r,
/proc/meminfo r,
/proc/loadavg r,
}

View File

@ -0,0 +1,13 @@
#include <tunables/global>
/usr/lib/nagios/plugins/check_procs {
#include <abstractions/nameservice>
#include <abstractions/base>
#include <abstractions/consoles>
capability sys_ptrace,
/bin/ps rix,
/proc/ r,
/proc/** r,
/usr/lib/nagios/plugins/check_procs mr,
}

View File

@ -0,0 +1,6 @@
#include <tunables/global>
/usr/lib/nagios/plugins/check_swap {
#include <abstractions/base>
#include <abstractions/consoles>
/usr/lib/nagios/plugins/check_swap rm,
}

View File

@ -0,0 +1,8 @@
#include <tunables/global>
/usr/lib/nagios/plugins/check_users {
#include <abstractions/base>
#include <abstractions/consoles>
#include <abstractions/wutmp>
/usr/lib/nagios/plugins/check_users rm,
}