diff options
Diffstat (limited to 'plugins-scripts/check_ifstatus.pl')
-rwxr-xr-x | plugins-scripts/check_ifstatus.pl | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/plugins-scripts/check_ifstatus.pl b/plugins-scripts/check_ifstatus.pl index 421580ad..4760a281 100755 --- a/plugins-scripts/check_ifstatus.pl +++ b/plugins-scripts/check_ifstatus.pl | |||
@@ -1,10 +1,10 @@ | |||
1 | #!/usr/local/bin/perl -w | 1 | #!/usr/local/bin/perl -w |
2 | # | 2 | # |
3 | # check_ifstatus.pl - nagios plugin | 3 | # check_ifstatus.pl - monitoring plugin |
4 | # | 4 | # |
5 | # | 5 | # |
6 | # Copyright (C) 2000 Christoph Kron | 6 | # Copyright (C) 2000 Christoph Kron |
7 | # Modified 5/2002 to conform to updated Nagios Plugin Guidelines (S. Ghosh) | 7 | # Modified 5/2002 to conform to updated Monitoring Plugins Guidelines (S. Ghosh) |
8 | # Added -x option (4/2003) | 8 | # Added -x option (4/2003) |
9 | # Added -u option (4/2003) | 9 | # Added -u option (4/2003) |
10 | # Added -M option (10/2003) | 10 | # Added -M option (10/2003) |
@@ -22,17 +22,18 @@ | |||
22 | # | 22 | # |
23 | # You should have received a copy of the GNU General Public License | 23 | # You should have received a copy of the GNU General Public License |
24 | # along with this program; if not, write to the Free Software | 24 | # along with this program; if not, write to the Free Software |
25 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 25 | # Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA |
26 | # | 26 | # |
27 | # | 27 | # |
28 | # Report bugs to: ck@zet.net, nagiosplug-help@lists.sf.net | 28 | # Report bugs to: ck@zet.net, help@monitoring-plugins.org |
29 | # | 29 | # |
30 | # 11.01.2000 Version 1.0 | 30 | # 11.01.2000 Version 1.0 |
31 | # | 31 | # |
32 | 32 | ||
33 | use POSIX; | 33 | use POSIX; |
34 | use strict; | 34 | use strict; |
35 | use lib utils.pm ; | 35 | use FindBin; |
36 | use lib "$FindBin::Bin"; | ||
36 | use utils qw($TIMEOUT %ERRORS &print_revision &support); | 37 | use utils qw($TIMEOUT %ERRORS &print_revision &support); |
37 | 38 | ||
38 | use Net::SNMP; | 39 | use Net::SNMP; |
@@ -102,7 +103,7 @@ my %session_opts; | |||
102 | 103 | ||
103 | 104 | ||
104 | 105 | ||
105 | # Just in case of problems, let's not hang Nagios | 106 | # Just in case of problems, let's not hang the monitoring system |
106 | $SIG{'ALRM'} = sub { | 107 | $SIG{'ALRM'} = sub { |
107 | print ("ERROR: No snmp response from $hostname (alarm timeout)\n"); | 108 | print ("ERROR: No snmp response from $hostname (alarm timeout)\n"); |
108 | exit $ERRORS{"UNKNOWN"}; | 109 | exit $ERRORS{"UNKNOWN"}; |
@@ -242,7 +243,7 @@ sub print_usage() { | |||
242 | sub print_help() { | 243 | sub print_help() { |
243 | print_revision($PROGNAME, '@NP_VERSION@'); | 244 | print_revision($PROGNAME, '@NP_VERSION@'); |
244 | print_usage(); | 245 | print_usage(); |
245 | printf "check_ifstatus plugin for Nagios monitors operational \n"; | 246 | printf "check_ifstatus plugin for monitoring operational \n"; |
246 | printf "status of each network interface on the target host\n"; | 247 | printf "status of each network interface on the target host\n"; |
247 | printf "\nUsage:\n"; | 248 | printf "\nUsage:\n"; |
248 | printf " -H (--hostname) Hostname to query - (required)\n"; | 249 | printf " -H (--hostname) Hostname to query - (required)\n"; |