From c909b4e0e7b303a4efb79f5e1690f27d50d9939a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Wed, 17 Jan 2024 14:06:21 +0100 Subject: [PATCH] Sync from SUSE:ALP:Source:Standard:1.0 monitoring-plugins revision f09e7dd02a45d44099779c0f3272c408 --- .gitattributes | 23 + check_ircd_ssl | 220 ++ monitoring-plugins-2.3.3-check_by_ssh.patch | 46 + ...ng-plugins-2.3.3-check_disk_on_btrfs.patch | 25 + ...lugins-2.3.3-check_ntp_perf_absolute.patch | 13 + monitoring-plugins-2.3.3-check_ssh.patch | 212 ++ ...-2.3.3-check_ssh.t_-_improve_testing.patch | 139 ++ ...3.3-root-plugins-Makefile_-_no_chown.patch | 21 + ...ns-2.3.3-wrong_percent_in_check_swap.patch | 44 + monitoring-plugins-2.3.5.tar.gz | 3 + monitoring-plugins-2.3.5.tar.gz.sha1 | 1 + monitoring-plugins-README-extra-opts | 95 + monitoring-plugins-README.SUSE | 27 + monitoring-plugins-README.SUSE-check_cups | 110 + monitoring-plugins-README.SUSE-check_dhcp | 60 + monitoring-plugins-README.SUSE-check_icmp | 48 + ...toring-plugins-README.SUSE-check_ide_smart | 48 + monitoring-plugins-README.SUSE-check_ntp_time | 10 + monitoring-plugins-README.SUSE-check_ping | 10 + monitoring-plugins-permissions | 18 + monitoring-plugins-rpmlintrc | 5 + monitoring-plugins.changes | 1840 +++++++++++++++++ monitoring-plugins.check_cups.sh | 377 ++++ monitoring-plugins.obsinfo | 5 + monitoring-plugins.spec | 1701 +++++++++++++++ nrpe-check_load | 1 + nrpe-check_mailq | 1 + nrpe-check_mysql | 1 + nrpe-check_ntp_time | 1 + nrpe-check_partition | 1 + nrpe-check_proc_cron | 1 + nrpe-check_swap | 1 + nrpe-check_total_procs | 1 + nrpe-check_ups | 1 + nrpe-check_users | 1 + nrpe-check_zombie_procs | 1 + usr.lib.nagios.plugins.check_cups | 31 + usr.lib.nagios.plugins.check_dhcp | 8 + usr.lib.nagios.plugins.check_disk | 9 + usr.lib.nagios.plugins.check_icmp | 11 + usr.lib.nagios.plugins.check_ide_smart | 12 + usr.lib.nagios.plugins.check_load | 11 + usr.lib.nagios.plugins.check_ntp_time | 24 + usr.lib.nagios.plugins.check_ping | 14 + usr.lib.nagios.plugins.check_procs | 13 + usr.lib.nagios.plugins.check_procs.sle15 | 14 + usr.lib.nagios.plugins.check_ssh | 7 + usr.lib.nagios.plugins.check_swap | 6 + usr.lib.nagios.plugins.check_users | 8 + 49 files changed, 5280 insertions(+) create mode 100644 .gitattributes create mode 100644 check_ircd_ssl create mode 100644 monitoring-plugins-2.3.3-check_by_ssh.patch create mode 100644 monitoring-plugins-2.3.3-check_disk_on_btrfs.patch create mode 100644 monitoring-plugins-2.3.3-check_ntp_perf_absolute.patch create mode 100644 monitoring-plugins-2.3.3-check_ssh.patch create mode 100644 monitoring-plugins-2.3.3-check_ssh.t_-_improve_testing.patch create mode 100644 monitoring-plugins-2.3.3-root-plugins-Makefile_-_no_chown.patch create mode 100644 monitoring-plugins-2.3.3-wrong_percent_in_check_swap.patch create mode 100644 monitoring-plugins-2.3.5.tar.gz create mode 100644 monitoring-plugins-2.3.5.tar.gz.sha1 create mode 100644 monitoring-plugins-README-extra-opts create mode 100644 monitoring-plugins-README.SUSE create mode 100644 monitoring-plugins-README.SUSE-check_cups create mode 100644 monitoring-plugins-README.SUSE-check_dhcp create mode 100644 monitoring-plugins-README.SUSE-check_icmp create mode 100644 monitoring-plugins-README.SUSE-check_ide_smart create mode 100644 monitoring-plugins-README.SUSE-check_ntp_time create mode 100644 monitoring-plugins-README.SUSE-check_ping create mode 100644 monitoring-plugins-permissions create mode 100644 monitoring-plugins-rpmlintrc create mode 100644 monitoring-plugins.changes create mode 100644 monitoring-plugins.check_cups.sh create mode 100644 monitoring-plugins.obsinfo create mode 100644 monitoring-plugins.spec create mode 100644 nrpe-check_load create mode 100644 nrpe-check_mailq create mode 100644 nrpe-check_mysql create mode 100644 nrpe-check_ntp_time create mode 100644 nrpe-check_partition create mode 100644 nrpe-check_proc_cron create mode 100644 nrpe-check_swap create mode 100644 nrpe-check_total_procs create mode 100644 nrpe-check_ups create mode 100644 nrpe-check_users create mode 100644 nrpe-check_zombie_procs create mode 100644 usr.lib.nagios.plugins.check_cups create mode 100644 usr.lib.nagios.plugins.check_dhcp create mode 100644 usr.lib.nagios.plugins.check_disk create mode 100644 usr.lib.nagios.plugins.check_icmp create mode 100644 usr.lib.nagios.plugins.check_ide_smart create mode 100644 usr.lib.nagios.plugins.check_load create mode 100644 usr.lib.nagios.plugins.check_ntp_time create mode 100644 usr.lib.nagios.plugins.check_ping create mode 100644 usr.lib.nagios.plugins.check_procs create mode 100644 usr.lib.nagios.plugins.check_procs.sle15 create mode 100644 usr.lib.nagios.plugins.check_ssh create mode 100644 usr.lib.nagios.plugins.check_swap create mode 100644 usr.lib.nagios.plugins.check_users diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..fecc750 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/check_ircd_ssl b/check_ircd_ssl new file mode 100644 index 0000000..d13687b --- /dev/null +++ b/check_ircd_ssl @@ -0,0 +1,220 @@ +#!@PERL@ -w +# +# Copyright (C) 1999 Richard Mayhew +# Copyright (C) 2014, SUSE Linux Products GmbH, Nuremberg +# Author: Richard Mayhew - South Africa +# rewritten by: 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. +# +# 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::IP; +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 '@libexecdir@'; +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 = '@NP_VERSION@'; +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 monitoring plugin. + +"; + 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 (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 [-w ] [-c ] [-p ] [-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::IP->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}; +} diff --git a/monitoring-plugins-2.3.3-check_by_ssh.patch b/monitoring-plugins-2.3.3-check_by_ssh.patch new file mode 100644 index 0000000..49ac954 --- /dev/null +++ b/monitoring-plugins-2.3.3-check_by_ssh.patch @@ -0,0 +1,46 @@ +Index: monitoring-plugins-2.3.3/plugins/check_by_ssh.c +=================================================================== +--- monitoring-plugins-2.3.3.orig/plugins/check_by_ssh.c ++++ monitoring-plugins-2.3.3/plugins/check_by_ssh.c +@@ -109,6 +109,13 @@ main (int argc, char **argv) + return STATE_UNKNOWN; + } + ++ /* SSH returns 255 if connection attempt fails; include the first line of error output */ ++ if (result == 255 && unknown_timeout) { ++ printf (_("SSH connection failed: %s\n"), ++ chld_err.lines > 0 ? chld_err.line[0] : "(no error output)"); ++ return STATE_UNKNOWN; ++ } ++ + if (verbose) { + for(i = 0; i < chld_out.lines; i++) + printf("stdout: %s\n", chld_out.line[i]); +@@ -455,12 +462,12 @@ print_help (void) + printf (" %s\n", _("Tell ssh to use this configfile [optional]")); + printf (" %s\n","-q, --quiet"); + printf (" %s\n", _("Tell ssh to suppress warning and diagnostic messages [optional]")); +- printf (UT_WARN_CRIT); +- printf (UT_CONN_TIMEOUT, DEFAULT_SOCKET_TIMEOUT); +- printf (" %s\n","-U, --unknown-timeout"); +- printf (" %s\n", _("Make connection problems return UNKNOWN instead of CRITICAL")); +- printf (UT_VERBOSE); +- printf("\n"); ++ printf (UT_WARN_CRIT); ++ printf (UT_CONN_TIMEOUT, DEFAULT_SOCKET_TIMEOUT); ++ printf (" %s\n","-U, --unknown-timeout"); ++ printf (" %s\n", _("Make connection problems return UNKNOWN instead of CRITICAL")); ++ printf (UT_VERBOSE); ++ printf("\n"); + printf (" %s\n", _("The most common mode of use is to refer to a local identity file with")); + printf (" %s\n", _("the '-i' option. In this mode, the identity pair should have a null")); + printf (" %s\n", _("passphrase and the public key should be listed in the authorized_keys")); +@@ -479,7 +486,7 @@ print_help (void) + printf (" %s\n", "[1080933700] PROCESS_SERVICE_CHECK_RESULT;flint;c2;0; up 2 days"); + printf (" %s\n", "[1080933700] PROCESS_SERVICE_CHECK_RESULT;flint;c3;0; up 2 days"); + +- printf(UT_SUPPORT); ++ printf(UT_SUPPORT); + } + + diff --git a/monitoring-plugins-2.3.3-check_disk_on_btrfs.patch b/monitoring-plugins-2.3.3-check_disk_on_btrfs.patch new file mode 100644 index 0000000..671862c --- /dev/null +++ b/monitoring-plugins-2.3.3-check_disk_on_btrfs.patch @@ -0,0 +1,25 @@ +commit a00fd77179dd6a6c2c96ff09350a9c213c18fd62 +Author: George Hansper +Date: Tue Sep 22 19:06:57 2020 +1000 + + check_disk - fix false DISK CRITICAL alert for btrfs filesystems due to BSD Gnulib workaround + +Index: monitoring-plugins-2.3.3/plugins/check_disk.c +=================================================================== +--- monitoring-plugins-2.3.3.orig/plugins/check_disk.c ++++ monitoring-plugins-2.3.3/plugins/check_disk.c +@@ -1041,7 +1041,14 @@ get_stats (struct parameter_list *p, str + + void + get_path_stats (struct parameter_list *p, struct fs_usage *fsp) { ++#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(OpenBSD ) ++ /* 2007-12-08 - Workaround for Gnulib reporting insanely high available ++ * space on BSD (the actual value should be negative but fsp->fsu_bavail ++ * is unsigned) */ ++ p->available = fsp->fsu_bavail > fsp->fsu_bfree ? 0 : fsp->fsu_bavail; ++#else + p->available = fsp->fsu_bavail; ++#endif + p->available_to_root = fsp->fsu_bfree; + p->used = fsp->fsu_blocks - fsp->fsu_bfree; + if (freespace_ignore_reserved) { diff --git a/monitoring-plugins-2.3.3-check_ntp_perf_absolute.patch b/monitoring-plugins-2.3.3-check_ntp_perf_absolute.patch new file mode 100644 index 0000000..753cf02 --- /dev/null +++ b/monitoring-plugins-2.3.3-check_ntp_perf_absolute.patch @@ -0,0 +1,13 @@ +Index: monitoring-plugins-2.3.3/plugins/check_ntp_time.c +=================================================================== +--- monitoring-plugins-2.3.3.orig/plugins/check_ntp_time.c ++++ monitoring-plugins-2.3.3/plugins/check_ntp_time.c +@@ -533,7 +533,7 @@ int process_arguments(int argc, char **a + + char *perfd_offset (double offset) + { +- return fperfdata ("offset", offset, "s", ++ return fperfdata ("offset", fabs(offset), "s", + TRUE, offset_thresholds->warning->end, + TRUE, offset_thresholds->critical->end, + FALSE, 0, FALSE, 0); diff --git a/monitoring-plugins-2.3.3-check_ssh.patch b/monitoring-plugins-2.3.3-check_ssh.patch new file mode 100644 index 0000000..dbe7bbd --- /dev/null +++ b/monitoring-plugins-2.3.3-check_ssh.patch @@ -0,0 +1,212 @@ +From e56255ee2f2887551e15aba2410138238efab030 Mon Sep 17 00:00:00 2001 +From: Anton Lofgren +Date: Mon, 21 Oct 2013 08:18:30 +0200 +Subject: [PATCH 1/4] check_ssh: properly parse a delayed version control + string + +This resolves an issue with SSH servers which do not respond with their +version control string as the first thing in the SSH protocol version +exchange phase after connection establishment. + +This patch also makes sure that we disregard a potential comment in the +version exchange string to avoid nonsense mismatches. In the future, we +might want to add the capability to match against a user specified comment. + +In addition, the patch largely improves the communication towards the +server, which adds better protocol adherence. + +Of course, new test cases are added to support the trigger and guard +against regressions of the bugs solved by this patch. + +This fixes op5#7945 (https://bugs.op5.com/view.php?id=7945) + +Signed-off-by: Anton Lofgren +--- + plugins/check_ssh.c | 122 +++++++++++++++++++++++++++++------------- + plugins/t/check_ssh.t | 97 ++++++++++++++++++++++++++------- + 2 files changed, 164 insertions(+), 55 deletions(-) + +Index: monitoring-plugins-2.3.3/plugins/check_ssh.c +=================================================================== +--- monitoring-plugins-2.3.3.orig/plugins/check_ssh.c ++++ monitoring-plugins-2.3.3/plugins/check_ssh.c +@@ -106,7 +106,7 @@ process_arguments (int argc, char **argv + {"timeout", required_argument, 0, 't'}, + {"verbose", no_argument, 0, 'v'}, + {"remote-version", required_argument, 0, 'r'}, +- {"remote-protcol", required_argument, 0, 'P'}, ++ {"remote-protocol", required_argument, 0, 'P'}, + {0, 0, 0, 0} + }; + +@@ -215,8 +215,13 @@ ssh_connect (char *haddr, int hport, cha + { + int sd; + int result; ++ int len = 0; ++ ssize_t byte_offset = 0; ++ ssize_t recv_ret = 0; ++ char *version_control_string = NULL; + char *output = NULL; + char *buffer = NULL; ++ char *tmp= NULL, *saveptr = NULL; + char *ssh_proto = NULL; + char *ssh_server = NULL; + static char *rev_no = VERSION; +@@ -231,51 +236,118 @@ ssh_connect (char *haddr, int hport, cha + return result; + + output = (char *) malloc (BUFF_SZ + 1); +- memset (output, 0, BUFF_SZ + 1); +- recv (sd, output, BUFF_SZ, 0); +- if (strncmp (output, "SSH", 3)) { +- printf (_("Server answer: %s"), output); +- close(sd); ++ memset(output, 0, BUFF_SZ+1); ++ while (!version_control_string && (recv_ret = recv(sd, output+byte_offset, BUFF_SZ - byte_offset, 0)) > 0) { ++ if (strchr(output, '\n')) { /* we've got at least one full line, start parsing*/ ++ byte_offset = 0; ++ while (strchr(output+byte_offset, '\n') != NULL) { ++ /*Partition the buffer so that this line is a separate string, ++ * by replacing the newline with NUL*/ ++ output[(strchr(output+byte_offset, '\n')-output)]= '\0'; ++ len = strlen(output+byte_offset); ++ if (len >= 4) { ++ /*if the string starts with SSH-, this _should_ be a valid version control string*/ ++ if (strncmp (output+byte_offset, "SSH-", 4) == 0) { ++ version_control_string = output+byte_offset; ++ break; ++ } ++ } ++ ++ /*the start of the next line (if one exists) will be after the current one (+ NUL)*/ ++ byte_offset+=len+1; ++ } ++ if(!version_control_string) { ++ /* move unconsumed data to beginning of buffer, null rest */ ++ memmove((void *)output, (void *)output+byte_offset+1, BUFF_SZ - len+1); ++ memset(output+byte_offset+1, 0, BUFF_SZ-byte_offset+1); ++ ++ /*start reading from end of current line chunk on next recv*/ ++ byte_offset = strlen(output); ++ } ++ } ++ else { ++ byte_offset += recv_ret; ++ } ++ } ++ tmp = NULL; ++ if (recv_ret < 0) { ++ printf("SSH CRITICAL - %s", strerror(errno)); ++ exit(STATE_CRITICAL); ++ } ++ if (!version_control_string) { ++ printf("SSH CRITICAL - No version control string received"); ++ exit(STATE_CRITICAL); ++ } ++ /* ++ * "When the connection has been established, both sides MUST send an ++ * identification string. This identification string MUST be ++ * ++ * SSH-protoversion-softwareversion SP comments CR LF" ++ * - RFC 4253:4.2 ++ */ ++ strip (version_control_string); ++ if (verbose) ++ printf ("%s\n", version_control_string); ++ ssh_proto = version_control_string + 4; ++ ++ /* ++ * We assume the protoversion is of the form Major.Minor, although ++ * this is not _strictly_ required. See ++ * ++ * "Both the 'protoversion' and 'softwareversion' strings MUST consist of ++ * printable US-ASCII characters, with the exception of whitespace ++ * characters and the minus sign (-)" ++ * - RFC 4253:4.2 ++ * and, ++ * ++ * "As stated earlier, the 'protoversion' specified for this protocol is ++ * "2.0". Earlier versions of this protocol have not been formally ++ * documented, but it is widely known that they use 'protoversion' of ++ * "1.x" (e.g., "1.5" or "1.3")." ++ * - RFC 4253:5 ++ */ ++ ssh_server = ssh_proto + strspn (ssh_proto, "0123456789.") + 1; /* (+1 for the '-' separating protoversion from softwareversion) */ ++ ++ /* If there's a space in the version string, whatever's after the space is a comment ++ * (which is NOT part of the server name/version)*/ ++ tmp = strchr(ssh_server, ' '); ++ if (tmp) { ++ ssh_server[tmp - ssh_server] = '\0'; ++ } ++ if (strlen(ssh_proto) == 0 || strlen(ssh_server) == 0) { ++ printf(_("SSH CRITICAL - Invalid protocol version control string %s\n"), version_control_string); + exit (STATE_CRITICAL); + } +- else { +- strip (output); +- if (verbose) +- printf ("%s\n", output); +- ssh_proto = output + 4; +- ssh_server = ssh_proto + strspn (ssh_proto, "-0123456789. "); +- ssh_proto[strspn (ssh_proto, "0123456789. ")] = 0; +- +- xasprintf (&buffer, "SSH-%s-check_ssh_%s\r\n", ssh_proto, rev_no); +- send (sd, buffer, strlen (buffer), MSG_DONTWAIT); +- if (verbose) +- printf ("%s\n", buffer); +- +- if (remote_version && strcmp(remote_version, ssh_server)) { +- printf +- (_("SSH CRITICAL - %s (protocol %s) version mismatch, expected '%s'\n"), +- ssh_server, ssh_proto, remote_version); +- close(sd); +- exit (STATE_CRITICAL); +- } +- +- if (remote_protocol && strcmp(remote_protocol, ssh_proto)) { +- printf +- (_("SSH CRITICAL - %s (protocol %s) protocol version mismatch, expected '%s'\n"), +- ssh_server, ssh_proto, remote_protocol); +- close(sd); +- exit (STATE_CRITICAL); +- } ++ ssh_proto[strspn (ssh_proto, "0123456789. ")] = 0; + +- elapsed_time = (double)deltime(tv) / 1.0e6; ++ xasprintf (&buffer, "SSH-%s-check_ssh_%s\r\n", ssh_proto, rev_no); ++ send (sd, buffer, strlen (buffer), MSG_DONTWAIT); ++ if (verbose) ++ printf ("%s\n", buffer); + ++ if (remote_version && strcmp(remote_version, ssh_server)) { + printf +- (_("SSH OK - %s (protocol %s) | %s\n"), +- ssh_server, ssh_proto, fperfdata("time", elapsed_time, "s", +- FALSE, 0, FALSE, 0, TRUE, 0, TRUE, (int)socket_timeout)); ++ (_("SSH CRITICAL - %s (protocol %s) version mismatch, expected '%s'\n"), ++ ssh_server, ssh_proto, remote_version); + close(sd); +- exit (STATE_OK); ++ exit (STATE_CRITICAL); + } ++ ++ if (remote_protocol && strcmp(remote_protocol, ssh_proto)) { ++ printf ++ (_("SSH CRITICAL - %s (protocol %s) protocol version mismatch, expected '%s'\n"), ++ ssh_server, ssh_proto, remote_protocol); ++ close(sd); ++ exit (STATE_CRITICAL); ++ } ++ elapsed_time = (double)deltime(tv) / 1.0e6; ++ ++ printf ++ (_("SSH OK - %s (protocol %s) | %s\n"), ++ ssh_server, ssh_proto, fperfdata("time", elapsed_time, "s", ++ FALSE, 0, FALSE, 0, TRUE, 0, TRUE, (int)socket_timeout)); ++ close(sd); ++ exit (STATE_OK); + } + + diff --git a/monitoring-plugins-2.3.3-check_ssh.t_-_improve_testing.patch b/monitoring-plugins-2.3.3-check_ssh.t_-_improve_testing.patch new file mode 100644 index 0000000..fa04004 --- /dev/null +++ b/monitoring-plugins-2.3.3-check_ssh.t_-_improve_testing.patch @@ -0,0 +1,139 @@ +Index: monitoring-plugins-2.3.3/plugins/t/check_ssh.t +=================================================================== +--- monitoring-plugins-2.3.3.orig/plugins/t/check_ssh.t ++++ monitoring-plugins-2.3.3/plugins/t/check_ssh.t +@@ -8,34 +8,105 @@ use strict; + use Test::More; + use NPTest; + +-# Required parameters +-my $ssh_host = getTestParameter("NP_SSH_HOST", "A host providing SSH service", "localhost"); +-my $host_nonresponsive = getTestParameter("NP_HOST_NONRESPONSIVE", "The hostname of system not responsive to network requests", "10.0.0.1" ); +-my $hostname_invalid = getTestParameter("NP_HOSTNAME_INVALID", "An invalid (not known to DNS) hostname", "nosuchhost" ); +- +- +-plan skip_all => "SSH_HOST must be defined" unless $ssh_host; +-plan tests => 6; +- +- +-my $result = NPTest->testCmd( +- "./check_ssh -H $ssh_host" +- ); +-cmp_ok($result->return_code, '==', 0, "Exit with return code 0 (OK)"); +-like($result->output, '/^SSH OK - /', "Status text if command returned none (OK)"); ++my $res; + +- +-$result = NPTest->testCmd( +- "./check_ssh -H $host_nonresponsive -t 2" +- ); +-cmp_ok($result->return_code, '==', 2, "Exit with return code 0 (OK)"); +-like($result->output, '/^CRITICAL - Socket timeout after 2 seconds/', "Status text if command returned none (OK)"); +- +- +- +-$result = NPTest->testCmd( +- "./check_ssh -H $hostname_invalid -t 2" +- ); +-cmp_ok($result->return_code, '==', 3, "Exit with return code 0 (OK)"); +-like($result->output, '/^check_ssh: Invalid hostname/', "Status text if command returned none (OK)"); ++# Required parameters ++my $ssh_host = getTestParameter("NP_SSH_HOST", ++ "A host providing SSH service", ++ "localhost"); ++my $host_nonresponsive = getTestParameter("NP_HOST_NONRESPONSIVE", ++ "The hostname of system not responsive to network requests", ++ "10.0.0.1" ); ++my $hostname_invalid = getTestParameter("NP_HOSTNAME_INVALID", ++ "An invalid (not known to DNS) hostname", ++ "nosuchhost" ); ++ ++plan tests => 14 + 6; ++ ++SKIP: { ++ skip "SSH_HOST must be defined", 6 unless $ssh_host; ++ my $result = NPTest->testCmd( ++ "./check_ssh -H $ssh_host" ++ ); ++ cmp_ok($result->return_code, '==', 0, "Exit with return code 0 (OK)"); ++ like($result->output, '/^SSH OK - /', "Status text if command returned none (OK)"); ++ ++ $result = NPTest->testCmd( ++ "./check_ssh -H $host_nonresponsive -t 2" ++ ); ++ cmp_ok($result->return_code, '==', 2, "Exit with return code 0 (OK)"); ++ like($result->output, '/^CRITICAL - Socket timeout after 2 seconds/', "Status text if command returned none (OK)"); ++ ++ $result = NPTest->testCmd( ++ "./check_ssh -H $hostname_invalid -t 2" ++ ); ++ cmp_ok($result->return_code, '==', 3, "Exit with return code 0 (OK)"); ++ like($result->output, '/^check_ssh: Invalid hostname/', "Status text if command returned none (OK)"); ++} ++ ++SKIP: { ++ skip "No netcat available", 12 unless (system("which nc > /dev/null") == 0); ++ ++ my $nc_flags = "-l 5003 -i 1"; ++ #A valid protocol version control string has the form ++ # SSH-protoversion-softwareversion SP comments CR LF ++ # ++ # where `comments` is optional, protoversion is the SSH protocol version and ++ # softwareversion is an arbitrary string representing the server software version ++ open(NC, "echo 'SSH-2.0-nagiosplug.ssh.0.1' | nc ${nc_flags}|"); ++ sleep 1; ++ $res = NPTest->testCmd( "./check_ssh -H localhost -p 5003" ); ++ cmp_ok( $res->return_code, '==', 0, "Got SSH protocol version control string"); ++ like( $res->output, '/^SSH OK - nagiosplug.ssh.0.1 \(protocol 2.0\)/', "Output OK"); ++ close NC; ++ ++ open(NC, "echo 'SSH-2.0-3.2.9.1' | nc ${nc_flags}|"); ++ sleep 1; ++ $res = NPTest->testCmd( "./check_ssh -H localhost -p 5003" ); ++ cmp_ok( $res->return_code, "==", 0, "Got SSH protocol version control string with non-alpha softwareversion string"); ++ like( $res->output, '/^SSH OK - 3.2.9.1 \(protocol 2.0\)/', "Output OK for non-alpha softwareversion string"); ++ close NC; ++ ++ open(NC, "echo 'SSH-2.0-nagiosplug.ssh.0.1 this is a comment' | nc ${nc_flags} |"); ++ sleep 1; ++ $res = NPTest->testCmd( "./check_ssh -H localhost -p 5003 -r nagiosplug.ssh.0.1" ); ++ cmp_ok( $res->return_code, '==', 0, "Got SSH protocol version control string, and parsed comment appropriately"); ++ like( $res->output, '/^SSH OK - nagiosplug.ssh.0.1 \(protocol 2.0\)/', "Output OK"); ++ close NC; ++ ++ open(NC, "echo 'SSH-' | nc ${nc_flags}|"); ++ sleep 1; ++ $res = NPTest->testCmd( "./check_ssh -H localhost -p 5003" ); ++ cmp_ok( $res->return_code, '==', 2, "Got invalid SSH protocol version control string"); ++ like( $res->output, '/^SSH CRITICAL/', "Output OK"); ++ close NC; ++ ++ open(NC, "echo '' | nc ${nc_flags}|"); ++ sleep 1; ++ $res = NPTest->testCmd( "./check_ssh -H localhost -p 5003" ); ++ cmp_ok( $res->return_code, '==', 2, "No version control string received"); ++ like( $res->output, '/^SSH CRITICAL - No version control string received/', "Output OK"); ++ close NC; ++ ++ open(NC, "echo 'Not a version control string' | nc ${nc_flags}|"); ++ sleep 1; ++ $res = NPTest->testCmd( "./check_ssh -H localhost -p 5003" ); ++ cmp_ok( $res->return_code, '==', 2, "No version control string received"); ++ like( $res->output, '/^SSH CRITICAL - No version control string received/', "Output OK"); ++ close NC; ++ ++ #RFC 4253 permits servers to send any number of data lines prior to sending the protocol version control string ++ open(NC, "{ echo 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'; sleep 1; ++ echo 'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB'; sleep 1; ++ echo 'CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC'; sleep 1; ++ echo 'DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD'; sleep 1; ++ printf 'EEEEEEEEEEEEEEEEEE'; sleep 1; ++ printf 'EEEEEEEEEEEEEEEEEE\n'; sleep 1; ++ echo 'Some\nPrepended\nData\nLines\n'; sleep 1; ++ echo 'SSH-2.0-nagiosplug.ssh.0.2';} | nc ${nc_flags}|"); ++ sleep 1; ++ $res = NPTest->testCmd( "./check_ssh -H localhost -p 5003" ); ++ cmp_ok( $res->return_code, '==', 0, "Got delayed SSH protocol version control string"); ++ like( $res->output, '/^SSH OK - nagiosplug.ssh.0.2 \(protocol 2.0\)/', "Output OK"); ++ close NC; + diff --git a/monitoring-plugins-2.3.3-root-plugins-Makefile_-_no_chown.patch b/monitoring-plugins-2.3.3-root-plugins-Makefile_-_no_chown.patch new file mode 100644 index 0000000..e77ad9b --- /dev/null +++ b/monitoring-plugins-2.3.3-root-plugins-Makefile_-_no_chown.patch @@ -0,0 +1,21 @@ +Index: monitoring-plugins-2.3.3/plugins-root/Makefile.am +=================================================================== +--- monitoring-plugins-2.3.3.orig/plugins-root/Makefile.am ++++ monitoring-plugins-2.3.3/plugins-root/Makefile.am +@@ -49,7 +49,6 @@ INSTALL_SUID = \ + p=$$f; \ + echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(libexecdir)/$$p"; \ + $(INSTALL_PROGRAM) $$p $(DESTDIR)$(libexecdir)/$$p; \ +- echo " chown root $(DESTDIR)$(libexecdir)/$$p"; \ + chown root $(DESTDIR)$(libexecdir)/$$p; \ + echo " chmod $(setuid_root_mode) $(DESTDIR)$(libexecdir)/$$p"; \ + chmod $(setuid_root_mode) $(DESTDIR)$(libexecdir)/$$p; \ +@@ -64,7 +63,7 @@ install-exec-local: $(noinst_PROGRAMS) + echo > $$TMPFILE; \ + ## See if we can create a setuid root executable in $(libexecdir). + ## If not, then don't even try to install setuid plugins. +- can_create_suid_root_executable=no; \ ++ can_create_suid_root_executable=yes; \ + chown root $$TMPFILE > /dev/null 2>&1 \ + && chmod $(setuid_root_mode) $$TMPFILE > /dev/null 2>&1 \ + && can_create_suid_root_executable=yes; \ diff --git a/monitoring-plugins-2.3.3-wrong_percent_in_check_swap.patch b/monitoring-plugins-2.3.3-wrong_percent_in_check_swap.patch new file mode 100644 index 0000000..15d5402 --- /dev/null +++ b/monitoring-plugins-2.3.3-wrong_percent_in_check_swap.patch @@ -0,0 +1,44 @@ +From f3e6c9663369d011b241c6fb2c8fd5312f98cacf Mon Sep 17 00:00:00 2001 +From: Jan ONDREJ +Date: Thu, 7 Oct 2010 17:28:48 +0400 +Subject: [PATCH 6/6] Prevent check_swap from returning OK, if no swap activated + +My swap was not activated on boot for unknown reason and nagios does not +report this as a problem. Here is an example: + +[root@kecom ~]# rpm -q nagios-plugins +nagios-plugins-1.4.13-11.fc10.i386 +[root@kecom ~]# /usr/lib/nagios/plugins/check_swap -w 80% -c 40% -c 1 -w 2 +SWAP CRITICAL - 100% free (0 MB out of 0 MB) |swap=0MB;0;0;0;0 + +If there is no swap and users is trying to test percentage of free swap, +consider 0 MB free swap space as problem, or of free/total raises division +by zero, then set percentage to 0%, not to 100%. + +Steps to Reproduce: +1. make sure, your swap is empty or it's usage is not large +2. swapoff -a +3. /usr/lib/nagios/plugins/check_swap -w 80% -c 40% + +Actual results: +SWAP OK - 100% free (0 MB out of 0 MB) |swap=0MB;0;0;0;0 + +Expected results: +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.3.3/plugins/check_swap.c +=================================================================== +--- monitoring-plugins-2.3.3.orig/plugins/check_swap.c ++++ monitoring-plugins-2.3.3/plugins/check_swap.c +@@ -137,7 +137,7 @@ main (int argc, char **argv) + free_swap_mb += dskfree_mb; + if (allswaps) { + if (dsktotal_mb == 0) +- percent=100.0; ++ percent= 0.0; + else + percent = 100 * (((double) dskused_mb) / ((double) dsktotal_mb)); + result = max_state (result, check_swap (dskfree_mb, dsktotal_mb)); diff --git a/monitoring-plugins-2.3.5.tar.gz b/monitoring-plugins-2.3.5.tar.gz new file mode 100644 index 0000000..56a89a7 --- /dev/null +++ b/monitoring-plugins-2.3.5.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f3edd79a9254f231a1b46b32d14def806648f5267e133ef0c0d39329587ee38b +size 2876130 diff --git a/monitoring-plugins-2.3.5.tar.gz.sha1 b/monitoring-plugins-2.3.5.tar.gz.sha1 new file mode 100644 index 0000000..7469cbb --- /dev/null +++ b/monitoring-plugins-2.3.5.tar.gz.sha1 @@ -0,0 +1 @@ +fcbe2068cb55aeaca3ebe67b619cb345a6705184 *monitoring-plugins-2.3.5.tar.gz diff --git a/monitoring-plugins-README-extra-opts b/monitoring-plugins-README-extra-opts new file mode 100644 index 0000000..7d570ab --- /dev/null +++ b/monitoring-plugins-README-extra-opts @@ -0,0 +1,95 @@ +Topics: +* Extra-Opts +* Further use of the /etc/monitoring-plugins directory + + + + +Extra-Opts +========== + +Starting with the 1.4.12 release, most Monitoring Plugins (those written in C) +support reading options from a configuration file. Since version 2.0, this is +enabled by default. + +You can easily know if a plugin supports Extra-Opts by checking the --help +output for the --extra-opts option. Once compiled in, the --extra-opts plugin +option allows reading extra options from a config file. The syntax for the +command is: + +--extra-opts=[section][@file] + +Some examples: + + Read special_opts section of default config file: + + $ ./check_stuff --extra-opts=special_opts + + Read special_opts section of /etc/myconfig.ini: + + $ ./check_stuff --extra-opts=special_opts@/etc/myconfig.ini + + Read check_stuff section of /etc/myconfig.ini: + + $ ./check_stuff --extra-opts=@/etc/myconfig.ini + + Read check_stuff section of default config file and use additional + arguments along with the other specified arguments (Extra-Opts arguments are + always processed first no matter where --extra-opts appears on the command + line): + + $ ./check_stuff --extra-opts -jk --some-other-opt + +The default nagios plugins file is used if no explicit filename is given. The +current standard locations checked are: + + /usr/local/etc/monitoring-plugins/monitoring-plugins.ini + /usr/local/etc/monitoring-plugins.ini + /etc/monitoring-plugins/monitoring-plugins.ini + /etc/monitoring-plugins.ini + +To use a custom location, set the MP_CONFIG_FILE environment variable to the +desired path name. + +To specify an option without parameter, you can use a key without value, but +the equal sign must remain, for example: + + allow-regex= + +Also note that repeated keys are allowed within sections just like you can +repeat arguments on the command line. + +The basic theory is that options specified in the configuration files are +substituted at the beginning of the command line. + +The initial use case for this functionality is for hiding passwords, so you do +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 +==================================================== + +Some Monitoring Plugins (like check_zypper) support additional configuration +files to be included/sourced in on execution. As long as the location of those +additional configuration files is not fixed, we recommend to use this directory +for it. + +@Packagers: please consider encapsulating Plugins with Apparmor or SELinux +profiles. For security and conveniance reasons, please allow your plugins to +read in the /etc/monitoring-plugins directory - or even better: allow your +plugins to read their configuration file below /etc/monitoring-plugins. + + diff --git a/monitoring-plugins-README.SUSE b/monitoring-plugins-README.SUSE new file mode 100644 index 0000000..88781a2 --- /dev/null +++ b/monitoring-plugins-README.SUSE @@ -0,0 +1,27 @@ +README.SUSE for monitoring-plugins + +== Features and documentation == + +Please refer to the upstream documentation on +* http://www.nagios.org/docs/ +* http://docs.icinga.org/ +* https://shinken.readthedocs.org/ +* ... +* https://www.monitoring-plugins.org/ + +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 user nagios or icinga). Please have a look into the corresponding +documentation for those packages for more details. +( /usr/share/doc/packages/monitoring-plugins-icmp/README.SUSE-check_icmp for example ) + diff --git a/monitoring-plugins-README.SUSE-check_cups b/monitoring-plugins-README.SUSE-check_cups new file mode 100644 index 0000000..f425965 --- /dev/null +++ b/monitoring-plugins-README.SUSE-check_cups @@ -0,0 +1,110 @@ +README.SUSE for monitoring-plugins-dhcp + +== check_cups == + +Plugin for checking cups service + +This plug-in will check the status of a remote CUPS print service for the printer status, +It is able to check all available printers configured on the cups daemon, or just one of them. +It can also check only the queue status. It will provide the size of the queue and +optionally the age of the queue. + +Generally we sugesst to create separate checks for each printer and one additional check for +the queue itself. + +Usage: check_cups -H -P -p | -Q -w -c -a + +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 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 added an Apparmor 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 (nagios-plugs@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 + + +Bugs: +------ +Please report bugs to me mcaj@suse.cz + +Thanks and have lot printers online ;-) +Martin diff --git a/monitoring-plugins-README.SUSE-check_dhcp b/monitoring-plugins-README.SUSE-check_dhcp new file mode 100644 index 0000000..6c96dc7 --- /dev/null +++ b/monitoring-plugins-README.SUSE-check_dhcp @@ -0,0 +1,60 @@ +README.SUSE for monitoring-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 +to receive broadcasts for this interface. Otherwise the script will be unable +to detect anything. + +Example: +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/monitoring-plugins-common/example/permissions.d/monitoring-plugins \ + /etc/permissions.d/monitoring-plugins + +...afterwards adapt the file /etc/permissions.d/monitoring-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 just 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 + } + +== Apparmor profile == + +Please check /etc/apparmor.d/usr.lib.nagios.plugins.check_dhcp if you are using +the --extra-opts option. The Apparmor profile allows to open every file below +the /etc/monitoring-plugins/ directory read only for this. All files in other +directories are not allowed. + diff --git a/monitoring-plugins-README.SUSE-check_icmp b/monitoring-plugins-README.SUSE-check_icmp new file mode 100644 index 0000000..809e489 --- /dev/null +++ b/monitoring-plugins-README.SUSE-check_icmp @@ -0,0 +1,48 @@ +README.SUSE for monitoring-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/monitoring-plugins/example/permissions.d/monitoring-plugins \ + /etc/permissions.d/monitoring-plugins + +...afterwards adapt the file /etc/permissions.d/monitoring-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 just 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 + } + + +== Apparmor profile == + +Please check /etc/apparmor.d/usr.lib.nagios.plugins.check_icmp if you are +using the --extra-opts option. The Apparmor profile allows to open every file +below the /etc/monitoring-plugins/ directory read only for this. All files in +other directories are not allowed. + diff --git a/monitoring-plugins-README.SUSE-check_ide_smart b/monitoring-plugins-README.SUSE-check_ide_smart new file mode 100644 index 0000000..bd06ff4 --- /dev/null +++ b/monitoring-plugins-README.SUSE-check_ide_smart @@ -0,0 +1,48 @@ +README.SUSE for monitoring-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/monitoring-plugins/example/permissions.d/monitoring-plugins \ + /etc/permissions.d/monitoring-plugins + +...afterwards adapt the file /etc/permissions.d/monitoring-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 just 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 + } + +== Apparmor profile == + +Please check /etc/apparmor.d/usr.lib.nagios.plugins.check_ide_smart if you are +using the --extra-opts option. The Apparmor profile allows to open every file +below the /etc/monitoring-plugins/ directory read only for this. All files in +other directories are not allowed. + + diff --git a/monitoring-plugins-README.SUSE-check_ntp_time b/monitoring-plugins-README.SUSE-check_ntp_time new file mode 100644 index 0000000..a1d1ef1 --- /dev/null +++ b/monitoring-plugins-README.SUSE-check_ntp_time @@ -0,0 +1,10 @@ +README.SUSE for monitoring-plugins-ntp_time + +== Apparmor profile == + +Please check /etc/apparmor.d/usr.lib.nagios.plugins.check_ntp_time if you are +using the --extra-opts option. The Apparmor profile allows to open every file +below the /etc/monitoring-plugins/ directory read only for this. All files in +other directories are not allowed. + + diff --git a/monitoring-plugins-README.SUSE-check_ping b/monitoring-plugins-README.SUSE-check_ping new file mode 100644 index 0000000..a39d47a --- /dev/null +++ b/monitoring-plugins-README.SUSE-check_ping @@ -0,0 +1,10 @@ +README.SUSE for monitoring-plugins-ping + +== Apparmor profile == + +Please check /etc/apparmor.d/usr.lib.nagios.plugins.check_ping if you are +using the --extra-opts option. The Apparmor profile allows to open every file +below the /etc/monitoring-plugins/ directory read only for this. All files in +other directories are not allowed. + + diff --git a/monitoring-plugins-permissions b/monitoring-plugins-permissions new file mode 100644 index 0000000..18c017c --- /dev/null +++ b/monitoring-plugins-permissions @@ -0,0 +1,18 @@ +# Please uncomment the needed plugins and place the file in the +# /etc/permissions.d/ directory: +# cp monitoring-plugins /etc/permissions.d/ +# +# 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 +# to allow SuSEconfig to correct the file permissions: +# CHECK_PERMISSIONS="set" +# +# /usr/lib/nagios/plugins/check_dhcp root.root 4755 +# /usr/lib/nagios/plugins/check_icmp root.root 4755 +# /usr/lib/nagios/plugins/check_ide_smart root.root 4755 diff --git a/monitoring-plugins-rpmlintrc b/monitoring-plugins-rpmlintrc new file mode 100644 index 0000000..b680619 --- /dev/null +++ b/monitoring-plugins-rpmlintrc @@ -0,0 +1,5 @@ +# 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"); diff --git a/monitoring-plugins.changes b/monitoring-plugins.changes new file mode 100644 index 0000000..f21ea34 --- /dev/null +++ b/monitoring-plugins.changes @@ -0,0 +1,1840 @@ +------------------------------------------------------------------- +Mon Jan 15 10:44:48 UTC 2024 - Pedro Monreal + +- check_ircd: Remove the perl-IO-Socket-INET6 dependency. + * Remove the dependency on perl(IO::Socket::INET6) as it has been + deprecated by upstream, is no longer suitable for use and its not + being maintained. A compatible replacement for this package is + perl(IO::Socket::IP) which is shipped by the perl-base package. + +------------------------------------------------------------------- +Tue Dec 5 11:46:24 UTC 2023 - Lars Vogdt - 2.3.5 + +- update to 2.3.5 + FIXES + * Include maxfd.h in lib Makefile + + included in 2.3.4 + ENHANCEMENTS + * check_curl: added --cookie-jar and doing proper cleanup of libcurl + * check_curl: Include all IPs from getaddrinfo() in curl DNS cache + * check_dhcp: Add dhcp rogue detection + * check_disk: add ignore-missing option to return OK for missing fs + * check_disk_smb: allow checking 0-sized resource (ex. IPC$) + * check_disk: The options to include or exclude specific file + systems now allow the usage of regex(7) + * check_icmp: Add support to Jitter, MOS and Score + * check_mysql: Detect running mysqldump and handle it + more gracefully + * check_procs: Implement --exclude-process to exclude + specific processes + * check_smtp: add new longoption --tls + * check_smtp: Add option to prefix PROXY header + * check_smtp: Add support for SMTP over TLS + * check_smtp: Add support for SNI + * check_snmp: Implement option to ignore mib file parsing errors + * check_users: prefer systemd-logind over utmp + FIXES + * check_disk: Display SI units correctly + * check_ircd: use pack_sockaddr_in rather than hand-rolled + * check_log/check_oracle/check_sensors: fixed the outputs of the + help functionality + * check_mysql: Add mysql_close to avoid spamming the server logs + * check_smtp: add missing -r option in usage + * check_snmp: disable multiplier when unused + * check_wave: Use compile time determined path to snmpget + GENERAL + * Sync with the Gnulib code 668c0b8ffa + * Set autoconf prerequisite version to 2.64 + * Remove sha1 and use sha256 in some parts of the plugin structure + * A lot of compiler warnings were fixed + * Some code was refactored a little bit +- removed the following patches: + + monitoring-plugins-2.3.3-check_log_-_quoting.patch (upstream) + + monitoring-plugins-2.3.3-check_snmp.arrayaddress.patch (upstream) + + monitoring-plugins-2.3.3-mariadb_102_build_fix.patch + + monitoring-plugins-2.3.3-check_dhcp_-_detect_rogue_dhcp_servers.patch + + monitoring-plugins-2.3.3-check_http-proxy.patch + + monitoring-plugins-2.3.3-check_icmp.patch + + systemd-not-utmp.patch +- new check: check_mssql + This plugin runs a query against a MS-SQL server or Sybase server + and returns the first row. + Recommended in monitoring-plugins-all and monitoring-plugins-extra + +------------------------------------------------------------------- +Thu Nov 16 14:04:40 CET 2023 - ro@suse.de + +- also require coreutils-systemd in monitoring-plugins-load + as the check uses the uptime binary at runtime + revisiting [bsc#1216148] + +------------------------------------------------------------------- +Mon Oct 30 18:19:23 CET 2023 - ro@suse.de + +- renamed patches + monitoring-plugins-wrong_return_in_check_swap.patch + to monitoring-plugins-2.3.3-wrong_percent_in_check_swap.patch + monitoring-plugins.check_snmp.arrayaddress.patch + to monitoring-plugins-2.3.3-check_snmp.arrayaddress.patch + monitoring-plugins-2.3-check_ntp_perf_absolute.patch + to monitoring-plugins-2.3.3-check_ntp_perf_absolute.patch + +------------------------------------------------------------------- +Mon Oct 16 13:23:42 UTC 2023 - Thorsten Kukuk + +- Add buildrequires for coreutils-systemd, as the configure script + checks for uptime [bsc#1216148] + +------------------------------------------------------------------- +Thu Jun 15 14:44:14 UTC 2023 - Thorsten Kukuk + +- systemd-not-utmp.patch: let check_users prefer systemd-logind + over utmp (jsc#PED-3144) + +------------------------------------------------------------------- +Wed May 31 21:57:07 UTC 2023 - David Disseldorp + +- Add attach_disconnected flag for usr.lib.nagios.plugins.check_procs + and usr.lib.nagios.plugins.check_procs.sle15 apparmor profiles to + permit /proc/PID/exe access; (bsc#1209194) + +------------------------------------------------------------------- +Thu Apr 13 15:27:12 UTC 2023 - Lars Vogdt - 2.3.3 + +- added monitoring-plugins-2.3.3-check_icmp.patch + Simple patch to avoid compiler errors with latest gcc +- removed monitoring-plugins-2.3.1-fixing-shellcheck.patch - upstream +- renamed monitoring-plugins-2.2-mariadb_102_build_fix.patch + to monitoring-plugins-2.3.3-mariadb_102_build_fix.patch + +------------------------------------------------------------------- +Wed Apr 12 20:54:19 UTC 2023 - Archie Cobbs + +- added monitoring-plugins-2.3.3-check_http-proxy.patch + Fixes a check_http bug when trying to follow a redirect + returned from a URL retrieved via SSL proxy (issue #1764) + +------------------------------------------------------------------- +Wed Apr 12 17:35:53 UTC 2023 - Lars Vogdt - 2.3.3 + +- finally remove monitoring-plugins-1.4.6-Makefile_-_no_chown.patch: + obsoleted by monitoring-plugins-2.3.3-root-plugins-Makefile_-_no_chown.patch +- monitoring-plugins-2.1.1-check_log_-_quoting.patch renamed to + monitoring-plugins-2.3.3-check_log_-_quoting.patch + +------------------------------------------------------------------- +Thu Feb 2 17:11:00 UTC 2023 - Lars Vogdt - 2.3.3 + +- Update to 2.3.3 + Enhancements + General + + using PRId64 and PRIu64 instead of %ld directly + Single Plugins + + check_http: Make faster with larger files + + check_snmp: add 'multiplier' to modify current value + + check_http: Implement chunked encoding decoding + + check_http/check_curl: add chunked encoding test + + check_log: Added --exclude to exclude patterns + + check_log: Add tests + + check_disk: Clarify usage possibilites + + Fixes + General + + fixed two PRId64 to PRIu64 in perfdata_uint64 + Single Plugins + + check_pgsql: Removing is_pg_dbname alltogether,using postgres API. + + check_http: Remove superflous CRLF in HTTP-Requests + + check_curl: detect ipv6 + + check_icmp: fix parsing help/version long options + + check_http: fix test plan + + check_disk: Find accessible mount path if multiple are available + + check_apt: Fix unknown escape sequence error output + + check_curl: fix checking large bodys + + check_snmp: Improve tests for check_snmp & multiply option + + check_snmp: always apply format when applying multiplier + + check_http: Use real booleans instead of ints + + check_http: Document process_arguments a little bit better + + check_http: Remove dead code + + check_http: Fix several bug in the implementation of unchunking + + check_http: Reformat a part to increase readability + + check_apt: Put upgrade options in the root sections + + check_apt: Fix comment + + check_apt: Use real booleans + + check_mailq: Fixing nullmailer regex + + check_snmp: Fix regex matches + + check_log: Fixed a bug when using --all + + check_log: Cleaned up duplicated code in the args + + check_http: Fix memory reallocation error in chunk decoding logic + + check_http: Add space for ending NULL byte in array for chunked encoding + +- included changes in 2.3.2 + General + + Use silent automake by default + + Fixes + Single Plugins + + check_by_ssh: added option to exit with an warning, if there is output on STDERR + + check_by_ssh: Add "-U" flag (#1123). + + check_by_ssh: Let ssh decide if a host is valid, enables usage of ssh .config file + + check_curl: Add an option to check_curl to verify the peer certificate & host using the system CA's + + check_curl: fixed -ffollow for HTTP/2.0 (Fixes #1685): added major_version parsing to PicoHTTPParser + + check_curl: fixes check_curl: "CRITICAL - Cannot retrieve certificate subject." + + check_curl: fix if http header contains leading spaces + + check_curl: Update check_curl.c to display a specific human-readable error message where possible + + check_curl: verify certificates option should not force SSL to be used + + check_disk: Description for -M was the wrong way around + + check_disk: Fixing the stuff that is broken on btrfs + + check_disk: Fix perfdata for big values for check disk + + check_disk_smb: Add configfile feature + + check_disk_smb: Add timeout + + check_dns: Add --expect-nxdomain + + check_dns: split multiple IP addresses passed in one -a argument + + check_file_age: Make size parameter a little bit more intelligible + + check_fping: Implements 'host-alive' mode (Closes. #1027) + + check_game: Update Url to qstat + + check_http: changed 'STATE_CRITICAL' to 'STATE_WARNING' for infinite loop + + check_http: Increase regexp limit by @hydrapolic + + check_http: Support http redirect by @waja + + check_icmp: buffer offerflow + + check_icmp: delay set_source_ip() until address_family is detected + + check_icmp: Fix "Invalid Argument" from sendmsg() under FreeBSD 13.1 and "setsockopt failed" for TTL setting + + check_icmp: Fix pkt perfdata in check_host mode + + check_ldap: Allows check_ldap to read password from environment variable + + check_load: add LOAD prefix to load plugin + + check_load: Display total and scaled load values if check_load scales the values by number of CPUs + + check_log: Missing oldlog now aborts check_log + + check_mailq: Add mailq -C option for config dir or config file + + check_mailq: Check mailq domain specific warnings + + check_mailq: Fix regexp for nullmailer "mailq" output + + check_mysql: fix segfaults with mysql-connector-c #1562 + + check_pgsql: add --queryname parameter to check_pgsql + + check_ping: Do not show RTA if no connection was possible + + check_ping: understang ping6 output from iputils package + + check_proc: Fix check proc ps detection + + check_procs: exchange needle and haystack in strstr() for proper state match + + check_smtp: add -L flag to support LMTP (LHLO instead of HELO/EHLO). + + check_snmp: Added option for null zero length string exit codes + + check_snmp: fix performance thresholds when using multiple oids + + check_snmp fix segfaults + + check_snmp: put the "c" (to mark a counter) after the perfdata value + + check_swap: fix parsing swap values + + check_swap: Fix perfdata for check swap + + check_swap: Fix unit for total in perfdata + + check_swap: Handle cached swap + + check_swap: Small fix to threshold validation and style (indentation) fixes + + check_ups: Fix possible overflow in check_ups + + check_uptime: Add option to report uptime in days instead of seconds + + check_uptime: Fix/improve output message "Uptime is ..." + + Multiple Plugins + + check_http, check_curl: added --max-redirs=N option (feature #1684) + + check_http, check_curl: Enhancement --continue-after-certificate (backport from nagios-plugins) + + check_http, check_curl: Remove check_http and check_curl test which are somehow always failing + + check_log, check_oracle, check_sensors: Several fixes shellcheck complaining about + + sslutils: use chain from client certificates + + Non functional changes + + Trivial source code whitespace formatting fixes to standard. + + docs: fix simple typo, conspicuosly -> conspicuously + + Migrate to GitHub actions + + Point to Icinga Exchange instead of dead Monitoring Exchange + + github actions: fix check_users test case + + Add CodeQL checks + + Fix some QL problems + + Update CodeQL and update runner before installing + + check_disk: Check disk compiler warnings + + check_disk: Trivial printf fix and a little bit of code style + + check_http: Docs: make -C obvious + + check_ifoperstatus: Re-attach a comment to where it actually belongs + + check_ircd: Restrict the nickname length of the test user for check_ircd + + check_load: Check load compiler warnings + + check_log Modernize check log + + check_mailq: remove duplicate W=i/C=i args in check_mailq.pl + + check_ntp: Check ntp remove unused variables + + check_pgsql: Using snprintf which honors the buffers size and guarantees null temination. (Closes: #1601) + + check_procs: Fix double percentage sign in usage + + check_sensors.sh: Make shellcheck happier + + check_snmp: Fixed option description authpassword -> authpasswd + whitespaces + + check_swap: Check swap compiler warnings + +- refreshed monitoring-plugins-1.4.6-Makefile_-_no_chown.patch + -> monitoring-plugins-2.3.3-root-plugins-Makefile_-_no_chown.patch +- refreshed monitoring-plugins-2.3.1-check_ssh.patch + -> monitoring-plugins-2.3.3-check_ssh.patch +- refreshed monitoring-plugins-2.3.1-check_dhcp_-_detect_rogue_dhcp_servers.patch + -> monitoring-plugins-2.3.3-check_dhcp_-_detect_rogue_dhcp_servers.patch +- refreshed monitoring-plugins-2.3.1-check_ssh.t_-_improve_testing.patch + -> monitoring-plugins-2.3.3-check_ssh.t_-_improve_testing.patch +- refreshed monitoring-plugins-2.3.1-check_disk_on_btrfs.patch + -> monitoring-plugins-2.3.3-check_disk_on_btrfs.patch +- refreshed monitoring-plugins-2.3.1-check_by_ssh.patch + -> monitoring-plugins-2.3.3-check_by_ssh.patch +- removed monitoring-plugins-too_few_arguments_for_check_disk.patch + -> fixed upstream +- removed monitoring-plugins.check_hpjd.c-64bit-portability-issue.patch + -> fixed upstream +- removed monitoring-plugins-2.3.1-check_snmp_segfaults.patch + -> fixed upstream + +------------------------------------------------------------------- +Thu Oct 6 12:28:59 CEST 2022 - ro@suse.de + +- changed buildrequires libsmbclient-devel to pkgconfig(smbclient) + as samba packages have been reorganized in SLE and openSUSE + +------------------------------------------------------------------- +Sat Jul 2 15:56:26 UTC 2022 - Archie Cobbs + +- added monitoring-plugins-2.3.1-check_by_ssh.patch + Adds "-U" flag, which causes a 255 exit value from ssh(1), which + indicates a connection failure, to return UNKNOWN instead of CRITICAL. + (issue #1123) + +------------------------------------------------------------------- +Tue Mar 22 09:58:05 UTC 2022 - Stefan Seifert + +- added monitoring-plugins-2.3.1-check_disk_on_btrfs.patch + backport fix for check_disk reporting critical on btrfs (nagios-plugins + issue %569) + +------------------------------------------------------------------- +Fri Dec 3 08:37:09 UTC 2021 - Lars Vogdt + +- removed the following, either upstreamed or integrated in other patches: + + monitoring-plugins-wrong_return_in_check_swap.patch + + monitoring-plugins-check_swap-fix_comment.patch + + monitoring-plugins-check_swap-return_unknown.patch + + monitoring-plugins-check_swap-fix-n.patch + +------------------------------------------------------------------- +Thu Dec 2 14:54:25 UTC 2021 - Lars Vogdt + +- remove monitoring-plugins-2.3.1-check_snmp_hang_on_STDERR_workaround.patch + the patch just reverts the problem, if you get more than 64K on + stdout + +------------------------------------------------------------------- +Fri Nov 19 09:35:19 UTC 2021 - Lars Vogdt + +- recommend syslog for monitoring-plugins-log, as people probably + want to analize logs generated by (r)syslog or journald + +Renamed patches: +- renamed monitoring-plugins-1.4.6-no_chown.patch to + monitoring-plugins-1.4.6-Makefile_-_no_chown.patch to make it + easier to detect the patched file +- renamed monitoring-plugins-2.1.1-check_logfile.patch to + monitoring-plugins-2.1.1-check_log_-_quoting.patch to make it + easier to detect the patched file and reason for the patch + +New patches: +- added monitoring-plugins-2.3.1-check_snmp_segfaults.patch + check_snmp will segfaults at line 489 if number of lines returned + by SNMPD is greater than number of defined thresholds + -> https://github.com/monitoring-plugins/monitoring-plugins/pull/1589 +- added monitoring-plugins-2.3.1-check_snmp_hang_on_STDERR_workaround.patch + When the MIBs are not quite right, snmpget outputs lots of errors on + STDERR before getting down to business. + If this is enough to fill the pipe buffer, snmpget hangs waiting for + it to be cleared, which it never will be because check_snmp is + waiting for snmpget to output something on STDOUT. + This simple fix from s2156945 for this is to read STDERR before STDOUT. + cmd_run_array from utils_cmd.c is also used by plugins/check_by_ssh + and plugins/negate but you're likely to get lots of errors or lots + of output, not both at the same time. + The real fix is probably to do a select() and read from both as + they come in. + https://github.com/monitoring-plugins/monitoring-plugins/issues/1706 +- added monitoring-plugins-2.3.1-check_dhcp_-_detect_rogue_dhcp_servers.patch + feature enhancement from Patrick Cervicek for check_dhcp, which allows + to detect rogue DHCP servers. Use it with the "-x" flag, example: + ./check_dhcp -s 192.168.1.1 -x + CRITICAL: Rogue DHCP Server detected! Server 192.168.1.205 offered 192.168.1.239 +- added monitoring-plugins-2.3.1-check_ssh.patch , which includes patches + provided by op5, mainly around RFC 4253:4.2 and 4253:5 + + fixing a few typos + + properly parse a (delayed) version control string + + Handle non-alpha software versions reported by the checked service +- added monitoring-plugins-2.3.1-check_ssh.t_-_improve_testing.patch + which improves the testing of check_ssh - including the patches mentioned in + monitoring-plugins-2.3.1-check_ssh.patch +- added monitoring-plugins-2.3.1-fixing-shellcheck.patch , which fixes + some complains from shellcheck(.net): + + quoting and parenthesis in check_log.sh, check_oracle.sh, check_sensors.sh + +------------------------------------------------------------------- +Thu Sep 23 16:41:53 UTC 2021 - Franck Bui + +- Remove unneeded build requirement on "syslog" + +------------------------------------------------------------------- +Mon Jul 26 04:05:51 UTC 2021 - Steve Kowalik + +- Remove unneeded BuildRequires on python-devel (bsc#1191011) + +------------------------------------------------------------------- +Thu Jul 1 08:34:54 UTC 2021 - Bernhard Wiedemann + +- Call gettextize with --no-changelog to make package build + reproducible (boo#1047218) + +------------------------------------------------------------------- +Wed Apr 21 07:47:25 UTC 2021 - Lars Vogdt + +- Update to 2.3.1: + Enhancements + * check_curl: Add an option to verify the peer certificate & host using the system CA's + Fixes + * check_icmp: fix simple typo, conspicuosly -> conspicuously + * check_curl: fixed help, usage and errors for TLS 1.3 + * check_curl: fixed a potential buffer overflow in url buffer + * check_dns: split multiple IP addresses passed in one -a argument + * check_curl: added string_statuscode function for printing HTTP/1.1 and HTTP/2 correctly + * check_curl: fix crash if http header contains leading spaces + * check_curl: display a specific human-readable error message where possible + * check_pgsql: Using snprintf which honors the buffers size and guarantees null termination. + * check_snmp: put the "c" (to mark a counter) after the perfdata value + * check_http: Increase regexp limit + * check_http: make -C obvious + * check_curl: Increase regexp limit (to 1024 as in check_http) + * check_curl: make -C obvious (from check_http) +- refreshed patches: + + monitoring-plugins-1.4.6-no_chown.patch + + monitoring-plugins-2.1.1-check_logfile.patch + + monitoring-plugins-2.2-mariadb_102_build_fix.patch + + monitoring-plugins-2.3-check_ntp_perf_absolute.patch + + monitoring-plugins-too_few_arguments_for_check_disk.patch + + monitoring-plugins-wrong_return_in_check_swap.patch + + monitoring-plugins.check_hpjd.c-64bit-portability-issue.patch + + monitoring-plugins.check_snmp.arrayaddress.patch +- add sha1 checksum file as source + +------------------------------------------------------------------- +Thu Jan 14 20:47:42 UTC 2021 - Lars Vogdt + +- Update to 2.3 (final): + Enhancements + * check_dns: allow 'expected address' (-a) to be specified in CIDR notation (IPv4 only). + * check_dns: allow for IPv6 RDNS + * check_dns: Accept CIDR + * check_dns: allow unsorted addresses + * check_dns: allow forcing complete match of all addresses + * check_apt: add --only-critical switch + * check_apt: add -l/--list option to print packages + * check_file_age: add range checking + * check_file_age: enable to test for maximum file size + * check_apt: adding packages-warning option + * check_load: Adding top consuming processes option + * check_http: Adding Proxy-Authorization and extra headers + * check_snmp: make calcualtion of timeout value in help output more clear + * check_uptime: new plugin for checking uptime to see how long the system is running + * check_curl: check_http replacement based on libcurl + * check_http: Allow user to specify HTTP method after proxy CONNECT + * check_http: Add new flag --show-body/-B to print body + * check_cluster: Added data argument validation + * check_icmp: Add IPv6 support + * check_icmp: Automatically detect IP protocol + * check_icmp: emit error if multiple protocol version + * check_disk: add support to display inodes usage in perfdata + * check_hpjd: Added -D option to disable warning on 'out of paper' + * check_http: support the --show-body/-B flag when --expect is used + * check_mysql: allow mariadbclient to be used + * check_tcp: add --sni + * check_dns: detect unreachable dns service in nslookup output + Fixes + * Fix regression where check_dhcp was rereading response in a tight loop + * check_dns: fix error detection on sles nslookup + * check_disk_smb: fix timeout issue + * check_swap: repaired -n behaviour + * check_icmp: Correctly set address_family on lookup + * check_icmp: Do not overwrite -4,-6 on lookup + * check_smtp: initializes n before it is used + * check_dns: fix typo in parameter description + * check_by_ssh: fix child process leak on timeouts + * check_mysql: Allow sockets to be specified to -H + * check_procs: improve command examples for 'at least' processes + * check_disk: include -P switch in help + * check_mailq: restore accidentially removed options + +------------------------------------------------------------------- +Tue Oct 13 11:05:10 CEST 2020 - ro@suse.de + +- add patch monitoring-plugins-2.3-check_ntp_perf_absolute.patch + return ntp offset absolute (as positive value) in performance + data since warn and crit are also positive values + +------------------------------------------------------------------- +Fri Sep 18 08:19:35 UTC 2020 - Dirk Stoecker + +- Drop check_ping_fix_ip4.patch (obsolete, conflicts with upstream fix) + +------------------------------------------------------------------- +Mon Sep 14 13:39:18 CEST 2020 - ro@suse.de + +- change version to 2.3~alpha.$date.$commit + update to current git as of 20200520T233014.cadac85e + changes summarized + * detect unreachable dns service in nslookup output + * check_curl: host_name may be null + * update test parameter according to check_http + * check_curl: use CURLOPT_RESOLVE to fix connecting to the right ip + * workaround for issue #1550 - better use "ping -4" instead + of "ping" if supported + * Use size_t instead of int when calling sysctl(3) + * check_tcp: add --sni + * Fix timeout_interval declarations + * check_curl: NSS, parse more date formats from certificate (in + -C cert check) + * check_curl: more tolerant CN= parsing when checking + certificates (hit on Centos 8) + * setting no_body to TRUE when we have a HEAD request + * some LIBCURL_VERSION checks around HTTP/2 feature + * added --http-version option to check_curl to choose HTTP + * improved curlhelp_parse_statusline to handle both HTTP/1.x + and HTTP/2 + * check_curl: updates embedded picohttpparser to newest git + version + * setting progname of check_curl plugin to check_curl (at least + for now) + * Allow mariadbclient to be used for check_mysql + * fix maxfd being zero + * include -P switch in help + * check_swap: repaired "-n" behaviour + * improve command examples for 'at least' processes + * check_mysql: Allow sockets to be specified to -H + * Adding packages-warning option to check_apt plugin + * Adding print top consuming processes option to check_load + * check_snmp: make calcualtion of timeout value in help output more clear + * [check_disk] add support to display inodes usage in perfdata + * check_by_ssh: fix child process leak on timeouts + * check_icmp: Add IPv6 support + * check_dns: fix typo in parameter description + * Also support the --show-body/-B flag when --expect is used + * check_dns: improve support for checking multiple addresses + * check_hpjd: Added -D option to disable warning on 'out of paper' + * check_icmp: Do not overwrite -4,-6 on lookup + * check_icmp: emit error if multiple protocol version + * check_icmp: move opts string into a variable + * check_cluster.c: Added data argument validation. + * check_icmp: Correctly set address_family on lookup + * check_icmp: process protocol version args first + * check_icmp: Add IPv6 support + +- monitoring-plugins-1.4.6-no_chown.patch + drop hunk for Makefile.in (not present in git) +- monitoring-plugins.check_hpjd.c-64bit-portability-issue.patch + update context +- deleted monitoring-plugins-check_swap-fix-n.patch + drop patch, is upstream +- drop explicit attr in filelist for check_host and check_rta_multi + as they are symlinks to check_icmp +- add new subpackage monitoring-plugins-uptime + +------------------------------------------------------------------- +Mon Sep 14 10:57:53 CEST 2020 - ro@suse.de + +- include upstream fixes for check_swap +- add patch monitoring-plugins-check_swap-fix_comment.patch + simply fix the plugin name in the comment +- monitoring-plugins-check_swap-fix_zero_output.patch + improve the output if the swap has zero size +- monitoring-plugins-check_swap-return_unknown.patch + use unknown exit code for help/version in plugins +- add patch monitoring-plugins-check_swap-fix-n.patch + check_swap fix behaviour for "-n" if 0 free swap is left + from git commit 6995b510759cf531d70745b7d0c6e8a0d9010b06 + (bug#1175828) +- updated context in + monitoring-plugins-wrong_return_in_check_swap.patch + +------------------------------------------------------------------- +Mon Jul 15 08:05:45 UTC 2019 - lars@linux-schulserver.de - 2.2 + +- monitoring-plugins-mysql should also provide monitoring-plugins-mysql_query +- Provide/Obsolete nagios-plugins in old version for better + compatibility and to allow dist upgrade (boo#1114483) + +------------------------------------------------------------------- +Tue Apr 23 14:54:49 CEST 2019 - ro@suse.de + +- apply check_ping_fix_ip4.patch only for suse_version >= 1500 + sle12/leap42 ping does not know the -4 parameter (boo#1132903) + +------------------------------------------------------------------- +Sun Apr 14 15:57:26 UTC 2019 - Christian Boltz + +- update AppArmor profiles for usrMerge (related to boo#1132350) + - grep in check_cups + - ps in check_procs and check_procs.sle15 + +------------------------------------------------------------------- +Fri Apr 12 14:20:08 CEST 2019 - ro@suse.de + +- update usr.lib.nagios.plugins.check_procs to bash in /usr + +------------------------------------------------------------------- +Tue Apr 9 12:19:20 UTC 2019 - Dirk Stoecker + +- support IPv4 ping for dual stacked host again: check_ping_fix_ip4.patch + +------------------------------------------------------------------- +Fri Nov 30 14:25:19 CET 2018 - ro@suse.de + +- update usr.lib.nagios.plugins.check_procs again for >= sle15 + case so that ptrace is allowed (boo#1133107) + +------------------------------------------------------------------- +Wed Oct 3 14:11:51 UTC 2018 - lars@linux-schulserver.de + +- add /etc/nrpe.d/*.cfg snipplets for + + nrpe-check_load => check_load + + nrpe-check_mailq => check_mailq + + nrpe-check_ntp_time => check_ntp_time + + nrpe-check_swap => check_swap + + nrpe-check_total_procs => check_procs + + nrpe-check_zombie_procs => check_procs + + nrpe-check_users => check_users + + nrpe-check_mysql => check_mysql + + nrpe-check_proc_cron => check_procs + + nrpe-check_partition => check_disk + + nrpe-check_ups => check_ups +- use %%license macro on newer versions + +------------------------------------------------------------------- +Fri Aug 10 00:48:01 CEST 2018 - ro@suse.de + +- copy usr.lib.nagios.plugins.check_procs as + usr.lib.nagios.plugins.check_procs.sle15 and use that for sle15 + and above. "ptrace" to enable ptrace globally is needed here. + +------------------------------------------------------------------- +Wed Nov 8 14:14:00 UTC 2017 - kstreitova@suse.com + +- add monitoring-plugins-2.2-mariadb_102_build_fix.patch to fix + build with MariaDB 10.2 (in our case the build with libmariadb + library from the mariadb-connector-c package) + * upstream commit d6bd787123aa9ccd96edec8286ec22dd0442c620 + +------------------------------------------------------------------- +Tue Oct 10 19:42:26 UTC 2017 - lars@linux-schulserver.de + +- replace "ptrace" with "capability sys_ptrace" in + usr.lib.nagios.plugins.check_procs apparmor profile to avoid + errors on SLE-11 + +------------------------------------------------------------------- +Wed Sep 20 11:44:43 CEST 2017 - ro@suse.de + +- add "ptrace" to usr.lib.nagios.plugins.check_procs apparmor + profile + +------------------------------------------------------------------- +Thu Jul 13 12:00:32 UTC 2017 - olaf@aepfle.de + +- Remove unused gnutls from buildrequires + +------------------------------------------------------------------- +Fri Apr 28 18:18:50 UTC 2017 - jengelh@inai.de + +- Replace %__-type macro indirections. Drop %clean, replace + -exec \; by -exec +. + +------------------------------------------------------------------- +Fri Apr 21 15:25:57 CEST 2017 - ro@suse.de + +- disable requires for apparmor on non-suse for now + +------------------------------------------------------------------- +Fri Apr 21 12:13:06 CEST 2017 - ro@suse.de + +- adapt buildrequires for centos +- enclose all permissions handling with if suse_version +- wrap recommends with if suse_version +- disable radius check (no freeradius-client-devel rpm found) + +------------------------------------------------------------------- +Fri Jan 13 10:11:02 UTC 2017 - lars@linux-schulserver.de + +- update to 2.2: + Enhancements + + 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 + + Let check_http check HTTPS web sites via proxies + + check_http: add timeout to performance data as max value + + check_http: report certificate expiry date in UTC + + check_snmp: add IPv6 support + + check_snmp's performance data now also includes warning/ + critical thresholds + + New check_snmp -N option to specify SNMPv3 context name + + Let check_smtp's -D option imply -S + + Let check_smtp's -e option match against the full SMTP response + + check_dig: expected response is now case-insensitive + + New check_mailq -s option which tells the plugin to use sudo(8) + + New check_nt -l parameters: seconds|minutes|hours|days + + New -W/-C option for check_ldap to check number of entries + + check_users: add support for range thresholds + + check_fping now auto-detects IPv6 addresses + + check_radius now supports the radcli library + + Support OpenSSL 1.1 + Fixes + + check_http: fix host header port handling + + Let check_real terminate lines with CRLF when talking to the server, + as mandated by RFC 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 + + Don't let check_procs miss some processes on busy Solaris systems + 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 superseeded check_ntp.pl was removed, please use check_ntp_peer + or check_ntp_time instead +- refreshed patches +- removed monitoring-plugins.check_snmp.snmpv3-context.patch: + included upstream + +------------------------------------------------------------------- +Wed Feb 24 13:33:09 CET 2016 - ro@suse.de + +- usr.lib.nagios.plugins.check_disk: + include abstractions/nameservice to be able to check nfs mounts + +------------------------------------------------------------------- +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 + +- remove nagios-devel from BuildRequires + +------------------------------------------------------------------- +Tue Jul 22 13:50:10 UTC 2014 - lars@linux-schulserver.de + +- allow plugins to open files in /etc/monitoring-plugins/ + (Apparmor profiles in /etc/apparmor.d/) +- add README files for check_ping and check_ntp_time +- enhance all README files with Apparmor information +- whitespace and some spelling fixes on check_cups +- added debug option to check_cups + +------------------------------------------------------------------- +Tue Jul 15 13:05:27 UTC 2014 - lars@linux-schulserver.de + +- package rename: nagios-plugins => monitoring-plugins +- adapted README files and package documentation +- provide /etc/monitoring-plugins/ directory (incl. README) as + mentioned in the latest documentation +- update to 2.0: + Enhancements + + check_mailq now supports auto detection of qmail, postfix, exim + and nullmailer with fallback to sendmail + + check_ide_smart now defaults to plugin output, original + output appended with -v + + Extra-Opts are now enabled by default + + check_swap now supports a configurable state when there is no swap + + check_radius now supports the FreeRADIUS Client library + + New check_mysql_query -f option to specify a client options file + + New check_mysql_query -g option to specify a client options group + + Add performance data to check_mysql_query + + New check_file_age -i/--ignore-missing option to return OK on + nonexistent files + + Make check_ping, check_users, and check_disk work on Windows + + New check_ssh -P option to specify the expected SSH protocol version + + check_dns now emits the warning and critical thresholds with + the performance data + Fixes + + Don't let e.g. check_http's -C option reset SSL version + if e.g. -S 1 -C 5 is specified + + Don't have check_http's -N option expect an argument + + check_ide_smart could disable offline auto-tests but could not re-enable + them. For this reason all SMART command modes have been disabled + + check_dig: fix wrong IPv6 arguments order (Stéphane Bortzmeyer) + + check_dig: make sure not to give up too early when a timeout is + specified with -t + + check_log: don't stumble over log lines that include a % character + + check_nt: add UPTIME to perfdata + + Handle SNMPv3 noAuthNoPriv properly with check_snmp + + Fix compilation with GnuTLS + Warnings + + check_snmp now evaluates negative values properly, which means it + might return CRITICAL in cases where it used to return OK. If this + is undesired, the warning/critical threshold(s) must be fixed by + specifying e.g. ~:100 instead of 100 + + check_procs now ignores its parent process to avoid unexpected results + when invoked via certain shells + + utils.sh no longer defines ECH + + check_ide_smart -q/--quiet and -n/--nagios (Nagios-compatible output) + are now deprecated but accepted for backward-compatibility + + check_ide_smart -0/--auto-off, -1/--auto-on and -i/--immediate: + options have been disabled because they were broken + + State retention: the NAGIOS_PLUGIN_STATE_DIRECTORY environment + variablew has been renamed MP_STATE_PATH. + The old variable will continue to work in v2.0.x + + Add the UID of the invoking user to the state retention file path. + This helps solving permission issues when different users run the same plugin + + check_swap used to allow returning OK on a system without swap when + only percent thresholds were used. + This is no longer the case and one must now use -n/--no-swap= +- enable check_radius + +------------------------------------------------------------------- +Sun Jan 19 01:47:43 UTC 2014 - lars@linux-schulserver.de + +- adapt URL to new upstream page (bnc#859105) + +------------------------------------------------------------------- +Sun Dec 22 11:14:55 UTC 2013 - jcnengel@gmail.com + +- Add SNMPv3 context support to check_snmp following an idea of + Lars Mathwig + +------------------------------------------------------------------- +Wed Nov 27 19:56:08 UTC 2013 - msvec@suse.com + +- Get rid of the old SUSE spelling in READMEs + +------------------------------------------------------------------- +Tue Nov 19 11:37:39 UTC 2013 - schneemann@b1-systems.de + +- 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//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 - opensuse@cboltz.de + +- 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 - lars@linux-schulserver.de + +- allow family="inet6" sock_type="raw" in apparmor profile for + check_ping + +------------------------------------------------------------------- +Tue Aug 13 10:37:17 CEST 2013 - ro@suse.de + +- update apparmor profile for ntp check (added nameservice) + +------------------------------------------------------------------- +Sun Aug 11 23:46:52 UTC 2013 - lars@linux-schulserver.de + +- add capabilities sys_admin and sys_rawio to ide_smart check + +------------------------------------------------------------------- +Mon Aug 5 14:10:18 CEST 2013 - ro@suse.de + +- add apparmor profiles for these checks: + icmp, ide_smart, ping, ssh + +------------------------------------------------------------------- +Wed Jul 17 13:01:40 UTC 2013 - lars@linux-schulserver.de + +- enhance the documentation for checks with special privileges + +------------------------------------------------------------------- +Thu May 23 13:50:14 UTC 2013 - opensuse@dstoecker.de + +- add check_procs_perf plugin + +------------------------------------------------------------------- +Fri Feb 22 15:08:06 UTC 2013 - lars@linux-schulserver.de + +- release for 12.1 & 12.2 as update: fixes bnc #778970 & bnc #789428 + +------------------------------------------------------------------- +Fri Feb 1 15:04:09 UTC 2013 - lars@linux-schulserver.de + +- added nagios-plugins-cups from mcaj@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 - ro@suse.de + +- allow name resolving for check-ntp plugin in apparmor config + +------------------------------------------------------------------- +Tue Dec 25 18:41:36 UTC 2012 - lars@linux-schulserver.de + +- added nagios-plugins-check_disk_printf.patch: fix wrong number + of printf arguments if verbose +- refreshed patches + +------------------------------------------------------------------- +Fri Dec 21 01:07:22 CET 2012 - ro@suse.de + +- skip sensors package also for s390 and s390x + +------------------------------------------------------------------- +Mon Nov 5 20:59:17 UTC 2012 - lars@linux-schulserver.de + +- enhance apparmor profile for check_ntp_time (IPv6 support) + +------------------------------------------------------------------- +Thu Oct 11 12:32:27 UTC 2012 - lars@linux-schulserver.de + +- nagios-plugins-nagios can also check icinga + -> require 'monitoring_daemon' + +------------------------------------------------------------------- +Sat Jul 28 14:30:46 UTC 2012 - aj@suse.de + +- Fix build with missing gets declaration (glibc 2.16) + +------------------------------------------------------------------- +Thu Jul 12 22:08:08 UTC 2012 - lars@linux-schulserver.de + +- update to 1.4.16: + + applied patch that adds both critical and warning thresholds + to certificate expiration checks of check_tcp, check_http, check_smtp + + check_tcp: Print performance data even with -D + + check_snmp: * use single quotes for perf data labels + * Fix performance data label containing spaces in + check_snmp + * Add --perf-oids option for check_snmp to retain + optional 1.4.14 compatibility + * Accept multiple labels specified with "-l" + + check_disk_smb: Add performance data + + check_dhcp: * Don't misinterpret the "siaddr" field + * Fix handling of "pad" options + + check_ping: * Improve parsing of ping6(1) output + * fix check_ping where output of ping6 when unreachable + * add missing newline to die() calls + + check_users: * Whitespace fixes, etc. + * improve performance + + utils.sh: Added check_range shell function + + check_http: * Don't ignore SSL initialization errors + * Add support for specifying SSL protocol version + * check for and print the certificate cn + * use standard threshold functions + * improved tests for check_http + + check_by_ssh: added -F config file to specify alternative ssh config + + check_sensors: * Use symbolic exit codes + * Minor whitespace fixes + * Detect FAULT status. This can be suppressed + with the new "--ignore-fault" option. + + check_ldap: * now correctly handles the long option --hostname + * Fix check_ldap overriding the port when --ssl was + specified after -p + + check_smtp: * fix where duplicate messages were displayed for + certificate errors + * New option to check_smtp to ignore failures when + sending QUIT + * Abort on missing/unexpected greeting + + check_ssh: * Add perfdata to check_ssh + + check_procs: * Fix for regex input of '|', being output causing + problems with Nagios' parsing of performance data. + Now replaced with ',' +- removed upstreamed patches: + + nagios-plugins.ctypes.patch + + nagios-plugins.check_dhcp-char.patch + + nagios-plugins.asprintf.patch + + nagios-plugins.check_by_ssh.warncrit.patch + + 05_check_linux_raid_fix_striped.dpatch + + 10_check_disk_smb_spaces.dpatch + + 11_check_disk_smb_NT_STATUS_ACCESS_DENIED.dpatch + + 13_check_smtp_greeting.dpatch + + 14_check_icmp_multiple_ips.dpatch + + 15_check_sensors_fault.dpatch + + nagios-plugins-enhance_check_sensors.patch +- suggest instead of recommending the following sub packages in the + former nagios-plugins package: + + nagios-plugins-nagios + + nagios-plugins-xenvm + + nagios-plugins-game + +------------------------------------------------------------------- +Sun Jun 10 18:57:35 UTC 2012 - lars@linux-schulserver.de + +- fix permissions of apparmor profile files + +------------------------------------------------------------------- +Mon Jun 4 12:48:57 UTC 2012 - lars@linux-schulserver.de + +- add Apparmor profile for check_dhcp +- add Apparmor profile for check_ntp_time +- soften the nagios-plugins-nagios dependency to avoid an + installed Nagios after an upgrade +- point users to the README.SuSE files for check_dhcp, check_icmp + and check_ide_smart + +------------------------------------------------------------------- +Fri Jun 1 12:10:27 CEST 2012 - ro@suse.de + +- teach check_by_ssh old options -w and -c again + +------------------------------------------------------------------- +Mon May 21 11:53:36 UTC 2012 - badshah400@gmail.com + +- Use BuildRequires: libgnutls-devel instead of gnutls-devel for + Factory in keeping with gnutls package naming changes. + +------------------------------------------------------------------- +Wed May 16 07:27:24 UTC 2012 - lars@linux-schulserver.de + +- rename nagios-plugins-libs to nagios-plugins-common as this + package contains more than just the libraries + +------------------------------------------------------------------- +Fri Apr 27 16:23:47 UTC 2012 - lars@linux-schulserver.de + +- fix build on ix86 +- only recommend subpackages that have new (and not always available + dependencies) +- move examples directory to the libs package: the permissions + file there is more useful here +- new subpackage nagios-plugins-all recommending all other + subpackages + +------------------------------------------------------------------- +Thu Apr 26 10:23:18 UTC 2012 - lars@linux-schulserver.de + +- do not package check_xenvm on ix86 as this setup is (no longer) + supported + +------------------------------------------------------------------- +Wed Apr 25 07:24:33 UTC 2012 - lars@linux-schulserver.de + +- added nagios-plugins-enhance_check_sensors.patch (thanks to + Craig Gardner): return unkown if the needed kernel module + is not loaded + +------------------------------------------------------------------- +Mon Apr 23 16:30:09 UTC 2012 - lars@linux-schulserver.de + +- introduce a new subpackage nagios-plugins-libs that contains + most of the content of the former nagios-plugins package. That + should make updates easier as the nagios-plugins package itself + can now require all former included packages and the single + check-packages just need to require the nagios-plugins-libs + package on demand +- change recommends to requires in nagios-plugins and + nagios-plugins-extras, so users with 'solver.onlyRequires'=true + can also upgrade to the new package layout without problems +- provide the nagios-plugins-xenvm package only for x86 hardware + as the required xen-tools are just built there + +------------------------------------------------------------------- +Tue Apr 17 18:58:38 UTC 2012 - lars@linux-schulserver.de + +- update README.SuSE as users should also allow broadcasts in their + firewall if they use check_dhcp (thanks to Rüdiger Oertel) +- split up the checks into subpackages to follow the other + distributions and allow users to install a minimal setup on their + machines with minimal dependencies (moved dependencies into + subpackages) +- run set_permissions on newer distributions +- added nagios-plugins-wrong_return_in_check_swap.patch: + preventing check_swap from returning OK, if no swap activated + +------------------------------------------------------------------- +Wed Feb 22 13:37:54 UTC 2012 - lars@linux-schulserver.de + +- add GPL-3.0 implicitely to fix bnc #677711 + +------------------------------------------------------------------- +Wed Feb 8 16:58:49 UTC 2012 - lars@linux-schulserver.de + +- added hint to permissions file to nagios-plugins-README.SuSE + +------------------------------------------------------------------- +Tue Oct 18 13:58:38 UTC 2011 - chris@computersalat.de + +- fix missing Group in subpkg +- remove Author from Description + +------------------------------------------------------------------- +Fri Aug 12 20:28:29 UTC 2011 - lars@linux-schulserver.de + +- use nagios-rpm-macros rpm now to define global macros +- use the following patches from Debian: + + 05_check_linux_raid_fix_striped.dpatch + + 10_check_disk_smb_spaces.dpatch + + 11_check_disk_smb_NT_STATUS_ACCESS_DENIED.dpatch + + 13_check_smtp_greeting.dpatch + + 14_check_icmp_multiple_ips.dpatch + + 15_check_sensors_fault.dpatch +- split up nagios-plugins-fping package, and recommend it in + nagios-plugins-extras for backwards compatibility +- disable rpath in configure +- sort configure arguments alphabetical +- install check_bgpstate check in nagios-plugins-check_bgpstate + package +- remove .pl endings from check_netapp and check_linux_raid, but + provide symlinks for backwards compatibility +- provide check_host and check_rta_multi for users changing from + Debian + +------------------------------------------------------------------- +Mon Aug 1 19:51:08 UTC 2011 - lars@linux-schulserver.de + +- added info about check_dhcp in README.SuSE (see bnc #640367) + +------------------------------------------------------------------- +Fri Oct 8 12:28:26 UTC 2010 - coolo@novell.com + +- unfuzz patch + +------------------------------------------------------------------- +Wed Jul 28 13:54:03 UTC 2010 - schneemann@b1-systems.de + +- removed zlib from Requires to make rpmlint happy +- update to 1.4.15 +- removed 1.4.14 specific Patches + +- fixes through update: + * Fix check_ircd binding to wrong interface (#668778) + * Add proxy-authorization option to check_http (Marcel Kuiper - + #1323230, Bryan Irvine - #2863925) + * check_icmp now increment the sequence counter in each packet + * Fix usage of repeated -o options in check_snmp + * Try to detect arguments passed via --with-ping[6]-command and + set options accordingly (#2908236) + * Fix memory leak in check_http for large pages + (Jimmy Bergman - #2957455) + * Fix compilation with GCC 2.96 (Konstantin Khomoutov - #2977105) + * Fix regression introduced in #1867716 where partially valid + performance strings would not be printed anymore + * Fix regression in check_http ssl checks on some servers - + make SNI an option + * Fix guest mode support in check_disk_smb + * Fix check_disk_smb and check_ircd failures when run via ePN + * check_ldap now allows for specifying an empty LDAP base + * Fix compilation error of pst3 in Solaris 8 + * Fix check_radius returning OK on unexpected results + (Craig Leres - #2911752) + * Fix translations when extra-opts aren't enabled + (Jan Wagner - #2832884) + * Fix parsing of multi-line strings in check_snmp (broken in 1.4.14) + and enhance output in such case (#2832451) + * Fix detection of pst3 64-bit compile flags with Sun CC + * Fix cmd_run overwriting the environment, which would break + some commands that needed it + * Allow check_ifstatus to accept version=2c - used to only allow + version=2 (Brian Landers) + * Fix examples in check_disk, where it implied was possible to + suffix unit values to warn/crit parameters + +------------------------------------------------------------------- +Fri Jun 18 07:49:03 UTC 2010 - lars@linux-schulserver.de + +- enable ipv6 usage (looks like default configure does not detect + this right) +- define ping6 commandline in configure +- added Patches from Debian: + + check_game_cmdline.patch + + check_smtp_help.patch + + check_snmp_perfdata.patch + +------------------------------------------------------------------- +Sun Dec 20 18:07:17 UTC 2009 - coolo@novell.com + +- add nagios-plugins-1.4.14-implicit_decl.patch to spec file + +------------------------------------------------------------------- +Tue Dec 15 11:50:05 UTC 2009 - lars@linux-schulserver.de + +- enhanced the documentation in the example permissions file + +------------------------------------------------------------------- +Sun Dec 13 17:18:22 UTC 2009 - lars@linux-schulserver.de + +- added run_permissions in post in case somebody uses the delivered + example file + +------------------------------------------------------------------- +Sun Dec 6 12:58:46 CET 2009 - lars@linux-schulserver.de + +- enabled extra-opts +- fix pathnames to ntp commands +- remove check_sensors on archs with no support for it +- added the following patches: + + nagios-plugins-1.4.14-ntpd.patch (remove wrong comment) + + nagios-plugins-1.4.14-check_log.patch (fix pathnames) + + nagios-plugins-1.4.14-command_cfg.patch (fix pathnames) + + nagios-plugins-1.4.14-nmap.patch (fix tempdir) + + nagios-plugins-1.4.14-check_inodes.patch (initialize vars) + + nagios-plugins-1.4.14-implicit_decl.patch (fix implicit decl.) + + nagios-plugins-1.4.14-check_ircd.patch (Make it working on + multihomed host - thanks to ultrotter@debian.org) + +------------------------------------------------------------------- +Tue Nov 24 22:11:14 UTC 2009 - crrodriguez@opensuse.org + +- refresh patches wit fuzz=0 + +------------------------------------------------------------------- +Wed Sep 16 12:25:32 CEST 2009 - cschneemann@suse.de + +- update to 1.4.14 + for a full list of changes have a look at + /usr/share/doc/packages/nagios-plugins/ChangeLog + +------------------------------------------------------------------- +Sat Jul 25 10:40:23 CEST 2009 - cschneemann@suse.de + +- moved example file command.cfg to doc directory, the nagios package + brings its own configuration files, this command.cfg confuses + +------------------------------------------------------------------- +Wed Jul 8 13:42:23 CEST 2009 - cschneemann@suse.de + +- added parameters to configure in spec to get more information from + check_proc (bnc#519240) + +------------------------------------------------------------------- +Fri Jun 5 09:24:33 CEST 2009 - chris@computersalat.de + +- added contrib to doc +- spec mods + * cleanup specfile + o RPM Tags + * fixed deps on sub-pkg extras + * use of rpm macros + * add S:11, S:12 in prep + * simplify filelist for libexecdir + o checks for extras pkg are excluded in main pkg + * reworked files for doc + +------------------------------------------------------------------- +Fri May 15 12:38:22 CEST 2009 - cschneemann@suse.de + +- fixed buffer overflow in check_ntp_peer (bnc#498669) + +------------------------------------------------------------------- +Wed Mar 4 15:37:17 CET 2009 - lrupp@suse.de + +- added accidentally removed README and example again + +------------------------------------------------------------------- +Thu Sep 25 12:11:56 CEST 2008 - cschneemann@suse.de + +- update to 1.4.13: + + Fix Debian bug #460097: check_http --max-age broken (Hilko Bengen) + + Fix Debian bug #479013: check_dig's -l is mandatory now + (sf.net #1986306) + + check_dig now returns CRITICAL instead of WARNING when no answer + section is found + + check_procs now captures stderr in external command and adds to + plugin output + + check_snmp now only prints perfdata for non numeric values + (sf.net #1867716) + + check_icmp now supports packet size modification + + check_http -e now accepts a comma-delimited list of expected + status codes (Sven Nierlein) + + libtap now included with this distribution for easier testing. + Run ./configure with --enable-libtap + + check_ntp_peer/check_ntp_time used to show port in + --help but ignored the argument - now implemented + + Fix possible segfault in check_ntp_peer with deliberately + invalid packets + +------------------------------------------------------------------- +Mon Sep 15 19:06:03 CEST 2008 - lrupp@suse.de + +- compile explicit without included regex +- add README about suid permissions + +------------------------------------------------------------------- +Fri Jul 25 19:15:35 CEST 2008 - lrupp@suse.de + +- fix lib path for perl plugins +- add check_linux_raid.pl and check_netapp.pl + +------------------------------------------------------------------- +Mon Jul 21 18:24:49 CEST 2008 - lrupp@suse.de + +- update to 1.4.12: + + Fixed check_http regression in 1.4.10 where following + redirects to relative URLs on virtual hosts failed if + both "-H" and "-I" were used + + Merged two new checks that deprecates check_ntp: + check_ntp_peer and check_ntp_time. + You should read the --help output so see which one is suitable + for you. + ++ check_ntp_peer implement stratum thresholds support + (feature request nagios-bt#1703823). + ++ check_ntp now returns UNKNOWN instead of WARNING if jitter + is unavailable (jitter=-1.000000) as long as the thresholds + range include -1. If no offset threshold is specified and the + offset is unavailable, will return UNKNOWN as well. + + Fixed broken usage2 in check_snmp and check_cluster + + check_cluster now accepts all valid characters in + its thresholds ("-", "@", "~") + + Fixed check_disk reporting OK if disk usage grows + over 100% (nagios-bt#1348746). + + Fixed check_load argument handling when not passing + triplets (nagios-bt#1831890) + + Fixed buffer overflow in check_snmp (CVE-2007-5623) + + Tinderbox builds now runs tests in a verbose mode + + Updated Nagios::Plugin to 0.22 + + VPATH problem fixed for compiling plugins-root +- disabled nagios-plugins-1.4.5-check_procs.c.patch (upstream has + another solution) +- BuildRequires nagios-devel now +- package check_linux_raid + +------------------------------------------------------------------- +Mon May 5 15:58:36 CEST 2008 - olh@suse.de + +- fix return type of validate_arguments() in negate.c + +------------------------------------------------------------------- +Thu Apr 17 14:18:55 CEST 2008 - max@suse.de + +- NAMEDATALEN is defined in pg_config_manual.h in PostgreSQL 8.3. + +------------------------------------------------------------------- +Mon Mar 10 14:48:34 CET 2008 - olh@suse.de + +- add check_xenvm + (from http://www.novell.com/coolsolutions/feature/19490.html) + +------------------------------------------------------------------- +Wed Jan 30 16:03:40 CET 2008 - lrupp@suse.de + +- enabled check_apt and check_game (in extras package) +- rpcinfo-, qstat- and apt-get-command need pathnames + (to avoid extra BuildRequires) +- make all plugins executable +- package commands.cfg to /etc/nagios +- package CODING file in docdir +- check_radius is currently broken +- BuildRequire nagios-devel +- build parallel +- added gnutls to BuildRequires + +------------------------------------------------------------------- +Fri Jan 4 10:19:37 CET 2008 - olh@suse.de + +- update to version 1.4.11 + * Fix check_http regression in 1.4.10 where following redirects to + relative URLs on virtual hosts failed if both "-H" and "-I" were used + * check_ntp now return UNKNOWN instead of WARNING if jitter is unavailable (jitter=-1.000000) + as long as the thresholds range inculde -1. If no offset threshold is specified + and the offset is unavailable, will return UNKNOWN as well. + NOTE: If jitter thresholds are specified as integers it will return CRITICAL if jitter + is "-1" as the default range starts at 0. See Examples in --help output. + * Fix broken usage2 in check_snmp and check_cluster + * check_cluster now accept all valid characters in its thresholds ("-", "@", "~") + * Merge two new checks that deprecates check_ntp: check_ntp_peer and check_ntp_time. + * Fix check_disk reporting OK if disk usage grows over 100% (bug #1348746). + The problem happens to be in Gnulib but a workaround have been implemented in check_disk.c + * Fix check_load argument handling when not passing triplets (bug #1831890) + +------------------------------------------------------------------- +Fri Oct 26 13:51:51 CEST 2007 - olh@suse.de + +- fix possible buffer overflow in check_snmp with snmpget replies (336002) + fix possible buffer overflow in check_http with redirects (331728) + +------------------------------------------------------------------- +Mon Oct 8 11:28:16 CEST 2007 - olh@suse.de + +- fix string check in check_snmp + +------------------------------------------------------------------- +Mon Oct 8 11:10:41 CEST 2007 - olh@suse.de + +- update to version 1.4.10 (331728) + * Fix check_http buffer overflow vulnerability when following HTTP redirects + * check_http now explicitly asks HTTP/1.1 servers to close the connection + after completion of the response + * Check_ldaps' guessing which secure method to use (starttls vs. ssl on connect) + is now deprecated. See --help for further information. + * Check_disk now calls stat() on all filesystems to check. (Old: only the ones selected using -p) + A meaningful error message (eg "Stale NFS Handle") is printed if stat fails. + * New check_disk option -L: Only check local filesystems, but call stat() on remote ones, too. + Thus accessibility of remote filesystems can be checked without any threshold comparison. + * Check_disk's --help now prints some examples for the new features introduced in 1.4.8 + * New check_disk -i/-I option to ignore pathes/partitions based on regular expressions + * New check_disk -A option to select all filesystems explicitly + WARNING: check_disk's -E option must now be passed before -p or -r/-R arguments + Passing -E after -p or -r results in UNKNOWN state, now + This is needed due to the new ignore feature + * Fix check_disk bug when mixing case sensitive and case insensitive regex arguments + * New check_dhcp -u/--unicast option for emulating a DHCP relay in order + to check DHCP servers on remote networks + * New check_dhcp -m/--mac option which allows for specifying the MAC + address to use in the DHCP request + * The check_dhcp -r and -s options now accept host names, too + * Fix possible check_icmp bus errors on some (non-x86/AMD64) platforms + * Fix check_smtp's handling of multiple-packet server responses + WARNING: Fix for negate which may break existing commands: + - stop evaluating command line options through shell twice + - enforce a full path for the command to run + * The "negate" utility can now remap custom states + * Check_radius now supports radiusclient-ng + * The (undocumented) positional parameter parsing which check_radius used + instead of getopt(3) if 8 arguments were given is no longer available + * Check_by_ssh now supports multiline output + * IPv6 support can now be disabled using ./configure --without-ipv6 + * Fix check_ntp now honor ntp flags + +------------------------------------------------------------------- +Wed Aug 15 21:17:17 CEST 2007 - olh@suse.de + +- require freeradius-client-devel only in openSuSE > 10.2 + +------------------------------------------------------------------- +Wed Aug 15 20:54:55 CEST 2007 - olh@suse.de + +- fix a few compile warnings +- update to version 1.4.9 + * Inclusion of contrib/check_cluster2 as check_cluster with some improvements + * New/improved -E/--skip-stderr and -S/--skip-stdout options for check_by_ssh + * check_snmp now supports Counter64 + * Fix compilation of check_ldap, check_radius and check_pgsql + * check_load can optionally divide by number of cpus + * Fix check_time returning wrong OK when time is before the epoch on some arch + * Make check_http output more consistent + * Fix possible check_http segfaults when following HTTP redirects + * check_snmp don't warn anymore if something is printed on stderr + * Fix check_tcp segfault when multiple expect strings are given + * New option for check_tcp: -A/--all to test if all given expect strings match + * Respects --without-world-permissions for setuid plugins + * check_disk extra options for regex matching of filesystems and grouping of filesystems + for collective thresholds + * Better configure test for mysqlclient availability + * Various check_ntp fixes + * check_procs uses /usr/ucb/ps if available - fixes pst3 problems on Solaris + * Fixed MKINSTALLDIRS problem in po/ + * ./configure now detects if possible to compile check_mysql + * Fixed broken HELO in check_smtp + * check_icmp now allows to set a minimum number of hosts required for successs (-m) + * check_icmp fix for *BSD when running for long time + * check_ping times out 1 second quicker if host is unreachable + * Root plugins installed with world executable + * check_sybase from contrib now maintained in NagiosExchange + * --with-nagios-user/group reinstated ./configure option + * New --without-world-permissions ./configure option + +------------------------------------------------------------------- +Fri Mar 30 01:34:09 CEST 2007 - ro@suse.de + +- added procps,bind-utils to buildreq + +------------------------------------------------------------------- +Thu Mar 15 01:55:30 CET 2007 - ro@suse.de + +- disable radius plugin for now, needs porting to freeradius-client + +------------------------------------------------------------------- +Thu Mar 15 00:52:00 CET 2007 - ro@suse.de + +- make it build as non-root +- check_dhcp and check_ are still not installed suid, but they + were not suid before this change + +------------------------------------------------------------------- +Mon Mar 12 16:00:09 CET 2007 - tsieden@suse.de + +- update to version 1.4.6 + * Reduced number of DNS lookups in check_ping and netutils.c for + IPv6 configurations + * Fixed compile problems with *BSD re: alloca.h + * Fixed Solaris problems with check_swap (tested on Solaris 9) + * Fixed check_swap for HP/UX where swapinfo command was incorrect + * Fixed check_disk inode threshold checks, regressed at r1.4.4. + * Fixed crit/warn for check_disk perf data + * Fixed buffer overflow in check_procs + * Fixed error handling for UNIX sockets in netutils.c + * New -q and -o options for check_by_ssh which are handed over to ssh(1) as is + * Synced with latest GNUlib + * Fixed check_jabber always returns warning +- removed ntp from BuildRequires +- adapted from BuildService: + * added more distribution-specific BuildRequires from mge@suse.de + +------------------------------------------------------------------- +Wed Jan 10 21:13:26 CET 2007 - olh@suse.de + +- remove outdated and unused command.cfg + +------------------------------------------------------------------- +Fri Nov 17 11:47:31 CET 2006 - tsieden@suse.de + +- fix build + * typos in check_http.c, check_icmp.c and check_ldap.c + * added missing include to check_procs.c + * fix more gcc warnings in check_fping.c, check_mysql.c and + check_mysql_query.c + +------------------------------------------------------------------- +Thu Nov 16 10:12:55 CET 2006 - tsieden@suse.de + +- update to version 1.4.5 + * check_udp2 removed. check_udp is now linked to check_tcp.c + * new check_apt plugin + * new C based check_ntp. the perl version is now + deprecated. + * major bug fixes to check_disk where values were incorrectly + calculated and alerted on. + * check_mailq now errors if the sub-program run returns + non-zero return code. this would appear as if mailqs were + okay when the nagios user could not query the mail-queues + * compile problems with check_snmp fixed + +------------------------------------------------------------------- +Wed Jun 21 19:40:50 CEST 2006 - stark@suse.de + +- update to version 1.4.3 + * check_mysql_query added to run arbitrary SQL commands, + with threshold checking + * new check_clamd + +------------------------------------------------------------------- +Fri Jun 16 23:37:34 CEST 2006 - schwab@suse.de + +- Fix syntax error in configure script. + +------------------------------------------------------------------- +Wed Jan 25 21:38:33 CET 2006 - mls@suse.de + +- converted neededforbuild to BuildRequires + +------------------------------------------------------------------- +Mon Dec 19 15:10:04 CET 2005 - ro@suse.de + +- added previously unpackaged symlinks to extras package + +------------------------------------------------------------------- +Tue Oct 25 15:48:15 CEST 2005 - rhafer@suse.de + +- added LDAP_DEPRECATED to CFLAGS to build correctly with + OpenLDAP 2.3 + +------------------------------------------------------------------- +Tue Sep 20 06:47:30 CEST 2005 - stark@suse.de + +- update to version 1.4.2 + +------------------------------------------------------------------- +Tue Aug 2 06:40:05 CEST 2005 - stark@suse.de + +- update to version 1.4.1 + +------------------------------------------------------------------- +Tue May 17 12:33:12 CEST 2005 - stark@suse.de + +- fixed overwriting a buffer + +------------------------------------------------------------------- +Tue May 17 08:21:37 CEST 2005 - stark@suse.de + +- fixed ps syntax (bug 75699) + +------------------------------------------------------------------- +Fri Feb 4 10:16:35 CET 2005 - stark@suse.de + +- update to version 1.4 + +------------------------------------------------------------------- +Wed May 26 01:55:49 CEST 2004 - ro@suse.de + +- add some return values to non-void functions + +------------------------------------------------------------------- +Thu Dec 18 12:56:10 CET 2003 - stark@suse.de + +- adopted to new ping output format (iputils-ss021109) (#33710) + +------------------------------------------------------------------- +Mon Nov 10 15:05:16 CET 2003 - ro@suse.de + +- use net-snmp instead of ucdsnmp + +------------------------------------------------------------------- +Fri Jul 18 13:07:54 CEST 2003 - stark@suse.de + +- update to 1.3.1 + +------------------------------------------------------------------- +Thu Jun 19 13:47:58 CEST 2003 - stark@suse.de + +- added missing directories to filelist + +------------------------------------------------------------------- +Tue May 27 07:30:05 CEST 2003 - stark@suse.de + +- update to 1.3.0 + * added check_nt + +------------------------------------------------------------------- +Mon Dec 2 10:24:20 CET 2002 - stark@suse.de + +- update to 1.3.0beta2 + * included SNMPv3 patch + +------------------------------------------------------------------- +Thu Nov 21 01:21:43 CET 2002 - ro@suse.de + +- work around autoconf problem + +------------------------------------------------------------------- +Wed Oct 9 10:00:35 CEST 2002 - stark@suse.de + +- added nagios to neededforbuild (Bug #20557) + +------------------------------------------------------------------- +Sun Oct 6 06:01:25 CEST 2002 - stark@suse.de + +- moved Requires: perl-Net-SNMP from extras to "normal" package + (Bug #20559) +- removed Requires: nagios because it is also possible + to use it with nagios-nrpe + +------------------------------------------------------------------- +Thu Aug 1 00:56:50 CEST 2002 - ro@suse.de + +- use openldap2 as neededforbuild + +------------------------------------------------------------------- +Tue Jul 9 11:54:30 CEST 2002 - stark@suse.de + +- added patch to be able to connect via SNMPv3 (check_snmp) + +------------------------------------------------------------------- +Mon Jul 1 16:01:58 CEST 2002 - ro@suse.de + +- find mysql on lib64 + +------------------------------------------------------------------- +Wed Jun 19 09:09:38 CEST 2002 - stark@suse.de + +- switched to nagiosplug 1.3beta1 + (is stated as beta but should be usable in almost all cases) + +------------------------------------------------------------------- +Fri Jun 14 10:42:21 CEST 2002 - stepan@suse.de + +- add mysql-client to neededforbuild + +------------------------------------------------------------------- +Mon Apr 29 10:18:16 CEST 2002 - stark@suse.de + +- changed Requires to nagios + +------------------------------------------------------------------- +Tue Jan 15 09:35:09 CET 2002 - stark@suse.de + +- fixed check_ping to fit new ping output (#12769) + +------------------------------------------------------------------- +Wed Nov 7 14:20:40 CET 2001 - stark@suse.de + +- use AM_INIT_AUTOMAKE + +------------------------------------------------------------------- +Mon Aug 27 01:42:07 CEST 2001 - ro@suse.de + +- fix for current ping output (round-trip is called rtt now) +- bzip source + +------------------------------------------------------------------- +Mon Jul 30 08:40:54 CEST 2001 - stark@suse.de + +- added openssl to #neededforbuild + +------------------------------------------------------------------- +Fri Jul 27 08:57:43 CEST 2001 - kukuk@suse.de + +- change postgresql-lib -> postgresql-libs + +------------------------------------------------------------------- +Mon Jul 16 08:55:43 CEST 2001 - stark@suse.de + +- added mysql-shared to #neededforbuild + +------------------------------------------------------------------- +Tue Jul 10 08:15:00 CEST 2001 - stark@suse.de + +- package splitted (netsaint-plugins-extras for dependent functions +- added check_fping + +------------------------------------------------------------------- +Mon Jul 9 14:26:39 CEST 2001 - stark@suse.de + +- fixed #ifdef in check_mrtg.c, check_nwstat.c, check_by_ssh.c + +------------------------------------------------------------------- +Mon Jun 18 13:44:39 CEST 2001 - stark@suse.de + +- removed openldap-client from neededforbuild + +------------------------------------------------------------------- +Mon May 14 11:13:50 CEST 2001 - stark@suse.de + +- update to release 1.2.9-4 + +------------------------------------------------------------------- +Thu Apr 19 12:46:52 CEST 2001 - stark@suse.de + +- initial package 1.2.9-3 + diff --git a/monitoring-plugins.check_cups.sh b/monitoring-plugins.check_cups.sh new file mode 100644 index 0000000..94c626d --- /dev/null +++ b/monitoring-plugins.check_cups.sh @@ -0,0 +1,377 @@ +#!/bin/bash + +# check_cups - nagios plugin +# +# Copyright (C) 2008-2010, Novell, Inc. +# Copyright (C) 2011-2013, SUSE Linux Products GmbH +# Author: Martin Caj +# +# 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. +# +# +# Autor notes: +# I`d like to thank to John E. Vincent (nagios-plugs@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 +# +# version 0.3 has no awk any more, cut can do it as well. +# the appamor profile was fixed as well. +# Martin Caj 01/11/2013 +# +# 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.3 + +#searchning the lpstat: +LPSTAT="$(which lpstat)" +DEBUG='no' + +# 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 prints the usage. + + echo "Usage: $PROGNAME -H -w -c [-P] [-p] [-Q ] [-a ] [-d]" + echo + echo "Notes:" + echo "-H : Hostname - Can be a hostname or IP address." + echo "-P : Check only the printers status." + echo "-p : will check only the specified printer." + echo "-Q : Type of check - Can be queue size (s) or both queue 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 longer than days." + echo "-d : enable debug output" + echo +} + +print_help() { +# Name: print_help +# Desc: Print the usage and help. + + print_usage + echo + 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 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 than " + echo "will return a CRITICAL" + echo "For more details have look into the README file. " + 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 + if [ "$DEBUG" == 'yes' ]; then + echo "Checking all printers..." + fi + RESULT=$("$LPSTAT" -h "$hostname" -p ) + if [ $? != 0 ] + then + echo "ERROR: Probably wrong host name: "$hostname", or CUPS is not running." + exit "$STATE_UNKNOWN" + fi +else + if [ "$DEBUG" == 'yes' ]; then + echo "Checking only printer: $printername" + fi + RESULT=$("$LPSTAT" -h "$hostname" -p "$printername") + if [ $? != 0 ] + then + echo "ERROR: the printer $printername doesn't exist on CUPS server $hostname." + echo "please check command: '$LPSTAT -h $hostname -p' without printer name." + exit "$STATE_UNKNOWN" + fi +fi + +case "$RESULT" in + *Rejecting*) + messages=$(echo "$RESULT"|grep -i rejecting ) + OUTPUT="CRITICAL - CUPS printer is rejecting jobs for: $messages." + exitstatus="$STATE_CRITICAL" + ;; + *Unable*) + messages=$(echo "$RESULT"|grep -i unable ) + OUTPUT="CRITICAL - CUPS Unable to connect: $messages." + exitstatus="$STATE_CRITICAL" + ;; + *disabled*) + messages=$(echo "$RESULT"|grep -i disabled) + OUTPUT="CRITICAL - CUPS printer: $messages." + exitstatus="$STATE_CRITICAL" + ;; + *Paused*) + messages=$(echo "$RESULT"|grep -i paused) + OUTPUT="WARNING: - CUPS printer is: $messages." + exitstatus="$STATE_WARNING" + ;; + *printing*) + OUTPUT="OK - CUPS printer is printing now." + exitstatus="$STATE_OK" + ;; + *idle*) + OUTPUT="OK - CUPS printer $printername is idle." + exitstatus="$STATE_OK" + ;; + *) + OUTPUT="CRITICAL - Unknown error occured while checking: $RESULT." + exitstatus="$STATE_CRITICAL" + ;; +esac + +} + +# Test how many variable we got on command line +# The minimum for test printers is 3 + +if [ $# -lt 3 ]; then + print_usage + exit "$STATE_UNKNOWN" +fi + +# 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 + --help) + print_help + exit "$STATE_OK" + ;; + -h) + print_help + exit "$STATE_OK" + ;; + -P) + testprinter="1" + ;; + -p) + testprinter="2" + printername="$2" + shift + ;; + -H) + hostname="$2" + shift + ;; + -Q) + testtype="$2" + shift + ;; + -w) + warnlevel="$2" + shift + ;; + -c) + critlevel="$2" + shift + ;; + -a) + maxage="$2" + shift + ;; + -d) + DEBUG='yes' + ;; + esac + shift +done + +# Check arguments for validity: +if [ -z "$hostname" ] +then + echo "You must specify a hostname (or localhost to test the local system)" >&2 + print_usage + exitstatus="$STATE_UNKNOWN" + exit "$exitstatus" +fi + +# testing printer(s) +if [ "$testprinter" -eq "2" ] # Check specific printer and continue with the script +then + check_printer_status "$printername" + + if [ -z "$testtype" ] # exit if there is no -Q checks + then + echo "$OUTPUT" + exit "$exitstatus" + fi +elif [ "$testprinter" -eq "1" ]; then # check all printers + check_printer_status + if [ -z "$testtype" ]; then # exit if there is no -Q checks + echo "$OUTPUT" + exit "$exitstatus" + fi +else # no cuos check is need + if [ "$DEBUG" == 'yes' ]; then + echo "No printer check required. Checking the queue ..." + fi +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 when using a test type of 'b'" + print_usage + exitstatus="$STATE_UNKNOWN" + exit "$exitstatus" +else + if [ "$DEBUG" == 'yes' ]; then + echo "Testing queue on $hostname ..." + fi + 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" | cut -c50-73) + # 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" diff --git a/monitoring-plugins.obsinfo b/monitoring-plugins.obsinfo new file mode 100644 index 0000000..5f6c1ec --- /dev/null +++ b/monitoring-plugins.obsinfo @@ -0,0 +1,5 @@ +name: monitoring-plugins +version: 2.3~alpha.20200520T233014.cadac85e +mtime: 1590010214 +commit: cadac85e12d48d662ff39bfc9f5feb5601af1485 + diff --git a/monitoring-plugins.spec b/monitoring-plugins.spec new file mode 100644 index 0000000..166d41c --- /dev/null +++ b/monitoring-plugins.spec @@ -0,0 +1,1701 @@ +# +# spec file for package monitoring-plugins +# +# Copyright (c) 2021 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: monitoring-plugins +Version: 2.3.5 +Release: 0 +Summary: The Monitoring Plug-Ins +License: GPL-2.0-or-later AND GPL-3.0-only +Group: System/Monitoring +URL: http://monitoring-plugins.org/ +Source0: %{name}-%{version}.tar.gz +Source1: %{name}-rpmlintrc +Source2: %{name}-%{version}.tar.gz.sha1 +Source11: %{name}-permissions +Source12: %{name}-README.SUSE +Source13: %{name}-README.SUSE-check_dhcp +Source14: %{name}-README.SUSE-check_icmp +Source15: %{name}-README.SUSE-check_ide_smart +Source16: usr.lib.nagios.plugins.check_dhcp +Source17: usr.lib.nagios.plugins.check_ntp_time +Source18: %{name}.check_cups.sh +Source19: usr.lib.nagios.plugins.check_cups +Source20: %{name}-README.SUSE-check_cups +Source22: usr.lib.nagios.plugins.check_ping +Source23: usr.lib.nagios.plugins.check_icmp +Source24: usr.lib.nagios.plugins.check_ide_smart +Source25: usr.lib.nagios.plugins.check_ssh +Source26: check_ircd_ssl +Source27: %{name}-README-extra-opts +Source28: %{name}-README.SUSE-check_ping +Source29: %{name}-README.SUSE-check_ntp_time +Source30: usr.lib.nagios.plugins.check_disk +Source31: usr.lib.nagios.plugins.check_load +Source32: usr.lib.nagios.plugins.check_procs +Source33: usr.lib.nagios.plugins.check_swap +Source34: usr.lib.nagios.plugins.check_users +Source35: usr.lib.nagios.plugins.check_procs.sle15 +Source50: nrpe-check_mailq +Source51: nrpe-check_load +Source52: nrpe-check_ntp_time +Source53: nrpe-check_swap +Source54: nrpe-check_partition +Source55: nrpe-check_proc_cron +Source56: nrpe-check_total_procs +Source57: nrpe-check_users +Source58: nrpe-check_zombie_procs +Source59: nrpe-check_mysql +Source60: nrpe-check_ups +# PATH-FIX-openSUSE - do not use/run chown in Makefile: we use RPM for this +Patch6: %{name}-2.3.3-root-plugins-Makefile_-_no_chown.patch +# PATCH-FIX-UPSTREAM see https://bugzilla.redhat.com/512559 +Patch121: %{name}-2.3.3-wrong_percent_in_check_swap.patch +# PATCH-FIX-UPSTREAM - return ntp offset absolute (as positive value) in performance data since warn and crit are also positive values +Patch122: %{name}-2.3.3-check_ntp_perf_absolute.patch +# PATCH-FIX-UPSTREAM - see https://github.com/monitoring-plugins/monitoring-plugins/pull/1322 +Patch125: monitoring-plugins-2.3.3-check_ssh.patch +Patch126: monitoring-plugins-2.3.3-check_ssh.t_-_improve_testing.patch +Patch128: monitoring-plugins-2.3.3-check_disk_on_btrfs.patch +# PATCH-FIX-UPSTREAM - see https://github.com/monitoring-plugins/monitoring-plugins/pull/1774 +Patch129: monitoring-plugins-2.3.3-check_by_ssh.patch +BuildRequires: bind-utils +BuildRequires: dhcp-devel +BuildRequires: fping +%if 0%{?suse_version} +PreReq: permissions +%endif +BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: autoconf +BuildRequires: automake +%if 0%{?suse_version} > 1599 +BuildRequires: coreutils-systemd +%endif +BuildRequires: iputils +BuildRequires: libdbi-devel +BuildRequires: pkgconfig(smbclient) +BuildRequires: libtool +BuildRequires: mysql-devel +BuildRequires: nagios-rpm-macros +BuildRequires: net-snmp-devel +BuildRequires: openldap2-devel +BuildRequires: openssh +BuildRequires: openssl-devel +%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version} +BuildRequires: net-snmp-perl +BuildRequires: net-snmp-utils +%else +BuildRequires: perl(Net::SNMP) +%endif +BuildRequires: postfix +BuildRequires: postgresql-devel +BuildRequires: procps +%if 0%{?suse_version} > 1599 +BuildRequires: systemd-devel +%endif +BuildRequires: samba-client +%if 0%{?suse_version} +%if 0%{?suse_version} > 1020 +BuildRequires: freeradius-client-devel +BuildRequires: rpcbind +%else +BuildRequires: portmap +BuildRequires: radiusclient +%endif +%if 0%{?suse_version} > 910 +BuildRequires: krb5-devel +%else +BuildRequires: heimdal-devel +%endif +%else +BuildRequires: krb5-devel +%endif +# recommend the old, included checks to allow an easy update - but +# also allow users to deselect some of the new sub-packages +%if 0%{?suse_version} +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 +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 +Suggests: %{name}-nagios +%ifnarch ppc ppc64 sparc sparc64 s390 s390x +Recommends: %{name}-sensors +%endif +Recommends: %{name}-smtp +Recommends: %{name}-ssh +Recommends: %{name}-swap +Recommends: %{name}-tcp +Recommends: %{name}-time +Recommends: %{name}-ups +Recommends: %{name}-users +Recommends: %{name}-wave +Suggests: %{name}-cups +Obsoletes: nagios-plugins <= %{version} +Provides: nagios-plugins = 1.5 +%endif +%define apt_get_command %{_bindir}/apt-get +%define qstat_command %{_bindir}/qstat +%if ! 0%{?suse_version} +%define _libexecdir %{nagios_plugindir} +%endif + +%description +The actual service checks on current monitoring solutions like Icinga, +Nagios or Shinken (just to name a few) are performed by separate +"plugin" programs which return the status of the checks to the +running daemon. + +This package contains those plugins. + +%package extras +Summary: Plug-Ins which depend on additional packages +Group: System/Monitoring +Requires: %{name}-common = %{version} +%if 0%{?suse_version} +Recommends: %{name}-fping +Recommends: %{name}-hpjd +Recommends: %{name}-ldap +Recommends: %{name}-mssql +Recommends: %{name}-mysql +Recommends: %{name}-pgsql +Recommends: %{name}-snmp +Suggests: %{name}-apt +Suggests: %{name}-game +%endif +Provides: nagios-plugins-extras = %{version} +Obsoletes: nagios-plugins-extras <= 1.5 + +%description extras +These are additional monitoring checks that require additional packages +which have to be installed. + +%package all +Summary: All Monitoring-Plugin checks +Group: System/Monitoring +%if 0%{?suse_version} +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}-dbi-mysql +Recommends: %{name}-dbi-pgsql +Recommends: %{name}-dbi-sqlite3 +Recommends: %{name}-dhcp +Recommends: %{name}-dig +Recommends: %{name}-disk +Recommends: %{name}-disk_smb +Recommends: %{name}-diskio +Recommends: %{name}-dns +Recommends: %{name}-dummy +Recommends: %{name}-file_age +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}-mailq +Recommends: %{name}-maintenance +Recommends: %{name}-mem +Recommends: %{name}-mrtg +Recommends: %{name}-mrtgtraf +Recommends: %{name}-mssql +Recommends: %{name}-mysql +Recommends: %{name}-mysql_health +Recommends: %{name}-nagios +Recommends: %{name}-nfsmounts +Recommends: %{name}-nis +Recommends: %{name}-nt +Recommends: %{name}-ntp_peer +Recommends: %{name}-ntp_time +Recommends: %{name}-nwstat +Recommends: %{name}-oracle +Recommends: %{name}-overcr +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 +%endif +Provides: nagios-plugins-all = %{version} +Obsoletes: nagios-plugins-all <= 1.5 +%if 0%{?suse_version} +%ifnarch ppc ppc64 sparc sparc64 s390 s390x +Recommends: %{name}-sensors +%endif +Recommends: %{name}-smtp +Recommends: %{name}-snmp +Recommends: %{name}-ssh +Recommends: %{name}-swap +Recommends: %{name}-tcp +Recommends: %{name}-time +Recommends: %{name}-ups +Recommends: %{name}-ups_alarm +Recommends: %{name}-uptime +Recommends: %{name}-users +Recommends: %{name}-wave +Recommends: %{name}-zypper +Recommends: nagios-xen-host +%endif + +%description all +This virtual package recommends all currently available, official +Monitoring plugins and additional packages that are available in +https://build.opensuse.org/project/show/server:monitoring + +%if 0%{?suse_version} < 01310 +%package apt +Summary: Check for software updates via apt-get +Group: System/Monitoring +Requires: %{apt_get_command} +Provides: nagios-plugins-apt = %{version} +Obsoletes: nagios-plugins-apt <= 1.5 + +%description apt +This plugin checks for software updates on systems that use package management +systems based on the apt-get command found in Debian GNU/Linux or Ubuntu for +example. +%endif + +%package breeze +Summary: Monitor Breezecom wireless equipment +Group: System/Monitoring +Requires: %{name}-common = %{version} +Requires: net-snmp +Requires: perl +Provides: nagios-plugins-breeze = %{version} +Obsoletes: nagios-plugins-breeze <= 1.5 + +%description breeze +This plugin reports the signal strength of a Breezecom wireless equipment. + +%package by_ssh +Summary: Execute checks via SSH +Group: System/Monitoring +Requires: openssh +Provides: nagios-plugins-by_ssh = %{version} +Obsoletes: nagios-plugins-by_ssh <= 1.5 + +%description by_ssh +This plugin uses SSH to execute commands on a remote host. + +The most common mode of use is to refer to a local identity file with +the '-i' option. In this mode, the identity pair should have a null +passphrase and the public key should be listed in the authorized_keys +file of the remote host. Usually the key will be restricted to running +only one command on the remote server. If the remote SSH server tracks +invocation arguments, the one remote program may be an agent that can +execute additional commands as proxy. + +%package cluster +Summary: Host/Service Cluster Plugin +Group: System/Monitoring +Provides: nagios-plugins-cluster = %{version} +Obsoletes: nagios-plugins-cluster <= 1.5 + +%description cluster +Provides the check_cluster plugin to check Services and/or Hosts running +as a cluster. + +Example: + check_cluster -s -d 2,0,2,0 -c @3: +Will alert critical if there are 3 or more service data points in a non-OK +state. + +%package common +Summary: Libraries for Nagios plugins +Group: System/Monitoring +Provides: nagios-plugins-common = %{version} +Obsoletes: nagios-plugins-common <= 1.5 + +%description common +This package includes the libraries (scripts) that are included by many +of the standard checks. + +%package dbi +Summary: Check databases using DBI +Group: System/Monitoring +Requires: %{name}-dbi_backend >= %{version} +Provides: nagios-plugins-dbi = %{version} +Obsoletes: nagios-plugins-dbi <= 1.5 + +%description dbi +This program connects to an (SQL) database using DBI and checks the +specified metric against threshold levels. The default metric is +the result of the specified query. + +This package provides the check_dbi plugin. + +%package dbi-mysql +Summary: Check MySQL/MariaDB database using DBI +Group: System/Monitoring +Requires: %{name}-dbi >= %{version} +Requires: libdbi-drivers-dbd-mysql +Provides: nagios-plugins-dbi-mysql = %{version} +Obsoletes: nagios-plugins-dbi-mysql <= 1.5 +Provides: %{name}-dbi_backend = %{version} + +%description dbi-mysql +This program connects to an (SQL) database using DBI and checks the +specified metric against threshold levels. The default metric is +the result of the specified query. + +This virtual package requires the needed libraries for check_dbi to work +with a MySQL/MariaDB database. + +%package dbi-pgsql +Summary: Check PostgreSQL database using DBI +Group: System/Monitoring +Requires: %{name}-dbi >= %{version} +Requires: libdbi-drivers-dbd-pgsql +Provides: nagios-plugins-dbi-pgsql = %{version} +Obsoletes: nagios-plugins-dbi-pgsql <= 1.5 +Provides: %{name}-dbi_backend = %{version} + +%description dbi-pgsql +This program connects to an (SQL) database using DBI and checks the +specified metric against threshold levels. The default metric is +the result of the specified query. + +This virtual package requires the needed libraries for check_dbi to work +with a PostgreSQL database + +%package dbi-sqlite3 +Summary: Check SQlite3 database using DBI +Group: System/Monitoring +Requires: %{name}-dbi >= %{version} +Requires: libdbi-drivers-dbd-sqlite3 +Provides: nagios-plugins-dbi-sqlite3 = %{version} +Obsoletes: nagios-plugins-dbi-sqlite3 <= 1.5 +Provides: %{name}-dbi_backend = %{version} + +%description dbi-sqlite3 +This program connects to an (SQL) database using DBI and checks the +specified metric against threshold levels. The default metric is +the result of the specified query. + +This virtual package requires the needed libraries for check_dbi to work +with a SQlite database. + +%package dhcp +Summary: Check DHCP servers +Group: System/Monitoring +Provides: nagios-plugins-dhcp = %{version} +Obsoletes: nagios-plugins-dhcp <= 1.5 +%if 0%{?suse_version} +Recommends: apparmor-parser +Recommends: apparmor-profiles +%else +#Requires: apparmor-parser +#Requires: apparmor-profiles +%endif + +%description dhcp +This plugin tests the availability of DHCP servers on a network. + +Please read +/usr/share/doc/packages/monitoring-plugins-dhcp/README.SUSE-check_dhcp +for details how to setup this check. + +%package dig +Summary: Test DNS service via dig +Group: System/Monitoring +Requires: %{_bindir}/dig +Provides: nagios-plugins-dig = %{version} +Obsoletes: nagios-plugins-dig <= 1.5 + +%description dig +This plugin test the DNS service on the specified host using dig. + +%package disk +Summary: Check disk space +Group: System/Monitoring +Provides: nagios-plugins-disk = %{version} +Obsoletes: nagios-plugins-disk <= 1.5 + +%description disk +This plugin checks the amount of used disk space on a mounted file system and +generates an alert if free space is less than one of the threshold values. + +%package disk_smb +Summary: Check SMB Disk +Group: System/Monitoring +Requires: %{name}-common = %{version} +Requires: perl +Provides: nagios-plugins-disk_smb = %{version} +Obsoletes: nagios-plugins-disk_smb <= 1.5 + +%description disk_smb +Check the amount of used disk space on a remote Samba or Windows share and +generate an alert if free space is less than one of the threshold values. + +%package dns +Summary: Obtain the IP address for a given host/domain +Group: System/Monitoring +Requires: %{_bindir}/nslookup +Provides: nagios-plugins-dns = %{version} +Obsoletes: nagios-plugins-dns <= 1.5 + +%description dns +This plugin uses the nslookup program to obtain the IP address for the given +host/domain query. + +An optional DNS server to use may be specified. If no DNS server is specified, +the default server(s) specified in /etc/resolv.conf will be used. + +%package dummy +Summary: Dummy check +Group: System/Monitoring +Provides: nagios-plugins-dummy = %{version} +Obsoletes: nagios-plugins-dummy <= 1.5 + +%description dummy +This plugin will simply return the state corresponding to the numeric value of +the argument with optional text. + +%package file_age +Summary: Check the age/size of files +Group: System/Monitoring +Requires: %{name}-common = %{version} +Requires: perl +Provides: nagios-plugins-file_age = %{version} +Obsoletes: nagios-plugins-file_age <= 1.5 + +%description file_age +This plugin will check either the age of files or their size. + +%package flexlm +Summary: Check flexlm license managers +Group: System/Monitoring +Requires: %{name}-common = %{version} +Requires: perl +Provides: nagios-plugins-flexlm = %{version} +Obsoletes: nagios-plugins-flexlm <= 1.5 + +%description flexlm +Flexlm license managers usually run as a single server or three servers and a +quorum is needed. The plugin return OK if 1 (single) or 3 (triple) servers +are running, CRITICAL if 1(single) or 3 (triple) servers are down, and WARNING +if 1 or 2 of 3 servers are running. + +%package fping +Summary: Fast ping check +Group: System/Monitoring +Requires: fping +Provides: nagios-plugins-fping = %{version} +Obsoletes: nagios-plugins-fping <= 1.5 + +%description fping +This plugin will use the fping command to ping the specified host for +a fast check. Note that it is necessary to set the suid flag on fping. + +%if 0%{?suse_version} < 01310 +%package game +Summary: Gameserver check +Group: System/Monitoring +Requires: %{qstat_command} +Provides: nagios-plugins-game = %{version} +Obsoletes: nagios-plugins-game <= 1.5 + +%description game +Check connections to game servers. This plugin uses the 'qstat' command, the +popular game server status query tool. +%endif + +%package hpjd +Summary: Check status of an HP printer +Group: System/Monitoring +Requires: net-snmp +Provides: nagios-plugins-hpjd = %{version} +Obsoletes: nagios-plugins-hpjd <= 1.5 + +%description hpjd +This plugin tests the STATUS of an HP printer with a JetDirect card. + +%package http +Summary: Test the HTTP service on the specified host +Group: System/Monitoring +Provides: nagios-plugins-http = %{version} +Obsoletes: nagios-plugins-http <= 1.5 + +%description http +This plugin tests the HTTP service on the specified host. It can test +normal (http) and secure (https) servers, follow redirects, search for +strings and regular expressions, check connection times, and report on +certificate expiration times. + +%package icmp +Summary: Send ICMP packets to the specified host +Group: System/Monitoring +Provides: nagios-plugins-icmp = %{version} +Obsoletes: nagios-plugins-icmp <= 1.5 + +%description icmp +This plugin sends ICMP (ping) packets to the specified host. You can +specify different RTA factors and acceptable packet loss. + +Please read +/usr/share/doc/packages/monitoring-plugins-icmp/README.SUSE-check_icmp +for details how to setup this check. + +%package ide_smart +Summary: Check local hard drive +Group: System/Monitoring +Provides: nagios-plugins-ide_smart = %{version} +Obsoletes: nagios-plugins-ide_smart <= 1.5 + +%description ide_smart +This plugin checks a local hard drive with the (Linux specific) SMART +interface. + +Please read +/usr/share/doc/packages/monitoring-plugins-ide_smart/README.SUSE-check_ide_smart +for details how to setup this check. + +%package ifoperstatus +Summary: Monitor network interfaces +Group: System/Monitoring +Requires: %{name}-common = %{version} +%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version} +Requires: net-snmp-perl +Requires: net-snmp-utils +%else +Requires: perl(Net::SNMP) +%endif +Provides: nagios-plugins-ifoperstatus = %{version} +Obsoletes: nagios-plugins-ifoperstatus <= 1.5 + +%description ifoperstatus +This plugin monitors operational status of a particular network interface on +the target host. + +%package ifstatus +Summary: Monitor operational status network interfaces +Group: System/Monitoring +Requires: %{name}-common = %{version} +%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version} +Requires: net-snmp-perl +Requires: net-snmp-utils +%else +Requires: perl(Net::SNMP) +%endif +Provides: nagios-plugins-ifstatus = %{version} +Obsoletes: nagios-plugins-ifstatus <= 1.5 + +%description ifstatus +This plugin monitors operational status of each network interface on the target +host. + +%package ircd +Summary: Check an IRCd server +Group: System/Monitoring +Requires: %{name}-common = %{version} +Requires: perl +Requires: perl(IO::Socket::IP) +Requires: perl(IO::Socket::SSL) +Provides: nagios-plugins-ircd = %{version} +Obsoletes: nagios-plugins-ircd <= 1.5 + +%description ircd +Monitor the status of an Internet Relay Chat daemon (IRCd) with this check. + +%package ldap +Summary: Test a LDAP server +Group: System/Monitoring +Provides: nagios-plugins-ldap = %{version} +Obsoletes: nagios-plugins-ldap <= 1.5 + +%description ldap +Monitor access to a Lightweight Directory Access Protocol (LDAP) server. + +This package includes the 'check_ldap' and 'check_ldaps' plugins. + +%package load +Summary: Test the current system load average +Group: System/Monitoring +Provides: nagios-plugins-load = %{version} +Obsoletes: nagios-plugins-load <= 1.5 +%if 0%{?suse_version} > 1599 +Requires: coreutils-systemd +%endif + +%description load +This plugin tests the current system load average. + +%package log +Summary: Log file pattern detector +Group: System/Monitoring +Requires: %{name}-common = %{version} +Provides: nagios-plugins-log = %{version} +Obsoletes: nagios-plugins-log <= 1.5 +Recommends: syslog + +%description log +This plugin provides a log file pattern detector - excluding old +logfile entries and searching for the given query. + +%package mailq +Summary: Check mail queues +Group: System/Monitoring +Requires: %{name}-common = %{version} +Requires: perl +Provides: nagios-plugins-mailq = %{version} +Obsoletes: nagios-plugins-mailq <= 1.5 +%if 0%{?suse_version} +Requires: smtp_daemon +%endif + +%description mailq +This plugin checks the number of messages in the mail queue (supports multiple +sendmail queues, qmail). + +%package mrtg +Summary: Check average or maximum value in an MRTG logfile +Group: System/Monitoring +%if 0%{?suse_version} +Recommends: mrtg +%endif +Provides: nagios-plugins-mrtg = %{version} +Obsoletes: nagios-plugins-mrtg <= 1.5 + +%description mrtg +This plugin will check either the average or maximum value of one of the +two variables recorded in an MRTG log file. + +%package mrtgtraf +Summary: Check incoming/outgoing transfer rates of a router +Group: System/Monitoring +%if 0%{?suse_version} +Recommends: mrtg +%endif +Provides: nagios-plugins-mrtgtraf = %{version} +Obsoletes: nagios-plugins-mrtgtraf <= 1.5 + +%description mrtgtraf +This plugin will check the incoming/outgoing transfer rates of a router, +switch, etc recorded in an MRTG log. If the newest log entry is older +than , a WARNING status is returned. If either the +incoming or outgoing rates exceed the or thresholds (in +Bytes/sec), a CRITICAL status results. If either of the rates exceed +the or thresholds (in Bytes/sec), a WARNING status results. + +%package mssql +Summary: MS-SQL server or Sybase server query check +Group: System/Monitoring +Requires: perl(DBI) +Requires: perl(DBD::Sybase) +Requires: perl(Getopt::Long) +Requires: perl(FindBin) +Requires: perl + +%description mssql +This plugin runs a query against a MS-SQL server or Sybase server and returns +the first row. It returns an error if no responses are running. Row is passed +to perfdata in semicolon delimited format. +A simple sql statement like \"select getdate()\" verifies server responsiveness. + +%package mysql +Summary: Test a MySQL DBMS +Group: System/Monitoring +Provides: nagios-plugins-mysql = %{version} +Obsoletes: nagios-plugins-mysql <= 1.5 +Provides: monitoring-plugins-mysql_query = %{version}-%{release} + +%description mysql +This plugin tests a MySQL DBMS to determine whether it is active and +accepting queries. It provides the two checks: 'check_mysql' and +'check_mysql_query'. + +%package nagios +Summary: Check nagios server +Group: System/Monitoring +Requires: monitoring_daemon +Provides: nagios-plugins-nagios = %{version} +Obsoletes: nagios-plugins-nagios <= 1.5 + +%description nagios +This plugin checks the status of the Nagios process on the local machine. The +plugin will check to make sure the Nagios status log is no older than the +number of minutes specified by the expires option. + +It also checks the process table for a process matching the command argument. + +%package nt +Summary: Collect data from NSClient service +Group: System/Monitoring +Provides: nagios-plugins-nt = %{version} +Obsoletes: nagios-plugins-nt <= 1.5 + +%description nt +This plugin collects data from the NSClient service running on a +Windows NT/2000/XP/2003 server. + +%package ntp_peer +Summary: Check health of an NTP server +Group: System/Monitoring +Provides: nagios-plugins-ntp_peer = %{version} +Obsoletes: nagios-plugins-ntp_peer <= 1.5 + +%description ntp_peer +Use this plugin to check the health of an NTP server. It supports +checking the offset with the sync peer, the jitter and stratum. + +This plugin will not check the clock offset between the local host and NTP +server; please use check_ntp_time for that purpose. + +%package ntp_time +Summary: Check clock offset with the ntp server +Group: System/Monitoring +Provides: nagios-plugins-ntp_time = %{version} +Obsoletes: nagios-plugins-ntp_time <= 1.5 +Provides: %{name}-ntp = %{version} +%if 0%{?suse_version} +Recommends: apparmor-parser +Recommends: apparmor-profiles +%else +#Requires: apparmor-parser +#Requires: apparmor-profiles +%endif + +%description ntp_time +This plugin checks the clock offset between the local host and a remote NTP +server. It is independent of any commandline programs or external libraries. + +%package nwstat +Summary: Check MRTGEXT NLM running +Group: System/Monitoring +Provides: nagios-plugins-nwstat = %{version} +Obsoletes: nagios-plugins-nwstat <= 1.5 + +%description nwstat +This plugin attempts to contact the MRTGEXT NLM running on a Novell server to +gather the requested system information. + +%package oracle +Summary: Check Oracle status +Group: System/Monitoring +Requires: %{name}-common = %{version} +Provides: nagios-plugins-oracle = %{version} +Obsoletes: nagios-plugins-oracle <= 1.5 + +%description oracle +Check Oracle database health status. + +%package overcr +Summary: Check Over-CR collector daemon +Group: System/Monitoring +Provides: nagios-plugins-overcr = %{version} +Obsoletes: nagios-plugins-overcr <= 1.5 + +%description overcr +This plugin attempts to contact the Over-CR collector daemon running on the +remote UNIX server in order to gather the requested system information. + +%package pgsql +Summary: Test a PostgreSQL DBMS +Group: System/Monitoring +Provides: nagios-plugins-pgsql = %{version} +Obsoletes: nagios-plugins-pgsql <= 1.5 + +%description pgsql +This plugin tests a PostgreSQL DBMS to determine whether it is active and +accepting queries. It provides the check 'check_pgsql'. + +%package ping +Summary: Check connection statistics +Group: System/Monitoring +Requires: iputils +Provides: nagios-plugins-ping = %{version} +Obsoletes: nagios-plugins-ping <= 1.5 + +%description ping +Use ping to check connection statistics for a remote host. + +This plugin uses the ping command to probe the specified host for packet loss +(percentage) and round trip average (milliseconds). + +%package procs +Summary: Check processes +Group: System/Monitoring +Provides: nagios-plugins-procs = %{version} +Obsoletes: nagios-plugins-procs <= 1.5 +Provides: monitoring-plugins-procs_perf = %{version} +Obsoletes: monitoring-plugins-procs_perf < %{version} + +%description procs +This plugin checks the number of currently running processes and generates +WARNING or CRITICAL states if the process count is outside the specified +threshold ranges. + +The process count can be filtered by process owner, parent process PID, current +state (e.g., 'Z'), or may be the total number of running processes. + +%if 0%{?suse_version} +%package radius +Summary: Test RADIUS server +Group: System/Monitoring +Provides: nagios-plugins-radius = %{version} +Obsoletes: nagios-plugins-radius <= 1.5 + +%description radius +This plugin tests a RADIUS server to see if it is accepting connections. The +server to test must be specified in the invocation, as well as a user name and +password. A configuration file may also be present. The format of the +configuration file is described in the radiusclient library sources. The +password option presents a substantial security issue because the password can +possibly be determined by careful watching of the command line in a process +listing. This risk is exacerbated because nagios will run the plugin at regular +predictable intervals. Please be sure that the password used does not allow +access to sensitive system resources. +%endif + +%package real +Summary: Test REAL service +Group: System/Monitoring +Provides: nagios-plugins-real = %{version} +Obsoletes: nagios-plugins-real <= 1.5 + +%description real +This plugin will attempt to open an RTSP connection with the host. Successul +connects return STATE_OK, refusals and timeouts return STATE_CRITICAL, other +errors return STATE_UNKNOWN. Successful connects, but incorrect reponse +messages from the host result in STATE_WARNING return values. + +%package rpc +Summary: Check RPC service +Group: System/Monitoring +Requires: %{name}-common = %{version} +Requires: perl +Requires: rpcbind +Provides: nagios-plugins-rpc = %{version} +Obsoletes: nagios-plugins-rpc <= 1.5 + +%description rpc +Check if a rpc service is registered and running using rpcinfo. + +%ifnarch ppc ppc64 sparc sparc64 s390 s390x +%package sensors +Summary: Check hardware status using lm_sensors +Group: System/Monitoring +Requires: %{name}-common = %{version} +Requires: grep +Requires: sensors +Provides: nagios-plugins-sensors = %{version} +Obsoletes: nagios-plugins-sensors <= 1.5 + +%description sensors +This plugin checks hardware status using the lm_sensors package. +%endif + +%package smtp +Summary: Check SMTP connections +Group: System/Monitoring +Provides: nagios-plugins-smtp = %{version} +Obsoletes: nagios-plugins-smtp <= 1.5 + +%description smtp +This plugin will attempt to open an SMTP connection with the given host. + +%package snmp +Summary: SNMP monitoring +Group: System/Monitoring +Requires: net-snmp +Provides: nagios-plugins-snmp = %{version} +Obsoletes: nagios-plugins-snmp <= 1.5 + +%description snmp +The Simple Network Management Protocol (SNMP) can be used to monitor +network-attached devices for conditions that warrant administrative attention. + +This package includes the 'check_snmp' plugin for Nagios or Icinga. + +%package ssh +Summary: Check SSH service +Group: System/Monitoring +Provides: nagios-plugins-ssh = %{version} +Obsoletes: nagios-plugins-ssh <= 1.5 + +%description ssh +Try to connect to an SSH server at specified server and port. + +%package swap +Summary: Check swap space +Group: System/Monitoring +Provides: nagios-plugins-swap = %{version} +Obsoletes: nagios-plugins-swap <= 1.5 + +%description swap +Check swap space on local machine. + +%package tcp +Summary: Tests TCP and UDP connections +Group: System/Monitoring +Provides: nagios-plugins-tcp = %{version} +Obsoletes: nagios-plugins-tcp <= 1.5 +Provides: %{name}-clamd = %{version} +Provides: nagios-plugins-clamd = %{version} +Obsoletes: nagios-plugins-clamd <= 1.5 +Provides: %{name}-ftp = %{version} +Provides: nagios-plugins-ftp = %{version} +Obsoletes: nagios-plugins-ftp <= 1.5 +Provides: %{name}-imap = %{version} +Provides: nagios-plugins-imap = %{version} +Obsoletes: nagios-plugins-imap <= 1.5 +Provides: %{name}-jabber = %{version} +Provides: nagios-plugins-jabber = %{version} +Obsoletes: nagios-plugins-jabber <= 1.5 +Provides: %{name}-nntp = %{version} +Provides: nagios-plugins-nntp = %{version} +Obsoletes: nagios-plugins-nntp <= 1.5 +Provides: %{name}-nntps = %{version} +Provides: nagios-plugins-nntps = %{version} +Obsoletes: nagios-plugins-nntps <= 1.5 +Provides: %{name}-pop = %{version} +Provides: nagios-plugins-pop = %{version} +Obsoletes: nagios-plugins-pop <= 1.5 +Provides: %{name}-simap = %{version} +Provides: nagios-plugins-simap = %{version} +Obsoletes: nagios-plugins-simap <= 1.5 +Provides: %{name}-spop = %{version} +Provides: nagios-plugins-spop = %{version} +Obsoletes: nagios-plugins-spop <= 1.5 +Provides: %{name}-ssmtp = %{version} +Provides: nagios-plugins-ssmtp = %{version} +Obsoletes: nagios-plugins-ssmtp <= 1.5 +Provides: %{name}-udp = %{version} +Provides: nagios-plugins-udp = %{version} +Obsoletes: nagios-plugins-udp <= 1.5 + +%description tcp +This plugin tests TCP connections with the specified host (or unix socket). + +This package contains the following checks: +* check_clamd +* check_ftp +* check_imap +* check_jabber +* check_nntp +* check_nntps +* check_pop +* check_simap +* check_spop +* check_ssmtp +* check_tcp +* check_udp + +%package time +Summary: Check the time on the specified host +Group: System/Monitoring +Provides: nagios-plugins-time = %{version} +Obsoletes: nagios-plugins-time <= 1.5 + +%description time +This plugin will check the time on the specified host. + +%package ups +Summary: Test UPS service on the specified host +Group: System/Monitoring +Provides: nagios-plugins-ups = %{version} +Obsoletes: nagios-plugins-ups <= 1.5 + +%description ups +This plugin tests the UPS service on the specified host. + +Network UPS Tools from www.networkupstools.org must be running for this plugin +to work. + +%package uptime +Summary: Test the uptime of the system +Group: System/Monitoring +Provides: nagios-plugins-ups = %{version} +Obsoletes: nagios-plugins-ups <= 1.5 + +%description uptime +This plugin tests the uptime on the system using /proc/uptime + +%package users +Summary: Check number of users currently logged in +Group: System/Monitoring +Provides: nagios-plugins-users = %{version} +Obsoletes: nagios-plugins-users <= 1.5 + +%description users +This plugin checks the number of users currently logged in on the local system +and generates an error if the number exceeds the thresholds specified. + +%package wave +Summary: Check wave signal strength +Group: System/Monitoring +Requires: %{name}-common = %{version} +Requires: net-snmp +Requires: perl +Provides: nagios-plugins-wave = %{version} +Obsoletes: nagios-plugins-wave <= 1.5 + +%description wave +Check the wave signal strength via SNMP. + +%package cups +Summary: Check cups service +Group: System/Monitoring +Requires: cups-client +Provides: nagios-plugins-cups = %{version} +Obsoletes: nagios-plugins-cups <= 1.5 + +%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 +%if 0%{?suse_version} +mkdir -p example/permissions.d +cp %{S:11} example/permissions.d/%{name} +%endif +cp %{S:12} ./README.SUSE +cp %{S:13} ./README.SUSE-check_dhcp +cp %{S:14} ./README.SUSE-check_icmp +cp %{S:15} ./README.SUSE-check_ide_smart +cp %{S:20} ./README.SUSE-check_cups +rm plugins-scripts/check_ircd.pl +install -m0644 %{S:26} plugins-scripts/check_ircd.pl +cp %{S:28} ./README.SUSE-check_ping +cp %{S:29} ./README.SUSE-check_ntp_time + +for extension in mysql pgsql sqlite3 ; do +cat >> README.SUSE-dbi-$extension << EOF +This program connects to an (SQL) database using DBI and checks the +specified metric against threshold levels. The default metric is +the result of the specified query. + +This virtual package requires the needed libraries for check_dbi to work +with the libdbi driver for $extension. +EOF +done + +%patch6 -p1 +# Debian patches +%patch121 -p1 +%patch122 -p1 +# Github patches +%patch125 -p1 +%patch126 -p1 +%patch128 -p1 +%patch129 -p1 +find -type f -exec chmod 644 {} + + +%build +export CFLAGS="%{optflags} -fno-strict-aliasing -DLDAP_DEPRECATED" +gettextize -f --no-changelog +autoreconf -fi +chmod a+x NP-VERSION-GEN +chmod +x configure # needed as configure script is not executable in 1.5.. +%configure \ + --enable-static=no \ + --enable-extra-opts \ + --libexecdir=%{nagios_plugindir} \ + --sysconfdir=%{nagios_sysconfdir} \ + --with-apt-get-command=%{apt_get_command} \ + --with-cgiurl=/nagios/cgi-bin \ + --with-fping-command=%{_sbindir}/fping \ + --with-fping6-command=%{_sbindir}/fping6 \ + --with-ipv6 \ + --with-ntpq-command=%{_sbindir}/ntpq \ + --with-ntpdc-command=%{_sbindir}/ntpdc \ + --with-ntpdate-command=%{_sbindir}/ntpdate \ + --with-openssl=%{_prefix} \ + --with-perl=%{_bindir}/perl \ + --with-pgsql=%{_prefix} \ + --with-ping6-command='/bin/ping6 -n -U -w %d -c %d %s' \ + --with-proc-loadavg=/proc/loadavg \ + --with-ps-command="/bin/ps axwo 'stat uid pid ppid vsz rss pcpu etime comm args'" \ + --with-ps-format='%s %d %d %d %d %d %f %s %s %n' \ + --with-ps-cols=10 \ + --with-ps-varlist='procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procetime,procprog,&pos' \ +%if 0%{?suse_version} > 1300 + --with-rpcinfo-command=/sbin/rpcinfo \ +%else + --with-rpcinfo-command=%{_sbindir}/rpcinfo \ +%endif + --with-qstat-command=%{qstat_command} \ + --with-mysql=%{_prefix} \ + --disable-rpath +make all %{?_smp_mflags} + +%install +sed -i 's,^MKINSTALLDIRS.*,MKINSTALLDIRS = ../mkinstalldirs,' po/Makefile +%make_install install-root +install -m 0755 %{S:18} %{buildroot}%{nagios_plugindir}/check_cups +# provide check_host and check_rta_multi as on Debian +if [ -x %{buildroot}%{nagios_plugindir}/check_icmp ] ; then + test -f %{buildroot}%{nagios_plugindir}/check_host && rm -f %{buildroot}%{nagios_plugindir}/check_host + test -f %{buildroot}%{nagios_plugindir}/check_rta_multi && rm -f %{buildroot}%{nagios_plugindir}/check_rta_multi + ln -s %{nagios_plugindir}/check_icmp %{buildroot}%{nagios_plugindir}/check_host ; + ln -s %{nagios_plugindir}/check_icmp %{buildroot}%{nagios_plugindir}/check_rta_multi ; +fi +# Factory maintainers do not want packages requiring software not in Factory: remove the checks +%if 0%{?suse_version} >= 01310 +rm %{buildroot}%{nagios_plugindir}/check_apt +rm %{buildroot}%{nagios_plugindir}/check_game +%endif + +# fix "use lib" on installed perl checks +pushd %{buildroot}%{nagios_plugindir} +for file in $(find -maxdepth 1 -type f); do + sed -i 's|use lib "nagios/plugins".*;|use lib "%{nagios_plugindir}";|g; + s|use lib "/usr/local/nagios/libexec".*;|use lib "%{nagios_plugindir}";|g' $file +done +popd +# check_sensors makes no sense on some archs +%ifarch ppc ppc64 sparc sparc64 s390 s390x +rm -f %{buildroot}/%{nagios_plugindir}/check_sensors +%endif +# provie procs_perf symlink for compatibility +ln -s %{nagios_plugindir}/check_procs %{buildroot}%{nagios_plugindir}/check_procs_perf +# install Apparmor profiles +mkdir -p %{buildroot}%{_sysconfdir}/apparmor.d/ +install -m 644 %{SOURCE16} %{buildroot}%{_sysconfdir}/apparmor.d/ +install -m 644 %{SOURCE17} %{buildroot}%{_sysconfdir}/apparmor.d/ +install -m 644 %{SOURCE19} %{buildroot}%{_sysconfdir}/apparmor.d/ +install -m 644 %{SOURCE22} %{buildroot}%{_sysconfdir}/apparmor.d/ +install -m 644 %{SOURCE23} %{buildroot}%{_sysconfdir}/apparmor.d/ +install -m 644 %{SOURCE24} %{buildroot}%{_sysconfdir}/apparmor.d/ +install -m 644 %{SOURCE25} %{buildroot}%{_sysconfdir}/apparmor.d/ +install -m 644 %{SOURCE30} %{buildroot}%{_sysconfdir}/apparmor.d/ +install -m 644 %{SOURCE31} %{buildroot}%{_sysconfdir}/apparmor.d/ +%if 0%{?suse_version} >= 1500 +install -m 644 %{SOURCE35} %{buildroot}%{_sysconfdir}/apparmor.d/usr.lib.nagios.plugins.check_procs +%else +install -m 644 %{SOURCE32} %{buildroot}%{_sysconfdir}/apparmor.d/ +%endif +install -m 644 %{SOURCE33} %{buildroot}%{_sysconfdir}/apparmor.d/ +install -m 644 %{SOURCE34} %{buildroot}%{_sysconfdir}/apparmor.d/ + +# install nrpe snipplets +mkdir -p %{buildroot}%{nrpe_sysconfdir} +install -m 644 %{SOURCE50} %{buildroot}%{nrpe_sysconfdir}/check_mailq.cfg +install -m 644 %{SOURCE51} %{buildroot}%{nrpe_sysconfdir}/check_load.cfg +install -m 644 %{SOURCE52} %{buildroot}%{nrpe_sysconfdir}/check_ntp_time.cfg +install -m 644 %{SOURCE53} %{buildroot}%{nrpe_sysconfdir}/check_swap.cfg +install -m 644 %{SOURCE54} %{buildroot}%{nrpe_sysconfdir}/check_partition_root.cfg +install -m 644 %{SOURCE55} %{buildroot}%{nrpe_sysconfdir}/check_proc_cron.cfg +install -m 644 %{SOURCE56} %{buildroot}%{nrpe_sysconfdir}/check_total_procs.cfg +install -m 644 %{SOURCE57} %{buildroot}%{nrpe_sysconfdir}/check_users.cfg +install -m 644 %{SOURCE58} %{buildroot}%{nrpe_sysconfdir}/check_zombie_procs.cfg +install -m 644 %{SOURCE59} %{buildroot}%{nrpe_sysconfdir}/check_mysql.cfg +install -m 644 %{SOURCE60} %{buildroot}%{nrpe_sysconfdir}/check_ups.cfg + +# inform the users about the deprecated monitoring-plugins-extras package +cat >> README.SUSE-deprecated << EOF +The monitoring-plugins-extras package is deprecated. + +The checks formerly packaged here are now packaged separately. + +For example, to install check_fping just install monitoring-plugins-fping. +EOF +cat >> README.SUSE-all << EOF +This virtual package recommends all currently available, official +Nagios plugins. + +It does not require the subpackages as you might not have all needed +dependend packages available. +EOF +# install ghost file for extra-opts +install -Dm 644 %{SOURCE27} %{buildroot}%{_sysconfdir}/%{name}/README +touch %{buildroot}%{_sysconfdir}/%{name}/%{name}.ini + +# find locale files +%find_lang %{name} + +%if 0%{?suse_version} +%post dhcp +# in case somebody uses the permissions file we provide +# in docdir, run permission here +if [ -f %{_sysconfdir}/permissions.d/monitoring-plugins ]; then +%if 0%{?suse_version} < 1210 +%run_permissions +%else + %set_permissions monitoring-plugins +%endif +fi + +%post icmp +if [ -f %{_sysconfdir}/permissions.d/monitoring-plugins ]; then +# in case somebody uses the permissions file we provide +# in docdir, run permission here +%if 0%{?suse_version} < 1210 +%run_permissions +%else +%set_permissions monitoring-plugins +%endif +fi + +%post ide_smart +if [ -f %{_sysconfdir}/permissions.d/monitoring-plugins ]; then +# in case somebody uses the permissions file we provide +# in docdir, run permission here +%if 0%{?suse_version} < 1210 +%run_permissions +%else +%set_permissions monitoring-plugins +%endif +fi +%endif + +%files +%defattr(-,root,root) +%doc ABOUT-NLS ACKNOWLEDGEMENTS AUTHORS ChangeLog CODING FAQ +%doc NEWS README REQUIREMENTS SUPPORT README.SUSE +%if 0%{?suse_version} >= 1500 +%license COPYING +%else +%doc COPYING +%endif +%if 0%{?suse_version} +%doc example +%endif + +%files all +%defattr(-,root,root) +%doc README.SUSE-all + +%if 0%{?suse_version} < 01310 +%files apt +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_apt +%endif + +%files breeze +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_breeze + +%files by_ssh +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_by_ssh + +%files cluster +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_cluster + +%files common -f %{name}.lang +%defattr(-,root,root) +%doc ABOUT-NLS ACKNOWLEDGEMENTS AUTHORS ChangeLog CODING FAQ +%doc NEWS README REQUIREMENTS SUPPORT README.SUSE +%if 0%{?suse_version} >= 1500 +%license COPYING +%else +%doc COPYING +%endif +%if 0%{?suse_version} +%doc example +%endif +%dir %{nagios_libdir} +%dir %{nagios_plugindir} +%dir %{_sysconfdir}/%{name} +%config %{_sysconfdir}/%{name}/README +%ghost %config(noreplace) %{_sysconfdir}/%{name}/%{name}.ini +%defattr(0755,root,root) +%{nagios_plugindir}/negate +%{nagios_plugindir}/urlize +%{nagios_plugindir}/utils.sh +%attr(0644,root,root) %{nagios_plugindir}/utils.pm + +%files dbi +%defattr(-,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_dbi + +%files dbi-mysql +%defattr(-,root,root) +%doc README.SUSE-dbi-mysql + +%files dbi-pgsql +%defattr(-,root,root) +%doc README.SUSE-dbi-pgsql + +%files dbi-sqlite3 +%defattr(-,root,root) +%doc README.SUSE-dbi-sqlite3 + +%files dhcp +%defattr(-,root,root) +%doc README.SUSE-check_dhcp +%dir %{nagios_plugindir} +%dir %{_sysconfdir}/apparmor.d +%attr(0755,root,root) %{nagios_plugindir}/check_dhcp +%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/apparmor.d/usr.lib.nagios.plugins.check_dhcp + +%files dig +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_dig + +%files disk +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%dir %{nrpe_sysconfdir} +%{nagios_plugindir}/check_disk +%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/apparmor.d/usr.lib.nagios.plugins.check_disk +%attr(0644,root,root) %config(noreplace) %{nrpe_sysconfdir}/check_partition_root.cfg + +%files disk_smb +%defattr(0755,root,root) +%{nagios_plugindir}/check_disk_smb + +%files dns +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_dns + +%files dummy +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_dummy + +%files extras +%defattr(0644,root,root,0755) +%doc README.SUSE-deprecated + +%files file_age +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_file_age + +%files flexlm +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_flexlm + +%files fping +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_fping + +%if 0%{?suse_version} < 01310 +%files game +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_game +%endif + +%files hpjd +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_hpjd + +%files http +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_http + +%files icmp +%defattr(-,root,root) +%doc README.SUSE-check_icmp +%dir %{nagios_plugindir} +%attr(0755,root,root) %{nagios_plugindir}/check_icmp +%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/apparmor.d/usr.lib.nagios.plugins.check_icmp +%{nagios_plugindir}/check_host +%{nagios_plugindir}/check_rta_multi + +%files ifoperstatus +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_ifoperstatus + +%files ifstatus +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_ifstatus + +%files ide_smart +%defattr(-,root,root) +%doc README.SUSE-check_ide_smart +%dir %{nagios_plugindir} +%attr(0755,root,root) %{nagios_plugindir}/check_ide_smart +%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/apparmor.d/usr.lib.nagios.plugins.check_ide_smart + +%files ircd +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_ircd + +%files ldap +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_ldap +%{nagios_plugindir}/check_ldaps + +%files load +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%dir %{nrpe_sysconfdir} +%{nagios_plugindir}/check_load +%attr(0644,root,root) %config(noreplace) %{nrpe_sysconfdir}/check_load.cfg +%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/apparmor.d/usr.lib.nagios.plugins.check_load + +%files log +%defattr(0755,root,root) +%{nagios_plugindir}/check_log + +%files mailq +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%dir %{nrpe_sysconfdir} +%{nagios_plugindir}/check_mailq +%attr(0644,root,root) %config(noreplace) %{nrpe_sysconfdir}/check_mailq.cfg + +%files mrtg +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_mrtg + +%files mrtgtraf +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_mrtgtraf + + +%files mssql +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_mssql + +%files mysql +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%dir %{nrpe_sysconfdir} +%{nagios_plugindir}/check_mysql +%{nagios_plugindir}/check_mysql_query +%attr(0644,root,root) %config(noreplace) %{nrpe_sysconfdir}/check_mysql.cfg + +%files nagios +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_nagios + +%files nt +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_nt + +%files ntp_peer +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_ntp_peer + +%files ntp_time +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%dir %{nrpe_sysconfdir} +%{nagios_plugindir}/check_ntp +%{nagios_plugindir}/check_ntp_time +%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/apparmor.d/usr.lib.nagios.plugins.check_ntp_time +%attr(0644,root,root) %config(noreplace) %{nrpe_sysconfdir}/check_ntp_time.cfg + +%files nwstat +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_nwstat + +%files oracle +%defattr(0755,root,root) +%{nagios_plugindir}/check_oracle + +%files overcr +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_overcr + +%files pgsql +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_pgsql + +%files ping +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_ping +%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/apparmor.d/usr.lib.nagios.plugins.check_ping + +%files procs +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%dir %{nrpe_sysconfdir} +%{nagios_plugindir}/check_procs +%{nagios_plugindir}/check_procs_perf +%defattr(0644,root,root) +%config(noreplace) %{_sysconfdir}/apparmor.d/usr.lib.nagios.plugins.check_procs +%config(noreplace) %{nrpe_sysconfdir}/check_proc_cron.cfg +%config(noreplace) %{nrpe_sysconfdir}/check_total_procs.cfg +%config(noreplace) %{nrpe_sysconfdir}/check_zombie_procs.cfg + +%if 0%{?suse_version} +%files radius +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_radius +%endif + +%files real +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_real + +%files rpc +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_rpc + +%ifnarch ppc ppc64 sparc sparc64 s390 s390x +%files sensors +%defattr(0755,root,root) +%{nagios_plugindir}/check_sensors +%endif + +%files smtp +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_smtp + +%files snmp +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_snmp + +%files ssh +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_ssh +%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/apparmor.d/usr.lib.nagios.plugins.check_ssh + +%files swap +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%dir %{nrpe_sysconfdir} +%{nagios_plugindir}/check_swap +%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/apparmor.d/usr.lib.nagios.plugins.check_swap +%attr(0644,root,root) %config(noreplace) %{nrpe_sysconfdir}/check_swap.cfg + +%files tcp +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_clamd +%{nagios_plugindir}/check_ftp +%{nagios_plugindir}/check_imap +%{nagios_plugindir}/check_jabber +%{nagios_plugindir}/check_nntp +%{nagios_plugindir}/check_nntps +%{nagios_plugindir}/check_pop +%{nagios_plugindir}/check_simap +%{nagios_plugindir}/check_spop +%{nagios_plugindir}/check_ssmtp +%{nagios_plugindir}/check_tcp +%{nagios_plugindir}/check_udp + +%files time +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_time + +%files ups +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%dir %{nrpe_sysconfdir} +%{nagios_plugindir}/check_ups +%attr(0644,root,root) %config(noreplace) %{nrpe_sysconfdir}/check_ups.cfg + +%files uptime +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_uptime + +%files users +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%dir %{nrpe_sysconfdir} +%{nagios_plugindir}/check_users +%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/apparmor.d/usr.lib.nagios.plugins.check_users +%attr(0644,root,root) %config(noreplace) %{nrpe_sysconfdir}/check_users.cfg + +%files wave +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_wave + +%files cups +%defattr(-,root,root) +%doc README.SUSE-check_cups +%dir %{nagios_plugindir} +%dir %{_sysconfdir}/apparmor.d +%attr(0755,root,root)%{nagios_plugindir}/check_cups +%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/apparmor.d/usr.lib.nagios.plugins.check_cups + +%changelog diff --git a/nrpe-check_load b/nrpe-check_load new file mode 100644 index 0000000..4aeae94 --- /dev/null +++ b/nrpe-check_load @@ -0,0 +1 @@ +command[check_load]=/usr/lib/nagios/plugins/check_load -w 10,6,5 -c 15,10,8 diff --git a/nrpe-check_mailq b/nrpe-check_mailq new file mode 100644 index 0000000..6a2dd32 --- /dev/null +++ b/nrpe-check_mailq @@ -0,0 +1 @@ +command[check_mailq]=/usr/lib/nagios/plugins/check_mailq -c 50 -w 30 -M postfix diff --git a/nrpe-check_mysql b/nrpe-check_mysql new file mode 100644 index 0000000..201d2d3 --- /dev/null +++ b/nrpe-check_mysql @@ -0,0 +1 @@ +command[check_mysql]=/usr/lib/nagios/plugins/check_mysql -H localhost -u root diff --git a/nrpe-check_ntp_time b/nrpe-check_ntp_time new file mode 100644 index 0000000..46a8c61 --- /dev/null +++ b/nrpe-check_ntp_time @@ -0,0 +1 @@ +command[check_ntp_time]=/usr/lib/nagios/plugins/check_ntp_time -H pool.ntp.org -w 1 -c 2 diff --git a/nrpe-check_partition b/nrpe-check_partition new file mode 100644 index 0000000..85a8263 --- /dev/null +++ b/nrpe-check_partition @@ -0,0 +1 @@ +command[check_partition_root]=/usr/lib/nagios/plugins/check_disk -w 10% -c 5% -p / diff --git a/nrpe-check_proc_cron b/nrpe-check_proc_cron new file mode 100644 index 0000000..8636d12 --- /dev/null +++ b/nrpe-check_proc_cron @@ -0,0 +1 @@ +command[check_proc_cron]=/usr/lib/nagios/plugins/check_procs --command=cron -u root -c 1:1024 diff --git a/nrpe-check_swap b/nrpe-check_swap new file mode 100644 index 0000000..074fb1a --- /dev/null +++ b/nrpe-check_swap @@ -0,0 +1 @@ +command[check_swap]=/usr/lib/nagios/plugins/check_swap -w 10 -c 5 diff --git a/nrpe-check_total_procs b/nrpe-check_total_procs new file mode 100644 index 0000000..a80889b --- /dev/null +++ b/nrpe-check_total_procs @@ -0,0 +1 @@ +command[check_total_procs]=/usr/lib/nagios/plugins/check_procs -w 6000 -c 7500 diff --git a/nrpe-check_ups b/nrpe-check_ups new file mode 100644 index 0000000..f8f093f --- /dev/null +++ b/nrpe-check_ups @@ -0,0 +1 @@ +command[check_ups]=/usr/lib/nagios/plugins/check_ups -H 127.0.0.1 -u liebert diff --git a/nrpe-check_users b/nrpe-check_users new file mode 100644 index 0000000..292c35b --- /dev/null +++ b/nrpe-check_users @@ -0,0 +1 @@ +command[check_users]=/usr/lib/nagios/plugins/check_users -w 30 -c 40 diff --git a/nrpe-check_zombie_procs b/nrpe-check_zombie_procs new file mode 100644 index 0000000..8a8f645 --- /dev/null +++ b/nrpe-check_zombie_procs @@ -0,0 +1 @@ +command[check_zombie_procs]=/usr/lib/nagios/plugins/check_procs -w 5 -c 10 -s Z diff --git a/usr.lib.nagios.plugins.check_cups b/usr.lib.nagios.plugins.check_cups new file mode 100644 index 0000000..9f52b59 --- /dev/null +++ b/usr.lib.nagios.plugins.check_cups @@ -0,0 +1,31 @@ +# Last Modified: Mon Mar 11 14:58:16 2013 +#include + +/usr/lib/nagios/plugins/check_cups { + #include + #include + #include + #include + + network inet dgram, + network inet stream, + + /{usr/,}bin/bash rix, + /{usr/,}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, + +} diff --git a/usr.lib.nagios.plugins.check_dhcp b/usr.lib.nagios.plugins.check_dhcp new file mode 100644 index 0000000..03f7d65 --- /dev/null +++ b/usr.lib.nagios.plugins.check_dhcp @@ -0,0 +1,8 @@ +#include +/usr/lib/nagios/plugins/check_dhcp { + #include + #include + capability net_raw, + + /etc/monitoring-plugins/* r, +} diff --git a/usr.lib.nagios.plugins.check_disk b/usr.lib.nagios.plugins.check_disk new file mode 100644 index 0000000..33bc6c4 --- /dev/null +++ b/usr.lib.nagios.plugins.check_disk @@ -0,0 +1,9 @@ +#include +/usr/lib/nagios/plugins/check_disk { + #include + #include + #include + /etc/mtab r, + @{PROC}/[0-9]*/mounts r, + /usr/lib/nagios/plugins/check_disk rm, +} diff --git a/usr.lib.nagios.plugins.check_icmp b/usr.lib.nagios.plugins.check_icmp new file mode 100644 index 0000000..8121d9e --- /dev/null +++ b/usr.lib.nagios.plugins.check_icmp @@ -0,0 +1,11 @@ +#include +/usr/lib/nagios/plugins/check_icmp { + #include + #include + + capability net_raw, + capability setuid, + network inet raw, + + /etc/monitoring-plugins/* r, +} diff --git a/usr.lib.nagios.plugins.check_ide_smart b/usr.lib.nagios.plugins.check_ide_smart new file mode 100644 index 0000000..18615c4 --- /dev/null +++ b/usr.lib.nagios.plugins.check_ide_smart @@ -0,0 +1,12 @@ +# Last Modified: Wed May 16 10:38:11 2012 +#include + +/usr/lib/nagios/plugins/check_ide_smart { + #include + capability sys_admin, + capability sys_rawio, + /dev/s* r, + /dev/h* r, + + /etc/monitoring-plugins/* r, +} diff --git a/usr.lib.nagios.plugins.check_load b/usr.lib.nagios.plugins.check_load new file mode 100644 index 0000000..f6d9457 --- /dev/null +++ b/usr.lib.nagios.plugins.check_load @@ -0,0 +1,11 @@ +#include +/usr/lib/nagios/plugins/check_load { + #include + #include + #include + /usr/lib/nagios/plugins/check_load rm, + /usr/bin/uptime rmix, + /proc/uptime r, + /proc/meminfo r, + /proc/loadavg r, +} diff --git a/usr.lib.nagios.plugins.check_ntp_time b/usr.lib.nagios.plugins.check_ntp_time new file mode 100644 index 0000000..31f9336 --- /dev/null +++ b/usr.lib.nagios.plugins.check_ntp_time @@ -0,0 +1,24 @@ +#include + +/usr/lib/nagios/plugins/check_ntp_time { + #include + #include + #include + #include + + network inet dgram, + network inet6 dgram, + + capability ipc_lock, + capability net_bind_service, + capability sys_time, + capability sys_resource, + + /etc/gai.conf r, + /usr/lib/nagios/plugins/check_ntp_time rm, + /etc/hosts r, + /etc/resolv.conf r, + /var/run/nscd/* r, + + /etc/monitoring-plugins/* r, +} diff --git a/usr.lib.nagios.plugins.check_ping b/usr.lib.nagios.plugins.check_ping new file mode 100644 index 0000000..e4fdc5c --- /dev/null +++ b/usr.lib.nagios.plugins.check_ping @@ -0,0 +1,14 @@ +#include +/usr/lib/nagios/plugins/check_ping { + #include + #include + + capability net_raw, + capability setuid, + network inet raw, + network inet6 raw, + /{usr/,}bin/ping rix, + /{usr/,}bin/ping6 rix, + + /etc/monitoring-plugins/* r, +} diff --git a/usr.lib.nagios.plugins.check_procs b/usr.lib.nagios.plugins.check_procs new file mode 100644 index 0000000..4b09e36 --- /dev/null +++ b/usr.lib.nagios.plugins.check_procs @@ -0,0 +1,13 @@ +#include +/usr/lib/nagios/plugins/check_procs flags=(attach_disconnected) { + #include + #include + #include + + capability sys_ptrace, + + /{usr/,}bin/ps rix, + /proc/ r, + /proc/** r, + /usr/lib/nagios/plugins/check_procs mr, +} diff --git a/usr.lib.nagios.plugins.check_procs.sle15 b/usr.lib.nagios.plugins.check_procs.sle15 new file mode 100644 index 0000000..d5e0bd5 --- /dev/null +++ b/usr.lib.nagios.plugins.check_procs.sle15 @@ -0,0 +1,14 @@ +#include +/usr/lib/nagios/plugins/check_procs flags=(attach_disconnected) { + #include + #include + #include + + ptrace, + ptrace (read) peer=unconfined, + + /{usr/,}bin/ps rix, + /proc/ r, + /proc/** r, + /usr/lib/nagios/plugins/check_procs mr, +} diff --git a/usr.lib.nagios.plugins.check_ssh b/usr.lib.nagios.plugins.check_ssh new file mode 100644 index 0000000..e72da6d --- /dev/null +++ b/usr.lib.nagios.plugins.check_ssh @@ -0,0 +1,7 @@ +#include +/usr/lib/nagios/plugins/check_ssh flags=(complain) { + #include + #include + + /etc/monitoring-plugins/* r, +} diff --git a/usr.lib.nagios.plugins.check_swap b/usr.lib.nagios.plugins.check_swap new file mode 100644 index 0000000..a1af5c5 --- /dev/null +++ b/usr.lib.nagios.plugins.check_swap @@ -0,0 +1,6 @@ +#include +/usr/lib/nagios/plugins/check_swap { + #include + #include + /usr/lib/nagios/plugins/check_swap rm, +} diff --git a/usr.lib.nagios.plugins.check_users b/usr.lib.nagios.plugins.check_users new file mode 100644 index 0000000..d3d4551 --- /dev/null +++ b/usr.lib.nagios.plugins.check_users @@ -0,0 +1,8 @@ +#include +/usr/lib/nagios/plugins/check_users { + #include + #include + #include + /usr/lib/nagios/plugins/check_users rm, +} +