summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSubhendu Ghosh <sghosh@users.sourceforge.net>2002-05-10 03:49:22 +0000
committerSubhendu Ghosh <sghosh@users.sourceforge.net>2002-05-10 03:49:22 +0000
commit06932673d3582390f5309fd6a55108b3818106e0 (patch)
tree02fcb56fb510d56b375ec41592b955fc720e544c
parentcf013839c45b5b3becdc37fe11c61ce57ad5b138 (diff)
downloadmonitoring-plugins-06932673d3582390f5309fd6a55108b3818106e0.tar.gz
added programs to autoconf
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@31 f882894a-f735-0410-b71e-b25c423dba1c
-rw-r--r--configure.in41
-rw-r--r--plugins-scripts/utils.pm.in11
2 files changed, 46 insertions, 6 deletions
diff --git a/configure.in b/configure.in
index 86a9cc62..5de40709 100644
--- a/configure.in
+++ b/configure.in
@@ -629,6 +629,27 @@ fi
629AC_PATH_PROG(PATH_TO_UPTIME,uptime) 629AC_PATH_PROG(PATH_TO_UPTIME,uptime)
630AC_DEFINE_UNQUOTED(PATH_TO_UPTIME,"$PATH_TO_UPTIME") 630AC_DEFINE_UNQUOTED(PATH_TO_UPTIME,"$PATH_TO_UPTIME")
631 631
632AC_PATH_PROG(PATH_TO_RPCINFO,rpcinfo)
633AC_DEFINE_UNQUOTED(PATH_TO_RPCINFO,"$PATH_TO_RPCINFO")
634
635AC_PATH_PROG(PATH_TO_NTPDATE,ntpdate)
636AC_PATH_PROG(PATH_TO_NTPDC,ntpdc)
637if (test -x "$PATH_TO_NTPDATE" || test -x "$PATH_TO_NTPDC")
638then
639 AC_DEFINE_UNQUOTED(PATH_TO_NTPDC,"$PATH_TO_NTPDC")
640 AC_DEFINE_UNQUOTED(PATH_TO_NTPDATE,"$PATH_TO_NTPDATE")
641else
642 echo "** Install NTP programs if you want to monitor time synchronization"
643fi
644
645AC_PATH_PROG(PATH_TO_LMSTAT,lmstat)
646if test -x "$PATH_TO_LMSTAT"
647then
648 AC_DEFINE_UNQUOTED(PATH_TO_LMSTAT,"$PATH_TO_LMSTAT")
649else
650 echo "** Get lmstat from Globetrotter Software to monitor flexlm licenses"
651fi
652
632AC_PATH_PROG(PATH_TO_WHO,who) 653AC_PATH_PROG(PATH_TO_WHO,who)
633if [who -q 2>/dev/null | egrep -i "^# users=[0-9]+$" >/dev/null] 654if [who -q 2>/dev/null | egrep -i "^# users=[0-9]+$" >/dev/null]
634then 655then
@@ -638,7 +659,7 @@ else
638fi 659fi
639 660
640AC_PATH_PROG(PATH_TO_SNMPGET,snmpget) 661AC_PATH_PROG(PATH_TO_SNMPGET,snmpget)
641if test -f "$PATH_TO_SNMPGET" 662if test -x "$PATH_TO_SNMPGET"
642then 663then
643 AC_DEFINE_UNQUOTED(PATH_TO_SNMPGET,"$PATH_TO_SNMPGET") 664 AC_DEFINE_UNQUOTED(PATH_TO_SNMPGET,"$PATH_TO_SNMPGET")
644 EXTRAS="$EXTRAS check_hpjd check_snmp" 665 EXTRAS="$EXTRAS check_hpjd check_snmp"
@@ -647,18 +668,26 @@ else
647fi 668fi
648 669
649AC_PATH_PROG(PATH_TO_SNMPGETNEXT,snmpgetnext) 670AC_PATH_PROG(PATH_TO_SNMPGETNEXT,snmpgetnext)
650if test -f "$PATH_TO_SNMPGETNEXT" 671if test -x "$PATH_TO_SNMPGETNEXT"
651then 672then
652 AC_DEFINE_UNQUOTED(PATH_TO_SNMPGETNEXT,"$PATH_TO_SNMPGETNEXT") 673 AC_DEFINE_UNQUOTED(PATH_TO_SNMPGETNEXT,"$PATH_TO_SNMPGETNEXT")
653fi 674fi
654 675
676if ( $PERL -MNet::SNMP -e 'print $Net::SNMP::VERSION;' )
677then
678 echo "Found Net::SNMP perl module"
679else
680 echo "** Tried $PERL - install Net::SNMP perl module if you want to"
681 echo " use the perl snmp plugins"
682fi
683
655AC_PATH_PROG(PATH_TO_QUAKESTAT,quakestat) 684AC_PATH_PROG(PATH_TO_QUAKESTAT,quakestat)
656AC_PATH_PROG(PATH_TO_QSTAT,qstat) 685AC_PATH_PROG(PATH_TO_QSTAT,qstat)
657if test -n "$PATH_TO_QUAKESTAT" 686if test -x "$PATH_TO_QUAKESTAT"
658then 687then
659 AC_DEFINE_UNQUOTED(PATH_TO_QSTAT,"$PATH_TO_QUAKESTAT") 688 AC_DEFINE_UNQUOTED(PATH_TO_QSTAT,"$PATH_TO_QUAKESTAT")
660 EXTRAS="$EXTRAS check_game" 689 EXTRAS="$EXTRAS check_game"
661elif test -n "$PATH_TO_QSTAT" 690elif test -x "$PATH_TO_QSTAT"
662then 691then
663 AC_DEFINE_UNQUOTED(PATH_TO_QSTAT,"$PATH_TO_QSTAT") 692 AC_DEFINE_UNQUOTED(PATH_TO_QSTAT,"$PATH_TO_QSTAT")
664 EXTRAS="$EXTRAS check_game" 693 EXTRAS="$EXTRAS check_game"
@@ -667,7 +696,7 @@ else
667fi 696fi
668 697
669AC_PATH_PROG(PATH_TO_FPING,fping) 698AC_PATH_PROG(PATH_TO_FPING,fping)
670if test -n "$PATH_TO_FPING" 699if test -x "$PATH_TO_FPING"
671then 700then
672 AC_DEFINE_UNQUOTED(PATH_TO_FPING,"$PATH_TO_FPING") 701 AC_DEFINE_UNQUOTED(PATH_TO_FPING,"$PATH_TO_FPING")
673 EXTRAS="$EXTRAS check_fping" 702 EXTRAS="$EXTRAS check_fping"
@@ -676,7 +705,7 @@ else
676fi 705fi
677 706
678AC_PATH_PROG(PATH_TO_SSH,ssh) 707AC_PATH_PROG(PATH_TO_SSH,ssh)
679if test -f "$PATH_TO_SSH" 708if test -x "$PATH_TO_SSH"
680then 709then
681 AC_DEFINE_UNQUOTED(SSH_COMMAND,"$PATH_TO_SSH") 710 AC_DEFINE_UNQUOTED(SSH_COMMAND,"$PATH_TO_SSH")
682 EXTRAS="$EXTRAS check_by_ssh" 711 EXTRAS="$EXTRAS check_by_ssh"
diff --git a/plugins-scripts/utils.pm.in b/plugins-scripts/utils.pm.in
index ed105dda..304d378d 100644
--- a/plugins-scripts/utils.pm.in
+++ b/plugins-scripts/utils.pm.in
@@ -2,6 +2,9 @@
2# $Id$ 2# $Id$
3# 3#
4# $Log$ 4# $Log$
5# Revision 1.3 2002/05/10 03:49:22 sghosh
6# added programs to autoconf
7#
5# Revision 1.2 2002/05/08 05:10:35 sghosh 8# Revision 1.2 2002/05/08 05:10:35 sghosh
6# is_hostname added, update CODES to POSIX 9# is_hostname added, update CODES to POSIX
7# 10#
@@ -19,9 +22,17 @@ sub usage;
19sub support(); 22sub support();
20sub is_hostname; 23sub is_hostname;
21 24
25## updated by autoconf
26$PATH_TO_RPCINFO = "@PATH_TO_RPCINFO@" ;
27$PATH_TO_NTPDATE = "@PATH_TO_NTPDATE@" ;
28$PATH_TO_NTPDC = "@PATH_TO_NTPDC@" ;
29$PATH_TO_LMSTAT = "@PATH_TO_LMSTAT@" ;
30
31## common variables
22$TIMEOUT = 15; 32$TIMEOUT = 15;
23%ERRORS=('OK'=>0,'WARNING'=>1,'CRITICAL'=>2,'UNKNOWN'=>3,'DEPENDENT'=>4); 33%ERRORS=('OK'=>0,'WARNING'=>1,'CRITICAL'=>2,'UNKNOWN'=>3,'DEPENDENT'=>4);
24 34
35## utility subroutines
25sub print_revision ($$) { 36sub print_revision ($$) {
26 my $commandName = shift; 37 my $commandName = shift;
27 my $pluginRevision = shift; 38 my $pluginRevision = shift;