summaryrefslogtreecommitdiffstats
path: root/plugins-scripts/check_ifoperstatus.pl
diff options
context:
space:
mode:
Diffstat (limited to 'plugins-scripts/check_ifoperstatus.pl')
-rwxr-xr-xplugins-scripts/check_ifoperstatus.pl16
1 files changed, 9 insertions, 7 deletions
diff --git a/plugins-scripts/check_ifoperstatus.pl b/plugins-scripts/check_ifoperstatus.pl
index 452911b..159eb62 100755
--- a/plugins-scripts/check_ifoperstatus.pl
+++ b/plugins-scripts/check_ifoperstatus.pl
@@ -1,9 +1,9 @@
1#!/usr/local/bin/perl -w 1#!/usr/local/bin/perl -w
2# 2#
3# check_ifoperstatus.pl - nagios plugin 3# check_ifoperstatus.pl - monitoring plugin
4# 4#
5# Copyright (C) 2000 Christoph Kron, 5# Copyright (C) 2000 Christoph Kron,
6# Modified 5/2002 to conform to updated Nagios Plugin Guidelines 6# Modified 5/2002 to conform to updated Monitoring Plugins Guidelines
7# Added support for named interfaces per Valdimir Ivaschenko (S. Ghosh) 7# Added support for named interfaces per Valdimir Ivaschenko (S. Ghosh)
8# Added SNMPv3 support (10/2003) 8# Added SNMPv3 support (10/2003)
9# 9#
@@ -19,10 +19,11 @@
19# 19#
20# You should have received a copy of the GNU General Public License 20# You should have received a copy of the GNU General Public License
21# along with this program; if not, write to the Free Software 21# along with this program; if not, write to the Free Software
22# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 22# Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
23# USA
23# 24#
24# 25#
25# Report bugs to: nagiosplug-help@lists.sourceforge.net 26# Report bugs to: help@monitoring-plugins.org
26# 27#
27# 11.01.2000 Version 1.0 28# 11.01.2000 Version 1.0
28# 29#
@@ -34,7 +35,8 @@
34 35
35use POSIX; 36use POSIX;
36use strict; 37use strict;
37use lib utils.pm ; 38use FindBin;
39use lib "$FindBin::Bin";
38use utils qw($TIMEOUT %ERRORS &print_revision &support); 40use utils qw($TIMEOUT %ERRORS &print_revision &support);
39 41
40use Net::SNMP; 42use Net::SNMP;
@@ -101,7 +103,7 @@ my %session_opts;
101$status = process_arguments(); 103$status = process_arguments();
102 104
103 105
104# Just in case of problems, let's not hang Nagios 106# Just in case of problems, let's not hang the monitoring system
105$SIG{'ALRM'} = sub { 107$SIG{'ALRM'} = sub {
106 print ("ERROR: No snmp response from $hostname (alarm)\n"); 108 print ("ERROR: No snmp response from $hostname (alarm)\n");
107 exit $ERRORS{"UNKNOWN"}; 109 exit $ERRORS{"UNKNOWN"};
@@ -292,7 +294,7 @@ sub print_usage() {
292sub print_help() { 294sub print_help() {
293 print_revision($PROGNAME, '@NP_VERSION@'); 295 print_revision($PROGNAME, '@NP_VERSION@');
294 print_usage(); 296 print_usage();
295 printf "check_ifoperstatus plugin for Nagios monitors operational \n"; 297 printf "check_ifoperstatus plugin for monitoring operational \n";
296 printf "status of a particular network interface on the target host\n"; 298 printf "status of a particular network interface on the target host\n";
297 printf "\nUsage:\n"; 299 printf "\nUsage:\n";
298 printf " -H (--hostname) Hostname to query - (required)\n"; 300 printf " -H (--hostname) Hostname to query - (required)\n";