Imported Upstream version 2.0

This commit is contained in:
Jan Wagner 2014-07-11 21:01:00 +02:00
parent c89ccc3c74
commit 0841b5c7c7
165 changed files with 25440 additions and 4442 deletions

View file

@ -1,10 +1,10 @@
#!/usr/local/bin/perl -w
#!@PERL@ -w
#
# check_ifstatus.pl - nagios plugin
# check_ifstatus.pl - monitoring plugin
#
#
# Copyright (C) 2000 Christoph Kron
# Modified 5/2002 to conform to updated Nagios Plugin Guidelines (S. Ghosh)
# Modified 5/2002 to conform to updated Monitoring Plugins Guidelines (S. Ghosh)
# Added -x option (4/2003)
# Added -u option (4/2003)
# Added -M option (10/2003)
@ -22,17 +22,19 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
#
#
# Report bugs to: ck@zet.net, nagiosplug-help@lists.sf.net
# Report bugs to: ck@zet.net, help@monitoring-plugins.org
#
# 11.01.2000 Version 1.0
#
use POSIX;
use strict;
use lib utils.pm ;
use FindBin;
use lib "$FindBin::Bin";
use lib '@libexecdir@';
use utils qw($TIMEOUT %ERRORS &print_revision &support);
use Net::SNMP;
@ -46,6 +48,9 @@ sub usage ($);
sub print_usage ();
sub process_arguments ();
$ENV{'PATH'}='@TRUSTED_PATH@';
$ENV{'BASH_ENV'}='';
$ENV{'ENV'}='';
my $status;
my %ifOperStatus = ('1','up',
@ -99,7 +104,7 @@ my %session_opts;
# Just in case of problems, let's not hang Nagios
# Just in case of problems, let's not hang the monitoring system
$SIG{'ALRM'} = sub {
print ("ERROR: No snmp response from $hostname (alarm timeout)\n");
exit $ERRORS{"UNKNOWN"};
@ -239,7 +244,7 @@ sub print_usage() {
sub print_help() {
print_revision($PROGNAME, '@NP_VERSION@');
print_usage();
printf "check_ifstatus plugin for Nagios monitors operational \n";
printf "check_ifstatus plugin for monitoring operational \n";
printf "status of each network interface on the target host\n";
printf "\nUsage:\n";
printf " -H (--hostname) Hostname to query - (required)\n";