summaryrefslogtreecommitdiffstats
path: root/plugins-scripts/check_flexlm.pl
diff options
context:
space:
mode:
Diffstat (limited to 'plugins-scripts/check_flexlm.pl')
-rwxr-xr-xplugins-scripts/check_flexlm.pl7
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins-scripts/check_flexlm.pl b/plugins-scripts/check_flexlm.pl
index 0597377..de63d3a 100755
--- a/plugins-scripts/check_flexlm.pl
+++ b/plugins-scripts/check_flexlm.pl
@@ -9,7 +9,7 @@
9# Check and interpret the output of lmstat 9# Check and interpret the output of lmstat
10# and create returncodes and output. 10# and create returncodes and output.
11# 11#
12# Contrary to the nagios concept, this script takes 12# Contrary to most other plugins, this script takes
13# a file, not a hostname as an argument and returns 13# a file, not a hostname as an argument and returns
14# the status of hosts and services described in that 14# the status of hosts and services described in that
15# file. Use these hosts.cfg entries as an example 15# file. Use these hosts.cfg entries as an example
@@ -35,7 +35,8 @@
35use strict; 35use strict;
36use Getopt::Long; 36use Getopt::Long;
37use vars qw($opt_V $opt_h $opt_F $opt_t $verbose $PROGNAME); 37use vars qw($opt_V $opt_h $opt_F $opt_t $verbose $PROGNAME);
38use lib utils.pm; 38use FindBin;
39use lib "$FindBin::Bin";
39use utils qw(%ERRORS &print_revision &support &usage); 40use utils qw(%ERRORS &print_revision &support &usage);
40 41
41$PROGNAME="check_flexlm"; 42$PROGNAME="check_flexlm";
@@ -72,7 +73,7 @@ unless (defined $opt_F) {
72 print_usage(); 73 print_usage();
73 exit $ERRORS{'UNKNOWN'}; 74 exit $ERRORS{'UNKNOWN'};
74} 75}
75# Just in case of problems, let's not hang Nagios 76# Just in case of problems, let's not hang the monitoring system
76$SIG{'ALRM'} = sub { 77$SIG{'ALRM'} = sub {
77 print "Timeout: No Answer from Client\n"; 78 print "Timeout: No Answer from Client\n";
78 exit $ERRORS{'UNKNOWN'}; 79 exit $ERRORS{'UNKNOWN'};