summaryrefslogtreecommitdiffstats
path: root/plugins-scripts/check_rpc.pl
diff options
context:
space:
mode:
Diffstat (limited to 'plugins-scripts/check_rpc.pl')
-rwxr-xr-xplugins-scripts/check_rpc.pl7
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
22use strict; 22use strict;
23use lib utils.pm; 23use FindBin;
24use lib "$FindBin::Bin";
24use utils qw($TIMEOUT %ERRORS &print_revision &support); 25use utils qw($TIMEOUT %ERRORS &print_revision &support);
25use vars qw($PROGNAME); 26use vars qw($PROGNAME);
26my ($verbose,@proto,%prognum,$host,$response,$prognum,$port,$cmd,$progver,$state); 27my ($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"};