summaryrefslogtreecommitdiffstats
path: root/plugins-scripts/check_disk_smb.pl
diff options
context:
space:
mode:
Diffstat (limited to 'plugins-scripts/check_disk_smb.pl')
-rwxr-xr-xplugins-scripts/check_disk_smb.pl9
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins-scripts/check_disk_smb.pl b/plugins-scripts/check_disk_smb.pl
index 01c560e..36259d5 100755
--- a/plugins-scripts/check_disk_smb.pl
+++ b/plugins-scripts/check_disk_smb.pl
@@ -3,7 +3,7 @@
3# 3#
4# check_disk.pl <host> <share> <user> <pass> [warn] [critical] [port] 4# check_disk.pl <host> <share> <user> <pass> [warn] [critical] [port]
5# 5#
6# Nagios host script to get the disk usage from a SMB share 6# Monitoring host script to get the disk usage from a SMB share
7# 7#
8# Changes and Modifications 8# Changes and Modifications
9# ========================= 9# =========================
@@ -24,7 +24,8 @@ use strict;
24use Getopt::Long; 24use Getopt::Long;
25use vars qw($opt_P $opt_V $opt_h $opt_H $opt_s $opt_W $opt_u $opt_p $opt_w $opt_c $opt_a $verbose); 25use vars qw($opt_P $opt_V $opt_h $opt_H $opt_s $opt_W $opt_u $opt_p $opt_w $opt_c $opt_a $verbose);
26use vars qw($PROGNAME); 26use vars qw($PROGNAME);
27use lib utils.pm ; 27use FindBin;
28use lib "$FindBin::Bin";
28use utils qw($TIMEOUT %ERRORS &print_revision &support &usage); 29use utils qw($TIMEOUT %ERRORS &print_revision &support &usage);
29 30
30sub print_help (); 31sub print_help ();
@@ -171,7 +172,7 @@ my $res = undef;
171my $perfdata = ""; 172my $perfdata = "";
172my @lines = undef; 173my @lines = undef;
173 174
174# Just in case of problems, let's not hang Nagios 175# Just in case of problems, let's not hang the monitoring system
175$SIG{'ALRM'} = sub { 176$SIG{'ALRM'} = sub {
176 print "No Answer from Client\n"; 177 print "No Answer from Client\n";
177 exit $ERRORS{"UNKNOWN"}; 178 exit $ERRORS{"UNKNOWN"};
@@ -293,7 +294,7 @@ sub print_help () {
293 print_revision($PROGNAME,'@NP_VERSION@'); 294 print_revision($PROGNAME,'@NP_VERSION@');
294 print "Copyright (c) 2000 Michael Anthon/Karl DeBisschop 295 print "Copyright (c) 2000 Michael Anthon/Karl DeBisschop
295 296
296Perl Check SMB Disk plugin for Nagios 297Perl Check SMB Disk plugin for monitoring
297 298
298"; 299";
299 print_usage(); 300 print_usage();