diff options
-rw-r--r-- | configure.in | 41 | ||||
-rw-r--r-- | plugins-scripts/utils.pm.in | 11 |
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 | |||
629 | AC_PATH_PROG(PATH_TO_UPTIME,uptime) | 629 | AC_PATH_PROG(PATH_TO_UPTIME,uptime) |
630 | AC_DEFINE_UNQUOTED(PATH_TO_UPTIME,"$PATH_TO_UPTIME") | 630 | AC_DEFINE_UNQUOTED(PATH_TO_UPTIME,"$PATH_TO_UPTIME") |
631 | 631 | ||
632 | AC_PATH_PROG(PATH_TO_RPCINFO,rpcinfo) | ||
633 | AC_DEFINE_UNQUOTED(PATH_TO_RPCINFO,"$PATH_TO_RPCINFO") | ||
634 | |||
635 | AC_PATH_PROG(PATH_TO_NTPDATE,ntpdate) | ||
636 | AC_PATH_PROG(PATH_TO_NTPDC,ntpdc) | ||
637 | if (test -x "$PATH_TO_NTPDATE" || test -x "$PATH_TO_NTPDC") | ||
638 | then | ||
639 | AC_DEFINE_UNQUOTED(PATH_TO_NTPDC,"$PATH_TO_NTPDC") | ||
640 | AC_DEFINE_UNQUOTED(PATH_TO_NTPDATE,"$PATH_TO_NTPDATE") | ||
641 | else | ||
642 | echo "** Install NTP programs if you want to monitor time synchronization" | ||
643 | fi | ||
644 | |||
645 | AC_PATH_PROG(PATH_TO_LMSTAT,lmstat) | ||
646 | if test -x "$PATH_TO_LMSTAT" | ||
647 | then | ||
648 | AC_DEFINE_UNQUOTED(PATH_TO_LMSTAT,"$PATH_TO_LMSTAT") | ||
649 | else | ||
650 | echo "** Get lmstat from Globetrotter Software to monitor flexlm licenses" | ||
651 | fi | ||
652 | |||
632 | AC_PATH_PROG(PATH_TO_WHO,who) | 653 | AC_PATH_PROG(PATH_TO_WHO,who) |
633 | if [who -q 2>/dev/null | egrep -i "^# users=[0-9]+$" >/dev/null] | 654 | if [who -q 2>/dev/null | egrep -i "^# users=[0-9]+$" >/dev/null] |
634 | then | 655 | then |
@@ -638,7 +659,7 @@ else | |||
638 | fi | 659 | fi |
639 | 660 | ||
640 | AC_PATH_PROG(PATH_TO_SNMPGET,snmpget) | 661 | AC_PATH_PROG(PATH_TO_SNMPGET,snmpget) |
641 | if test -f "$PATH_TO_SNMPGET" | 662 | if test -x "$PATH_TO_SNMPGET" |
642 | then | 663 | then |
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 | |||
647 | fi | 668 | fi |
648 | 669 | ||
649 | AC_PATH_PROG(PATH_TO_SNMPGETNEXT,snmpgetnext) | 670 | AC_PATH_PROG(PATH_TO_SNMPGETNEXT,snmpgetnext) |
650 | if test -f "$PATH_TO_SNMPGETNEXT" | 671 | if test -x "$PATH_TO_SNMPGETNEXT" |
651 | then | 672 | then |
652 | AC_DEFINE_UNQUOTED(PATH_TO_SNMPGETNEXT,"$PATH_TO_SNMPGETNEXT") | 673 | AC_DEFINE_UNQUOTED(PATH_TO_SNMPGETNEXT,"$PATH_TO_SNMPGETNEXT") |
653 | fi | 674 | fi |
654 | 675 | ||
676 | if ( $PERL -MNet::SNMP -e 'print $Net::SNMP::VERSION;' ) | ||
677 | then | ||
678 | echo "Found Net::SNMP perl module" | ||
679 | else | ||
680 | echo "** Tried $PERL - install Net::SNMP perl module if you want to" | ||
681 | echo " use the perl snmp plugins" | ||
682 | fi | ||
683 | |||
655 | AC_PATH_PROG(PATH_TO_QUAKESTAT,quakestat) | 684 | AC_PATH_PROG(PATH_TO_QUAKESTAT,quakestat) |
656 | AC_PATH_PROG(PATH_TO_QSTAT,qstat) | 685 | AC_PATH_PROG(PATH_TO_QSTAT,qstat) |
657 | if test -n "$PATH_TO_QUAKESTAT" | 686 | if test -x "$PATH_TO_QUAKESTAT" |
658 | then | 687 | then |
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" |
661 | elif test -n "$PATH_TO_QSTAT" | 690 | elif test -x "$PATH_TO_QSTAT" |
662 | then | 691 | then |
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 | |||
667 | fi | 696 | fi |
668 | 697 | ||
669 | AC_PATH_PROG(PATH_TO_FPING,fping) | 698 | AC_PATH_PROG(PATH_TO_FPING,fping) |
670 | if test -n "$PATH_TO_FPING" | 699 | if test -x "$PATH_TO_FPING" |
671 | then | 700 | then |
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 | |||
676 | fi | 705 | fi |
677 | 706 | ||
678 | AC_PATH_PROG(PATH_TO_SSH,ssh) | 707 | AC_PATH_PROG(PATH_TO_SSH,ssh) |
679 | if test -f "$PATH_TO_SSH" | 708 | if test -x "$PATH_TO_SSH" |
680 | then | 709 | then |
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; | |||
19 | sub support(); | 22 | sub support(); |
20 | sub is_hostname; | 23 | sub 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 | ||
25 | sub print_revision ($$) { | 36 | sub print_revision ($$) { |
26 | my $commandName = shift; | 37 | my $commandName = shift; |
27 | my $pluginRevision = shift; | 38 | my $pluginRevision = shift; |