diff options
Diffstat (limited to 'plugins-scripts/check_rpc.pl')
| -rwxr-xr-x | plugins-scripts/check_rpc.pl | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins-scripts/check_rpc.pl b/plugins-scripts/check_rpc.pl index e09754dd..f7fe0321 100755 --- a/plugins-scripts/check_rpc.pl +++ b/plugins-scripts/check_rpc.pl | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | #!/usr/local/bin/perl -w | 1 | #!/usr/local/bin/perl -w |
| 2 | # | 2 | # |
| 3 | # check_rpc plugin for nagios | 3 | # check_rpc plugin for monitoring |
| 4 | # | 4 | # |
| 5 | # usage: | 5 | # usage: |
| 6 | # check_rpc host service | 6 | # check_rpc host service |
| @@ -20,7 +20,8 @@ | |||
| 20 | # | 20 | # |
| 21 | 21 | ||
| 22 | use strict; | 22 | use strict; |
| 23 | use lib utils.pm; | 23 | use FindBin; |
| 24 | use lib "$FindBin::Bin"; | ||
| 24 | use utils qw($TIMEOUT %ERRORS &print_revision &support); | 25 | use utils qw($TIMEOUT %ERRORS &print_revision &support); |
| 25 | use vars qw($PROGNAME); | 26 | use vars qw($PROGNAME); |
| 26 | my ($verbose,@proto,%prognum,$host,$response,$prognum,$port,$cmd,$progver,$state); | 27 | my ($verbose,@proto,%prognum,$host,$response,$prognum,$port,$cmd,$progver,$state); |
| @@ -254,7 +255,7 @@ $proto = 't' if ($opt_t); | |||
| 254 | $proto = 'u' if ($opt_u); | 255 | $proto = 'u' if ($opt_u); |
| 255 | 256 | ||
| 256 | 257 | ||
| 257 | # Just in case of problems, let's not hang Nagios | 258 | # Just in case of problems, let's not hang the monitoring system |
| 258 | $SIG{'ALRM'} = sub { | 259 | $SIG{'ALRM'} = sub { |
| 259 | print ("ERROR: No response from RPC server (alarm)\n"); | 260 | print ("ERROR: No response from RPC server (alarm)\n"); |
| 260 | exit $ERRORS{"UNKNOWN"}; | 261 | exit $ERRORS{"UNKNOWN"}; |
