Imported Upstream version 1.4.13+git200906171200
This commit is contained in:
parent
4ab9f0d24c
commit
d0b8ab8112
362 changed files with 34110 additions and 10773 deletions
|
@ -1,5 +1,14 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
if RELEASE_PRESENT
|
||||
NP_VERSION = $(PACKAGE_VERSION)
|
||||
else
|
||||
NP-VERSION-FILE: .FORCE-NP-VERSION-FILE
|
||||
@$(SHELL_PATH) $(top_srcdir)/NP-VERSION-GEN
|
||||
.FORCE-NP-VERSION-FILE:
|
||||
-include NP-VERSION-FILE
|
||||
endif
|
||||
|
||||
SUFFIXES = .pl .sh
|
||||
|
||||
VPATH=$(top_srcdir) $(top_srcdir)/plugins-scripts $(top_srcdir)/plugins-scripts/t
|
||||
|
@ -29,9 +38,13 @@ test-debug:
|
|||
CLEANFILES=$(libexec_SCRIPTS)
|
||||
|
||||
.pl :
|
||||
$(AWK) -f ./subst $< > $@
|
||||
NP_VERSION=$(NP_VERSION) $(AWK) -f ./subst $< > $@
|
||||
chmod +x $@
|
||||
|
||||
.sh :
|
||||
$(AWK) -f ./subst $< > $@
|
||||
NP_VERSION=$(NP_VERSION) $(AWK) -f ./subst $< > $@
|
||||
chmod +x $@
|
||||
|
||||
clean-local:
|
||||
rm -f NP-VERSION-FILE
|
||||
|
||||
|
|
|
@ -39,17 +39,19 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
|
|||
$(srcdir)/subst.in $(srcdir)/utils.pm.in $(srcdir)/utils.sh.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/np_mysqlclient.m4 \
|
||||
$(top_srcdir)/gl/m4/alloca.m4 \
|
||||
$(top_srcdir)/gl/m4/00gnulib.m4 $(top_srcdir)/gl/m4/alloca.m4 \
|
||||
$(top_srcdir)/gl/m4/arpa_inet_h.m4 \
|
||||
$(top_srcdir)/gl/m4/base64.m4 $(top_srcdir)/gl/m4/c-strtod.m4 \
|
||||
$(top_srcdir)/gl/m4/cloexec.m4 $(top_srcdir)/gl/m4/codeset.m4 \
|
||||
$(top_srcdir)/gl/m4/dirname.m4 $(top_srcdir)/gl/m4/dos.m4 \
|
||||
$(top_srcdir)/gl/m4/base64.m4 $(top_srcdir)/gl/m4/btowc.m4 \
|
||||
$(top_srcdir)/gl/m4/c-strtod.m4 $(top_srcdir)/gl/m4/cloexec.m4 \
|
||||
$(top_srcdir)/gl/m4/codeset.m4 $(top_srcdir)/gl/m4/dirname.m4 \
|
||||
$(top_srcdir)/gl/m4/dos.m4 \
|
||||
$(top_srcdir)/gl/m4/double-slash-root.m4 \
|
||||
$(top_srcdir)/gl/m4/eoverflow.m4 $(top_srcdir)/gl/m4/error.m4 \
|
||||
$(top_srcdir)/gl/m4/errno_h.m4 $(top_srcdir)/gl/m4/error.m4 \
|
||||
$(top_srcdir)/gl/m4/exitfail.m4 \
|
||||
$(top_srcdir)/gl/m4/extensions.m4 \
|
||||
$(top_srcdir)/gl/m4/fcntl-safer.m4 \
|
||||
$(top_srcdir)/gl/m4/float_h.m4 $(top_srcdir)/gl/m4/floorf.m4 \
|
||||
$(top_srcdir)/gl/m4/fcntl_h.m4 $(top_srcdir)/gl/m4/float_h.m4 \
|
||||
$(top_srcdir)/gl/m4/floorf.m4 \
|
||||
$(top_srcdir)/gl/m4/fstypename.m4 \
|
||||
$(top_srcdir)/gl/m4/fsusage.m4 \
|
||||
$(top_srcdir)/gl/m4/getaddrinfo.m4 \
|
||||
|
@ -59,7 +61,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/np_mysqlclient.m4 \
|
|||
$(top_srcdir)/gl/m4/glibc21.m4 \
|
||||
$(top_srcdir)/gl/m4/gnulib-common.m4 \
|
||||
$(top_srcdir)/gl/m4/gnulib-comp.m4 \
|
||||
$(top_srcdir)/gl/m4/iconv.m4 \
|
||||
$(top_srcdir)/gl/m4/hostent.m4 $(top_srcdir)/gl/m4/iconv.m4 \
|
||||
$(top_srcdir)/gl/m4/include_next.m4 \
|
||||
$(top_srcdir)/gl/m4/inet_ntop.m4 $(top_srcdir)/gl/m4/inline.m4 \
|
||||
$(top_srcdir)/gl/m4/intlmacosx.m4 \
|
||||
|
@ -68,17 +70,24 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/np_mysqlclient.m4 \
|
|||
$(top_srcdir)/gl/m4/lib-ld.m4 $(top_srcdir)/gl/m4/lib-link.m4 \
|
||||
$(top_srcdir)/gl/m4/lib-prefix.m4 \
|
||||
$(top_srcdir)/gl/m4/localcharset.m4 \
|
||||
$(top_srcdir)/gl/m4/locale-fr.m4 \
|
||||
$(top_srcdir)/gl/m4/locale-ja.m4 \
|
||||
$(top_srcdir)/gl/m4/locale-zh.m4 \
|
||||
$(top_srcdir)/gl/m4/longlong.m4 \
|
||||
$(top_srcdir)/gl/m4/ls-mntd-fs.m4 \
|
||||
$(top_srcdir)/gl/m4/malloc.m4 $(top_srcdir)/gl/m4/math_h.m4 \
|
||||
$(top_srcdir)/gl/m4/mbstate_t.m4 \
|
||||
$(top_srcdir)/gl/m4/mbrtowc.m4 $(top_srcdir)/gl/m4/mbsinit.m4 \
|
||||
$(top_srcdir)/gl/m4/mbstate_t.m4 $(top_srcdir)/gl/m4/mktime.m4 \
|
||||
$(top_srcdir)/gl/m4/mountlist.m4 \
|
||||
$(top_srcdir)/gl/m4/multiarch.m4 \
|
||||
$(top_srcdir)/gl/m4/netdb_h.m4 \
|
||||
$(top_srcdir)/gl/m4/netinet_in_h.m4 $(top_srcdir)/gl/m4/nls.m4 \
|
||||
$(top_srcdir)/gl/m4/onceonly_2_57.m4 $(top_srcdir)/gl/m4/po.m4 \
|
||||
$(top_srcdir)/gl/m4/onceonly.m4 $(top_srcdir)/gl/m4/open.m4 \
|
||||
$(top_srcdir)/gl/m4/po.m4 $(top_srcdir)/gl/m4/printf.m4 \
|
||||
$(top_srcdir)/gl/m4/progtest.m4 $(top_srcdir)/gl/m4/regex.m4 \
|
||||
$(top_srcdir)/gl/m4/safe-read.m4 \
|
||||
$(top_srcdir)/gl/m4/safe-write.m4 \
|
||||
$(top_srcdir)/gl/m4/size_max.m4 \
|
||||
$(top_srcdir)/gl/m4/servent.m4 $(top_srcdir)/gl/m4/size_max.m4 \
|
||||
$(top_srcdir)/gl/m4/snprintf.m4 $(top_srcdir)/gl/m4/socklen.m4 \
|
||||
$(top_srcdir)/gl/m4/sockpfaf.m4 $(top_srcdir)/gl/m4/ssize_t.m4 \
|
||||
$(top_srcdir)/gl/m4/stdbool.m4 $(top_srcdir)/gl/m4/stdint.m4 \
|
||||
|
@ -88,13 +97,16 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/np_mysqlclient.m4 \
|
|||
$(top_srcdir)/gl/m4/string_h.m4 $(top_srcdir)/gl/m4/strndup.m4 \
|
||||
$(top_srcdir)/gl/m4/strnlen.m4 \
|
||||
$(top_srcdir)/gl/m4/sys_socket_h.m4 \
|
||||
$(top_srcdir)/gl/m4/time_h.m4 $(top_srcdir)/gl/m4/time_r.m4 \
|
||||
$(top_srcdir)/gl/m4/timegm.m4 \
|
||||
$(top_srcdir)/gl/m4/unistd-safer.m4 \
|
||||
$(top_srcdir)/gl/m4/unistd_h.m4 \
|
||||
$(top_srcdir)/gl/m4/vasnprintf.m4 \
|
||||
$(top_srcdir)/gl/m4/vasprintf.m4 \
|
||||
$(top_srcdir)/gl/m4/vsnprintf.m4 $(top_srcdir)/gl/m4/wchar.m4 \
|
||||
$(top_srcdir)/gl/m4/wchar_t.m4 $(top_srcdir)/gl/m4/wctype.m4 \
|
||||
$(top_srcdir)/gl/m4/wint_t.m4 $(top_srcdir)/gl/m4/xalloc.m4 \
|
||||
$(top_srcdir)/gl/m4/wchar_t.m4 $(top_srcdir)/gl/m4/wcrtomb.m4 \
|
||||
$(top_srcdir)/gl/m4/wctype.m4 $(top_srcdir)/gl/m4/wint_t.m4 \
|
||||
$(top_srcdir)/gl/m4/write.m4 $(top_srcdir)/gl/m4/xalloc.m4 \
|
||||
$(top_srcdir)/gl/m4/xsize.m4 $(top_srcdir)/gl/m4/xstrndup.m4 \
|
||||
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
|
@ -116,6 +128,7 @@ ALLOCA_H = @ALLOCA_H@
|
|||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
|
||||
AR = @AR@
|
||||
ARPA_INET_H = @ARPA_INET_H@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
|
@ -146,16 +159,24 @@ ECHO_C = @ECHO_C@
|
|||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EOVERFLOW = @EOVERFLOW@
|
||||
EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@
|
||||
EMULTIHOP_VALUE = @EMULTIHOP_VALUE@
|
||||
ENOLINK_HIDDEN = @ENOLINK_HIDDEN@
|
||||
ENOLINK_VALUE = @ENOLINK_VALUE@
|
||||
EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
|
||||
EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
|
||||
ERRNO_H = @ERRNO_H@
|
||||
EXEEXT = @EXEEXT@
|
||||
EXTRAS = @EXTRAS@
|
||||
EXTRAS_ROOT = @EXTRAS_ROOT@
|
||||
EXTRA_NETOBJS = @EXTRA_NETOBJS@
|
||||
EXTRA_TEST = @EXTRA_TEST@
|
||||
F77 = @F77@
|
||||
FCNTL_H = @FCNTL_H@
|
||||
FFLAGS = @FFLAGS@
|
||||
FLOAT_H = @FLOAT_H@
|
||||
FLOORF_LIBM = @FLOORF_LIBM@
|
||||
GETADDRINFO_LIB = @GETADDRINFO_LIB@
|
||||
GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
|
||||
GETOPT_H = @GETOPT_H@
|
||||
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
|
||||
|
@ -164,47 +185,85 @@ GL_COND_LIBTOOL_FALSE = @GL_COND_LIBTOOL_FALSE@
|
|||
GL_COND_LIBTOOL_TRUE = @GL_COND_LIBTOOL_TRUE@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
GMSGFMT_015 = @GMSGFMT_015@
|
||||
GNULIB_ACCEPT = @GNULIB_ACCEPT@
|
||||
GNULIB_ATOLL = @GNULIB_ATOLL@
|
||||
GNULIB_BIND = @GNULIB_BIND@
|
||||
GNULIB_BTOWC = @GNULIB_BTOWC@
|
||||
GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
|
||||
GNULIB_CEILF = @GNULIB_CEILF@
|
||||
GNULIB_CEILL = @GNULIB_CEILL@
|
||||
GNULIB_CHOWN = @GNULIB_CHOWN@
|
||||
GNULIB_CLOSE = @GNULIB_CLOSE@
|
||||
GNULIB_CONNECT = @GNULIB_CONNECT@
|
||||
GNULIB_DPRINTF = @GNULIB_DPRINTF@
|
||||
GNULIB_DUP2 = @GNULIB_DUP2@
|
||||
GNULIB_ENVIRON = @GNULIB_ENVIRON@
|
||||
GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
|
||||
GNULIB_FCHDIR = @GNULIB_FCHDIR@
|
||||
GNULIB_FCLOSE = @GNULIB_FCLOSE@
|
||||
GNULIB_FFLUSH = @GNULIB_FFLUSH@
|
||||
GNULIB_FLOORF = @GNULIB_FLOORF@
|
||||
GNULIB_FLOORL = @GNULIB_FLOORL@
|
||||
GNULIB_FOPEN = @GNULIB_FOPEN@
|
||||
GNULIB_FPRINTF = @GNULIB_FPRINTF@
|
||||
GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
|
||||
GNULIB_FPUTC = @GNULIB_FPUTC@
|
||||
GNULIB_FPUTS = @GNULIB_FPUTS@
|
||||
GNULIB_FREOPEN = @GNULIB_FREOPEN@
|
||||
GNULIB_FREXP = @GNULIB_FREXP@
|
||||
GNULIB_FREXPL = @GNULIB_FREXPL@
|
||||
GNULIB_FSEEK = @GNULIB_FSEEK@
|
||||
GNULIB_FSEEKO = @GNULIB_FSEEKO@
|
||||
GNULIB_FSYNC = @GNULIB_FSYNC@
|
||||
GNULIB_FTELL = @GNULIB_FTELL@
|
||||
GNULIB_FTELLO = @GNULIB_FTELLO@
|
||||
GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
|
||||
GNULIB_FWRITE = @GNULIB_FWRITE@
|
||||
GNULIB_GETADDRINFO = @GNULIB_GETADDRINFO@
|
||||
GNULIB_GETCWD = @GNULIB_GETCWD@
|
||||
GNULIB_GETDELIM = @GNULIB_GETDELIM@
|
||||
GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
|
||||
GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@
|
||||
GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@
|
||||
GNULIB_GETLINE = @GNULIB_GETLINE@
|
||||
GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@
|
||||
GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
|
||||
GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
|
||||
GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@
|
||||
GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@
|
||||
GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@
|
||||
GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
|
||||
GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
|
||||
GNULIB_INET_NTOP = @GNULIB_INET_NTOP@
|
||||
GNULIB_INET_PTON = @GNULIB_INET_PTON@
|
||||
GNULIB_ISFINITE = @GNULIB_ISFINITE@
|
||||
GNULIB_ISINF = @GNULIB_ISINF@
|
||||
GNULIB_ISNAN = @GNULIB_ISNAN@
|
||||
GNULIB_ISNAND = @GNULIB_ISNAND@
|
||||
GNULIB_ISNANF = @GNULIB_ISNANF@
|
||||
GNULIB_ISNANL = @GNULIB_ISNANL@
|
||||
GNULIB_LCHOWN = @GNULIB_LCHOWN@
|
||||
GNULIB_LDEXPL = @GNULIB_LDEXPL@
|
||||
GNULIB_LINK = @GNULIB_LINK@
|
||||
GNULIB_LISTEN = @GNULIB_LISTEN@
|
||||
GNULIB_LSEEK = @GNULIB_LSEEK@
|
||||
GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
|
||||
GNULIB_MATHL = @GNULIB_MATHL@
|
||||
GNULIB_MBRLEN = @GNULIB_MBRLEN@
|
||||
GNULIB_MBRTOWC = @GNULIB_MBRTOWC@
|
||||
GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
|
||||
GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
|
||||
GNULIB_MBSCHR = @GNULIB_MBSCHR@
|
||||
GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
|
||||
GNULIB_MBSINIT = @GNULIB_MBSINIT@
|
||||
GNULIB_MBSLEN = @GNULIB_MBSLEN@
|
||||
GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
|
||||
GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
|
||||
GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@
|
||||
GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
|
||||
GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
|
||||
GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
|
||||
GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@
|
||||
GNULIB_MBSSEP = @GNULIB_MBSSEP@
|
||||
GNULIB_MBSSPN = @GNULIB_MBSSPN@
|
||||
GNULIB_MBSSTR = @GNULIB_MBSSTR@
|
||||
|
@ -214,18 +273,37 @@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
|
|||
GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
|
||||
GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
|
||||
GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
|
||||
GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
|
||||
GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
|
||||
GNULIB_OPEN = @GNULIB_OPEN@
|
||||
GNULIB_PERROR = @GNULIB_PERROR@
|
||||
GNULIB_PRINTF = @GNULIB_PRINTF@
|
||||
GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
|
||||
GNULIB_PUTC = @GNULIB_PUTC@
|
||||
GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
|
||||
GNULIB_PUTENV = @GNULIB_PUTENV@
|
||||
GNULIB_PUTS = @GNULIB_PUTS@
|
||||
GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
|
||||
GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
|
||||
GNULIB_READLINK = @GNULIB_READLINK@
|
||||
GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
|
||||
GNULIB_RECV = @GNULIB_RECV@
|
||||
GNULIB_RECVFROM = @GNULIB_RECVFROM@
|
||||
GNULIB_ROUND = @GNULIB_ROUND@
|
||||
GNULIB_ROUNDF = @GNULIB_ROUNDF@
|
||||
GNULIB_ROUNDL = @GNULIB_ROUNDL@
|
||||
GNULIB_RPMATCH = @GNULIB_RPMATCH@
|
||||
GNULIB_SEND = @GNULIB_SEND@
|
||||
GNULIB_SENDTO = @GNULIB_SENDTO@
|
||||
GNULIB_SETENV = @GNULIB_SETENV@
|
||||
GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@
|
||||
GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@
|
||||
GNULIB_SIGNBIT = @GNULIB_SIGNBIT@
|
||||
GNULIB_SLEEP = @GNULIB_SLEEP@
|
||||
GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
|
||||
GNULIB_SOCKET = @GNULIB_SOCKET@
|
||||
GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
|
||||
GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@
|
||||
GNULIB_STPCPY = @GNULIB_STPCPY@
|
||||
GNULIB_STPNCPY = @GNULIB_STPNCPY@
|
||||
GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
|
||||
|
@ -238,32 +316,57 @@ GNULIB_STRPBRK = @GNULIB_STRPBRK@
|
|||
GNULIB_STRSEP = @GNULIB_STRSEP@
|
||||
GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
|
||||
GNULIB_STRSTR = @GNULIB_STRSTR@
|
||||
GNULIB_STRTOD = @GNULIB_STRTOD@
|
||||
GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
|
||||
GNULIB_STRTOLL = @GNULIB_STRTOLL@
|
||||
GNULIB_STRTOULL = @GNULIB_STRTOULL@
|
||||
GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
|
||||
GNULIB_TRUNC = @GNULIB_TRUNC@
|
||||
GNULIB_TRUNCF = @GNULIB_TRUNCF@
|
||||
GNULIB_TRUNCL = @GNULIB_TRUNCL@
|
||||
GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
|
||||
GNULIB_UNSETENV = @GNULIB_UNSETENV@
|
||||
GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
|
||||
GNULIB_VDPRINTF = @GNULIB_VDPRINTF@
|
||||
GNULIB_VFPRINTF = @GNULIB_VFPRINTF@
|
||||
GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
|
||||
GNULIB_VPRINTF = @GNULIB_VPRINTF@
|
||||
GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
|
||||
GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
|
||||
GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
|
||||
GNULIB_WCRTOMB = @GNULIB_WCRTOMB@
|
||||
GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@
|
||||
GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@
|
||||
GNULIB_WCTOB = @GNULIB_WCTOB@
|
||||
GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
|
||||
GNULIB_WRITE = @GNULIB_WRITE@
|
||||
GREP = @GREP@
|
||||
HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@
|
||||
HAVE_ATOLL = @HAVE_ATOLL@
|
||||
HAVE_BTOWC = @HAVE_BTOWC@
|
||||
HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@
|
||||
HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@
|
||||
HAVE_DECL_ASINL = @HAVE_DECL_ASINL@
|
||||
HAVE_DECL_ATANL = @HAVE_DECL_ATANL@
|
||||
HAVE_DECL_COSL = @HAVE_DECL_COSL@
|
||||
HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
|
||||
HAVE_DECL_EXPL = @HAVE_DECL_EXPL@
|
||||
HAVE_DECL_FREEADDRINFO = @HAVE_DECL_FREEADDRINFO@
|
||||
HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@
|
||||
HAVE_DECL_GAI_STRERROR = @HAVE_DECL_GAI_STRERROR@
|
||||
HAVE_DECL_GETADDRINFO = @HAVE_DECL_GETADDRINFO@
|
||||
HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
|
||||
HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
|
||||
HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
|
||||
HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
|
||||
HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@
|
||||
HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@
|
||||
HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@
|
||||
HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@
|
||||
HAVE_DECL_LOGL = @HAVE_DECL_LOGL@
|
||||
HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
|
||||
HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
|
||||
HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@
|
||||
HAVE_DECL_SINL = @HAVE_DECL_SINL@
|
||||
HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
|
||||
HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@
|
||||
|
@ -276,25 +379,46 @@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
|
|||
HAVE_DECL_TANL = @HAVE_DECL_TANL@
|
||||
HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@
|
||||
HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@
|
||||
HAVE_DECL_TRUNCL = @HAVE_DECL_TRUNCL@
|
||||
HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
|
||||
HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
|
||||
HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
|
||||
HAVE_DPRINTF = @HAVE_DPRINTF@
|
||||
HAVE_DUP2 = @HAVE_DUP2@
|
||||
HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
|
||||
HAVE_FSEEKO = @HAVE_FSEEKO@
|
||||
HAVE_FSYNC = @HAVE_FSYNC@
|
||||
HAVE_FTELLO = @HAVE_FTELLO@
|
||||
HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
|
||||
HAVE_GETDOMAINNAME = @HAVE_GETDOMAINNAME@
|
||||
HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
|
||||
HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@
|
||||
HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
|
||||
HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
|
||||
HAVE_GETUSERSHELL = @HAVE_GETUSERSHELL@
|
||||
HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
|
||||
HAVE_ISNAND = @HAVE_ISNAND@
|
||||
HAVE_ISNANF = @HAVE_ISNANF@
|
||||
HAVE_ISNANL = @HAVE_ISNANL@
|
||||
HAVE_ISWCNTRL = @HAVE_ISWCNTRL@
|
||||
HAVE_LINK = @HAVE_LINK@
|
||||
HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
|
||||
HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@
|
||||
HAVE_MBRLEN = @HAVE_MBRLEN@
|
||||
HAVE_MBRTOWC = @HAVE_MBRTOWC@
|
||||
HAVE_MBSINIT = @HAVE_MBSINIT@
|
||||
HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@
|
||||
HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@
|
||||
HAVE_MEMPCPY = @HAVE_MEMPCPY@
|
||||
HAVE_MKDTEMP = @HAVE_MKDTEMP@
|
||||
HAVE_NETDB_H = @HAVE_NETDB_H@
|
||||
HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@
|
||||
HAVE_OS_H = @HAVE_OS_H@
|
||||
HAVE_RANDOM_H = @HAVE_RANDOM_H@
|
||||
HAVE_RANDOM_R = @HAVE_RANDOM_R@
|
||||
HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
|
||||
HAVE_READLINK = @HAVE_READLINK@
|
||||
HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@
|
||||
HAVE_RPMATCH = @HAVE_RPMATCH@
|
||||
HAVE_SETENV = @HAVE_SETENV@
|
||||
HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
|
||||
HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
|
||||
|
@ -308,8 +432,16 @@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
|
|||
HAVE_STRNDUP = @HAVE_STRNDUP@
|
||||
HAVE_STRPBRK = @HAVE_STRPBRK@
|
||||
HAVE_STRSEP = @HAVE_STRSEP@
|
||||
HAVE_STRTOD = @HAVE_STRTOD@
|
||||
HAVE_STRTOLL = @HAVE_STRTOLL@
|
||||
HAVE_STRTOULL = @HAVE_STRTOULL@
|
||||
HAVE_STRUCT_ADDRINFO = @HAVE_STRUCT_ADDRINFO@
|
||||
HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@
|
||||
HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@
|
||||
HAVE_STRVERSCMP = @HAVE_STRVERSCMP@
|
||||
HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
|
||||
HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
|
||||
HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
|
||||
HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
|
||||
HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@
|
||||
HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
|
||||
|
@ -317,14 +449,20 @@ HAVE_UNISTD_H = @HAVE_UNISTD_H@
|
|||
HAVE_UNSETENV = @HAVE_UNSETENV@
|
||||
HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
|
||||
HAVE_VASPRINTF = @HAVE_VASPRINTF@
|
||||
HAVE_VDPRINTF = @HAVE_VDPRINTF@
|
||||
HAVE_WCHAR_H = @HAVE_WCHAR_H@
|
||||
HAVE_WCRTOMB = @HAVE_WCRTOMB@
|
||||
HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@
|
||||
HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@
|
||||
HAVE_WCTYPE_H = @HAVE_WCTYPE_H@
|
||||
HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@
|
||||
HAVE_WINT_T = @HAVE_WINT_T@
|
||||
HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@
|
||||
HAVE__BOOL = @HAVE__BOOL@
|
||||
HOSTENT_LIB = @HOSTENT_LIB@
|
||||
HOSTNAME = @HOSTNAME@
|
||||
INCLUDE_NEXT = @INCLUDE_NEXT@
|
||||
INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
|
@ -346,6 +484,10 @@ LIBS = @LIBS@
|
|||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@
|
||||
LOCALE_FR = @LOCALE_FR@
|
||||
LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@
|
||||
LOCALE_JA = @LOCALE_JA@
|
||||
LOCALE_ZH_CN = @LOCALE_ZH_CN@
|
||||
LTLIBICONV = @LTLIBICONV@
|
||||
LTLIBINTL = @LTLIBINTL@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
|
@ -358,15 +500,21 @@ MYSQLCFLAGS = @MYSQLCFLAGS@
|
|||
MYSQLINCLUDE = @MYSQLINCLUDE@
|
||||
MYSQLLIBS = @MYSQLLIBS@
|
||||
NEED_SETGID = @NEED_SETGID@
|
||||
NETDB_H = @NETDB_H@
|
||||
NETINET_IN_H = @NETINET_IN_H@
|
||||
NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@
|
||||
NEXT_ERRNO_H = @NEXT_ERRNO_H@
|
||||
NEXT_FCNTL_H = @NEXT_FCNTL_H@
|
||||
NEXT_FLOAT_H = @NEXT_FLOAT_H@
|
||||
NEXT_MATH_H = @NEXT_MATH_H@
|
||||
NEXT_NETDB_H = @NEXT_NETDB_H@
|
||||
NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@
|
||||
NEXT_STDINT_H = @NEXT_STDINT_H@
|
||||
NEXT_STDIO_H = @NEXT_STDIO_H@
|
||||
NEXT_STDLIB_H = @NEXT_STDLIB_H@
|
||||
NEXT_STRING_H = @NEXT_STRING_H@
|
||||
NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@
|
||||
NEXT_TIME_H = @NEXT_TIME_H@
|
||||
NEXT_UNISTD_H = @NEXT_UNISTD_H@
|
||||
NEXT_WCHAR_H = @NEXT_WCHAR_H@
|
||||
NEXT_WCTYPE_H = @NEXT_WCTYPE_H@
|
||||
|
@ -408,16 +556,23 @@ PKG_ARCH = @PKG_ARCH@
|
|||
PLUGIN_TEST = @PLUGIN_TEST@
|
||||
POSUB = @POSUB@
|
||||
POW_LIB = @POW_LIB@
|
||||
PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
|
||||
PST3CFLAGS = @PST3CFLAGS@
|
||||
PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
|
||||
PYTHON = @PYTHON@
|
||||
RADIUSLIBS = @RADIUSLIBS@
|
||||
RANLIB = @RANLIB@
|
||||
RELEASE = @RELEASE@
|
||||
RELEASE_PRESENT_FALSE = @RELEASE_PRESENT_FALSE@
|
||||
RELEASE_PRESENT_TRUE = @RELEASE_PRESENT_TRUE@
|
||||
REPLACE_BTOWC = @REPLACE_BTOWC@
|
||||
REPLACE_CEILF = @REPLACE_CEILF@
|
||||
REPLACE_CEILL = @REPLACE_CEILL@
|
||||
REPLACE_CHOWN = @REPLACE_CHOWN@
|
||||
REPLACE_CLOSE = @REPLACE_CLOSE@
|
||||
REPLACE_DPRINTF = @REPLACE_DPRINTF@
|
||||
REPLACE_FCHDIR = @REPLACE_FCHDIR@
|
||||
REPLACE_FCLOSE = @REPLACE_FCLOSE@
|
||||
REPLACE_FFLUSH = @REPLACE_FFLUSH@
|
||||
REPLACE_FLOORF = @REPLACE_FLOORF@
|
||||
REPLACE_FLOORL = @REPLACE_FLOORL@
|
||||
|
@ -433,12 +588,28 @@ REPLACE_FTELLO = @REPLACE_FTELLO@
|
|||
REPLACE_GETCWD = @REPLACE_GETCWD@
|
||||
REPLACE_GETLINE = @REPLACE_GETLINE@
|
||||
REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
|
||||
REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@
|
||||
REPLACE_ISFINITE = @REPLACE_ISFINITE@
|
||||
REPLACE_ISINF = @REPLACE_ISINF@
|
||||
REPLACE_ISNAN = @REPLACE_ISNAN@
|
||||
REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
|
||||
REPLACE_LCHOWN = @REPLACE_LCHOWN@
|
||||
REPLACE_LDEXPL = @REPLACE_LDEXPL@
|
||||
REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
|
||||
REPLACE_LSEEK = @REPLACE_LSEEK@
|
||||
REPLACE_MBRLEN = @REPLACE_MBRLEN@
|
||||
REPLACE_MBRTOWC = @REPLACE_MBRTOWC@
|
||||
REPLACE_MBSINIT = @REPLACE_MBSINIT@
|
||||
REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
|
||||
REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
|
||||
REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
|
||||
REPLACE_MEMMEM = @REPLACE_MEMMEM@
|
||||
REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
|
||||
REPLACE_NAN = @REPLACE_NAN@
|
||||
REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
|
||||
REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@
|
||||
REPLACE_OPEN = @REPLACE_OPEN@
|
||||
REPLACE_PERROR = @REPLACE_PERROR@
|
||||
REPLACE_PRINTF = @REPLACE_PRINTF@
|
||||
REPLACE_PUTENV = @REPLACE_PUTENV@
|
||||
REPLACE_ROUND = @REPLACE_ROUND@
|
||||
|
@ -448,19 +619,32 @@ REPLACE_SIGNBIT = @REPLACE_SIGNBIT@
|
|||
REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@
|
||||
REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
|
||||
REPLACE_SPRINTF = @REPLACE_SPRINTF@
|
||||
REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
|
||||
REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
|
||||
REPLACE_STRDUP = @REPLACE_STRDUP@
|
||||
REPLACE_STRERROR = @REPLACE_STRERROR@
|
||||
REPLACE_STRPTIME = @REPLACE_STRPTIME@
|
||||
REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
|
||||
REPLACE_STRSTR = @REPLACE_STRSTR@
|
||||
REPLACE_STRTOD = @REPLACE_STRTOD@
|
||||
REPLACE_TIMEGM = @REPLACE_TIMEGM@
|
||||
REPLACE_TRUNCL = @REPLACE_TRUNCL@
|
||||
REPLACE_VASPRINTF = @REPLACE_VASPRINTF@
|
||||
REPLACE_VDPRINTF = @REPLACE_VDPRINTF@
|
||||
REPLACE_VFPRINTF = @REPLACE_VFPRINTF@
|
||||
REPLACE_VPRINTF = @REPLACE_VPRINTF@
|
||||
REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
|
||||
REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
|
||||
REPLACE_WCRTOMB = @REPLACE_WCRTOMB@
|
||||
REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@
|
||||
REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
|
||||
REPLACE_WCTOB = @REPLACE_WCTOB@
|
||||
REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
|
||||
REPLACE_WRITE = @REPLACE_WRITE@
|
||||
REV_DATESTAMP = @REV_DATESTAMP@
|
||||
REV_TIMESTAMP = @REV_TIMESTAMP@
|
||||
SCRIPT_TEST = @SCRIPT_TEST@
|
||||
SERVENT_LIB = @SERVENT_LIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SH = @SH@
|
||||
SHELL = @SHELL@
|
||||
|
@ -474,6 +658,11 @@ STDINT_H = @STDINT_H@
|
|||
STRIP = @STRIP@
|
||||
SUPPORT = @SUPPORT@
|
||||
SYS_SOCKET_H = @SYS_SOCKET_H@
|
||||
SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
|
||||
TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
|
||||
UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
|
||||
USE_LIBTAP_LOCAL_FALSE = @USE_LIBTAP_LOCAL_FALSE@
|
||||
USE_LIBTAP_LOCAL_TRUE = @USE_LIBTAP_LOCAL_TRUE@
|
||||
USE_NLS = @USE_NLS@
|
||||
USE_PARSE_INI_FALSE = @USE_PARSE_INI_FALSE@
|
||||
USE_PARSE_INI_TRUE = @USE_PARSE_INI_TRUE@
|
||||
|
@ -541,6 +730,7 @@ sharedstatedir = @sharedstatedir@
|
|||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
with_trusted_path = @with_trusted_path@
|
||||
@RELEASE_PRESENT_TRUE@NP_VERSION = $(PACKAGE_VERSION)
|
||||
SUFFIXES = .pl .sh
|
||||
libexec_SCRIPTS = check_breeze check_disk_smb check_flexlm check_ircd \
|
||||
check_log check_oracle check_rpc check_sensors check_wave \
|
||||
|
@ -765,7 +955,7 @@ maintainer-clean-generic:
|
|||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
clean-am: clean-generic clean-libtool clean-local mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
|
@ -810,9 +1000,9 @@ ps-am:
|
|||
uninstall-am: uninstall-info-am uninstall-libexecSCRIPTS
|
||||
|
||||
.PHONY: all all-am check check-TESTS check-am clean clean-generic \
|
||||
clean-libtool distclean distclean-generic distclean-libtool \
|
||||
distdir dvi dvi-am html html-am info info-am install \
|
||||
install-am install-data install-data-am install-exec \
|
||||
clean-libtool clean-local distclean distclean-generic \
|
||||
distclean-libtool distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-exec \
|
||||
install-exec-am install-info install-info-am \
|
||||
install-libexecSCRIPTS install-man install-strip installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
|
@ -820,6 +1010,10 @@ uninstall-am: uninstall-info-am uninstall-libexecSCRIPTS
|
|||
mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
|
||||
uninstall-info-am uninstall-libexecSCRIPTS
|
||||
|
||||
@RELEASE_PRESENT_FALSE@NP-VERSION-FILE: .FORCE-NP-VERSION-FILE
|
||||
@RELEASE_PRESENT_FALSE@ @$(SHELL_PATH) $(top_srcdir)/NP-VERSION-GEN
|
||||
@RELEASE_PRESENT_FALSE@.FORCE-NP-VERSION-FILE:
|
||||
@RELEASE_PRESENT_FALSE@-include NP-VERSION-FILE
|
||||
|
||||
test:
|
||||
perl -I $(top_builddir) -I $(top_srcdir) ../test.pl
|
||||
|
@ -830,12 +1024,15 @@ test-debug:
|
|||
NPTEST_DEBUG=1 HARNESS_VERBOSE=1 perl -I $(top_builddir) -I $(top_srcdir) ../test.pl t/utils.t # utils.t is excluded from above, so manually ask to test
|
||||
|
||||
.pl :
|
||||
$(AWK) -f ./subst $< > $@
|
||||
NP_VERSION=$(NP_VERSION) $(AWK) -f ./subst $< > $@
|
||||
chmod +x $@
|
||||
|
||||
.sh :
|
||||
$(AWK) -f ./subst $< > $@
|
||||
NP_VERSION=$(NP_VERSION) $(AWK) -f ./subst $< > $@
|
||||
chmod +x $@
|
||||
|
||||
clean-local:
|
||||
rm -f NP-VERSION-FILE
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
|
|
|
@ -26,7 +26,7 @@ GetOptions
|
|||
"C=s" => \$opt_C, "community=s" => \$opt_C);
|
||||
|
||||
if ($opt_V) {
|
||||
print_revision($PROGNAME,'$Revision: 820 $');
|
||||
print_revision($PROGNAME,'@NP_VERSION@');
|
||||
exit $ERRORS{'OK'};
|
||||
}
|
||||
|
||||
|
@ -65,7 +65,7 @@ sub print_usage () {
|
|||
}
|
||||
|
||||
sub print_help () {
|
||||
print_revision($PROGNAME,'$Revision: 820 $');
|
||||
print_revision($PROGNAME,'@NP_VERSION@');
|
||||
print "Copyright (c) 2000 Jeffrey Blank/Karl DeBisschop
|
||||
|
||||
This plugin reports the signal strength of a Breezecom wireless equipment
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
# drives is a pain in the butt
|
||||
# 2-May-2002 - SGhosh fix for embedded perl
|
||||
#
|
||||
# $Id: check_disk_smb.pl 1247 2005-10-13 10:14:33Z seanius $
|
||||
#
|
||||
|
||||
require 5.004;
|
||||
|
@ -52,7 +51,7 @@ GetOptions
|
|||
"H=s" => \$opt_H, "hostname=s" => \$opt_H);
|
||||
|
||||
if ($opt_V) {
|
||||
print_revision($PROGNAME,'$Revision: 1247 $'); #'
|
||||
print_revision($PROGNAME,'@NP_VERSION@'); #'
|
||||
exit $ERRORS{'OK'};
|
||||
}
|
||||
|
||||
|
@ -243,7 +242,7 @@ sub print_usage () {
|
|||
}
|
||||
|
||||
sub print_help () {
|
||||
print_revision($PROGNAME,'$Revision: 1247 $');
|
||||
print_revision($PROGNAME,'@NP_VERSION@');
|
||||
print "Copyright (c) 2000 Michael Anthon/Karl DeBisschop
|
||||
|
||||
Perl Check SMB Disk plugin for Nagios
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#!/bin/perl -w
|
||||
# $Id: check_file_age.pl 1750 2007-07-07 11:54:29Z psychotrahe $
|
||||
|
||||
# check_file_age.pl Copyright (C) 2003 Steven Grimm <koreth-nagios@midwinter.com>
|
||||
#
|
||||
|
@ -55,7 +54,7 @@ GetOptions(
|
|||
"C=f" => \$opt_C, "critical-size=f" => \$opt_C);
|
||||
|
||||
if ($opt_V) {
|
||||
print_revision($PROGNAME, '$Revision: 1750 $');
|
||||
print_revision($PROGNAME, '@NP_VERSION@');
|
||||
exit $ERRORS{'OK'};
|
||||
}
|
||||
|
||||
|
@ -102,7 +101,7 @@ sub print_usage () {
|
|||
}
|
||||
|
||||
sub print_help () {
|
||||
print_revision($PROGNAME, '$Revision: 1750 $');
|
||||
print_revision($PROGNAME, '@NP_VERSION@');
|
||||
print "Copyright (c) 2003 Steven Grimm\n\n";
|
||||
print_usage();
|
||||
print "\n";
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
# initial version: 9-10-99 Ernst-Dieter Martin edmt@infineon.com
|
||||
#
|
||||
# License: GPL
|
||||
# $Id: check_flexlm.pl 287 2003-02-04 06:16:16Z sghosh $
|
||||
#
|
||||
# lmstat output patches from Steve Rigler/Cliff Rice 13-Apr-2002
|
||||
# srigler@marathonoil.com,cerice@marathonoil.com
|
||||
|
@ -57,7 +56,7 @@ GetOptions
|
|||
"t=i" => \$opt_t, "timeout=i" => \$opt_t);
|
||||
|
||||
if ($opt_V) {
|
||||
print_revision($PROGNAME,'$Revision: 287 $');
|
||||
print_revision($PROGNAME,'@NP_VERSION@');
|
||||
exit $ERRORS{'OK'};
|
||||
}
|
||||
|
||||
|
@ -217,7 +216,7 @@ sub print_usage () {
|
|||
}
|
||||
|
||||
sub print_help () {
|
||||
print_revision($PROGNAME,'$Revision: 287 $');
|
||||
print_revision($PROGNAME,'@NP_VERSION@');
|
||||
print "Copyright (c) 2000 Ernst-Dieter Martin/Karl DeBisschop
|
||||
|
||||
Check available flexlm license managers
|
||||
|
|
463
plugins-scripts/check_ifoperstatus.pl
Normal file → Executable file
463
plugins-scripts/check_ifoperstatus.pl
Normal file → Executable file
|
@ -25,7 +25,6 @@
|
|||
# Report bugs to: nagiosplug-help@lists.sourceforge.net
|
||||
#
|
||||
# 11.01.2000 Version 1.0
|
||||
# $Id: check_ifoperstatus.pl 1642 2007-03-16 12:11:46Z gonzai $
|
||||
#
|
||||
# Patches from Guy Van Den Bergh to warn on ifadminstatus down interfaces
|
||||
# instead of critical.
|
||||
|
@ -44,29 +43,31 @@ use Getopt::Long;
|
|||
|
||||
my $PROGNAME = "check_ifoperstatus";
|
||||
sub print_help ();
|
||||
sub usage ();
|
||||
sub usage ($);
|
||||
sub print_usage ();
|
||||
sub process_arguments ();
|
||||
|
||||
my $timeout;
|
||||
my $status;
|
||||
my %ifOperStatus = ('1','up',
|
||||
'2','down',
|
||||
'3','testing',
|
||||
'4','unknown',
|
||||
'5','dormant',
|
||||
'6','notPresent',
|
||||
'7','lowerLayerDown'); # down due to the state of lower layer interface(s)
|
||||
'2','down',
|
||||
'3','testing',
|
||||
'4','unknown',
|
||||
'5','dormant',
|
||||
'6','notPresent',
|
||||
'7','lowerLayerDown'); # down due to the state of lower layer interface(s)
|
||||
|
||||
my $state = "UNKNOWN";
|
||||
my $answer = "";
|
||||
my $snmpkey = 0;
|
||||
my $community = "public";
|
||||
my $maxmsgsize = 1472 ; # Net::SNMP default is 1472
|
||||
my ($seclevel, $authproto, $secname, $authpass, $privpass, $auth, $priv, $context);
|
||||
my ($seclevel, $authproto, $secname, $authpass, $privpass, $privproto, $auth, $priv, $context);
|
||||
my $port = 161;
|
||||
my @snmpoids;
|
||||
my $sysUptime = '1.3.6.1.2.1.1.3.0';
|
||||
my $snmpIfDescr = '1.3.6.1.2.1.2.2.1.2';
|
||||
my $snmpIfType = '1.3.6.1.2.1.2.2.1.3';
|
||||
my $snmpIfAdminStatus = '1.3.6.1.2.1.2.2.1.7';
|
||||
my $snmpIfOperStatus = '1.3.6.1.2.1.2.2.1.8';
|
||||
my $snmpIfName = '1.3.6.1.2.1.31.1.1.1.1';
|
||||
|
@ -83,11 +84,13 @@ my $ifXTable;
|
|||
my $opt_h ;
|
||||
my $opt_V ;
|
||||
my $ifdescr;
|
||||
my $iftype;
|
||||
my $key;
|
||||
my $lastc;
|
||||
my $dormantWarn;
|
||||
my $adminWarn;
|
||||
my $name;
|
||||
my %session_opts;
|
||||
|
||||
### Validate Arguments
|
||||
|
||||
|
@ -96,24 +99,36 @@ $status = process_arguments();
|
|||
|
||||
# Just in case of problems, let's not hang Nagios
|
||||
$SIG{'ALRM'} = sub {
|
||||
print ("ERROR: No snmp response from $hostname (alarm)\n");
|
||||
exit $ERRORS{"UNKNOWN"};
|
||||
print ("ERROR: No snmp response from $hostname (alarm)\n");
|
||||
exit $ERRORS{"UNKNOWN"};
|
||||
};
|
||||
|
||||
alarm($timeout);
|
||||
|
||||
($session, $error) = Net::SNMP->session(%session_opts);
|
||||
|
||||
|
||||
if (!defined($session)) {
|
||||
$state='UNKNOWN';
|
||||
$answer=$error;
|
||||
print ("$state: $answer\n");
|
||||
exit $ERRORS{$state};
|
||||
}
|
||||
|
||||
## map ifdescr to ifindex - should look at being able to cache this value
|
||||
|
||||
if (defined $ifdescr) {
|
||||
if (defined $ifdescr || defined $iftype) {
|
||||
# escape "/" in ifdescr - very common in the Cisco world
|
||||
$ifdescr =~ s/\//\\\//g;
|
||||
|
||||
$status=fetch_ifdescr(); # if using on device with large number of interfaces
|
||||
# recommend use of SNMP v2 (get-bulk)
|
||||
if (defined $iftype) {
|
||||
$status=fetch_ifindex($snmpIfType, $iftype);
|
||||
} else {
|
||||
$ifdescr =~ s/\//\\\//g;
|
||||
$status=fetch_ifindex($snmpIfDescr, $ifdescr); # if using on device with large number of interfaces
|
||||
# recommend use of SNMP v2 (get-bulk)
|
||||
}
|
||||
if ($status==0) {
|
||||
$state = "UNKNOWN";
|
||||
printf "$state: could not retrive ifdescr snmpkey - $status-$snmpkey\n";
|
||||
printf "$state: could not retrive ifdescr/iftype snmpkey - $status-$snmpkey\n";
|
||||
$session->close;
|
||||
exit $ERRORS{$state};
|
||||
}
|
||||
|
@ -134,99 +149,100 @@ push(@snmpoids,$snmpIfDescr);
|
|||
push(@snmpoids,$snmpIfName) if (defined $ifXTable) ;
|
||||
push(@snmpoids,$snmpIfAlias) if (defined $ifXTable) ;
|
||||
|
||||
if (!defined($response = $session->get_request(@snmpoids))) {
|
||||
$answer=$session->error;
|
||||
$session->close;
|
||||
$state = 'WARNING';
|
||||
print ("$state: SNMP error: $answer\n");
|
||||
exit $ERRORS{$state};
|
||||
}
|
||||
if (!defined($response = $session->get_request(@snmpoids))) {
|
||||
$answer=$session->error;
|
||||
$session->close;
|
||||
$state = 'WARNING';
|
||||
print ("$state: SNMP error: $answer\n");
|
||||
exit $ERRORS{$state};
|
||||
}
|
||||
|
||||
$answer = sprintf("host '%s', %s(%s) is %s\n",
|
||||
$hostname,
|
||||
$response->{$snmpIfDescr},
|
||||
$snmpkey,
|
||||
$ifOperStatus{$response->{$snmpIfOperStatus}}
|
||||
);
|
||||
$answer = sprintf("host '%s', %s(%s) is %s\n",
|
||||
$hostname,
|
||||
$response->{$snmpIfDescr},
|
||||
$snmpkey,
|
||||
$ifOperStatus{$response->{$snmpIfOperStatus}}
|
||||
);
|
||||
|
||||
|
||||
## Check to see if ifName match is requested and it matches - exit if no match
|
||||
## not the interface we want to monitor
|
||||
if ( defined $name && not ($response->{$snmpIfName} eq $name) ) {
|
||||
$state = 'UNKNOWN';
|
||||
$answer = "Interface name ($name) doesn't match snmp value ($response->{$snmpIfName}) (index $snmpkey)";
|
||||
print ("$state: $answer");
|
||||
exit $ERRORS{$state};
|
||||
}
|
||||
## Check to see if ifName match is requested and it matches - exit if no match
|
||||
## not the interface we want to monitor
|
||||
if ( defined $ifName && not ($response->{$snmpIfName} eq $ifName) ) {
|
||||
$state = 'UNKNOWN';
|
||||
$answer = "Interface name ($ifName) doesn't match snmp value ($response->{$snmpIfName}) (index $snmpkey)";
|
||||
print ("$state: $answer\n");
|
||||
exit $ERRORS{$state};
|
||||
}
|
||||
|
||||
## define the interface name
|
||||
if (defined $ifXTable) {
|
||||
$name = $response->{$snmpIfName} ." - " .$response->{$snmpIfAlias} ;
|
||||
}else{
|
||||
$name = $response->{$snmpIfDescr} ;
|
||||
}
|
||||
|
||||
## if AdminStatus is down - some one made a consious effort to change config
|
||||
##
|
||||
if ( not ($response->{$snmpIfAdminStatus} == 1) ) {
|
||||
$answer = "Interface $name (index $snmpkey) is administratively down.";
|
||||
if ( not defined $adminWarn or $adminWarn eq "w" ) {
|
||||
$state = 'WARNING';
|
||||
} elsif ( $adminWarn eq "i" ) {
|
||||
$state = 'OK';
|
||||
} elsif ( $adminWarn eq "c" ) {
|
||||
$state = 'CRITICAL';
|
||||
} else { # If wrong value for -a, say warning
|
||||
$state = 'WARNING';
|
||||
}
|
||||
}
|
||||
## Check operational status
|
||||
elsif ( $response->{$snmpIfOperStatus} == 2 ) {
|
||||
$state = 'CRITICAL';
|
||||
$answer = "Interface $name (index $snmpkey) is down.";
|
||||
} elsif ( $response->{$snmpIfOperStatus} == 5 ) {
|
||||
if (defined $dormantWarn ) {
|
||||
if ($dormantWarn eq "w") {
|
||||
$state = 'WARNING';
|
||||
$answer = "Interface $name (index $snmpkey) is dormant.";
|
||||
}elsif($dormantWarn eq "c") {
|
||||
$state = 'CRITICAL';
|
||||
$answer = "Interface $name (index $snmpkey) is dormant.";
|
||||
}elsif($dormantWarn eq "i") {
|
||||
$state = 'OK';
|
||||
$answer = "Interface $name (index $snmpkey) is dormant.";
|
||||
}
|
||||
}else{
|
||||
# dormant interface - but warning/critical/ignore not requested
|
||||
$state = 'CRITICAL';
|
||||
$answer = "Interface $name (index $snmpkey) is dormant.";
|
||||
}
|
||||
} elsif ( $response->{$snmpIfOperStatus} == 6 ) {
|
||||
$state = 'CRITICAL';
|
||||
$answer = "Interface $name (index $snmpkey) notPresent - possible hotswap in progress.";
|
||||
} elsif ( $response->{$snmpIfOperStatus} == 7 ) {
|
||||
$state = 'CRITICAL';
|
||||
$answer = "Interface $name (index $snmpkey) down due to lower layer being down.";
|
||||
## define the interface name
|
||||
if (defined $ifXTable) {
|
||||
$name = $response->{$snmpIfName} ." - " .$response->{$snmpIfAlias} ;
|
||||
}else{
|
||||
$name = $response->{$snmpIfDescr} ;
|
||||
}
|
||||
|
||||
} elsif ( $response->{$snmpIfOperStatus} == 3 || $response->{$snmpIfOperStatus} == 4 ) {
|
||||
$state = 'CRITICAL';
|
||||
$answer = "Interface $name (index $snmpkey) down (testing/unknown).";
|
||||
|
||||
} else {
|
||||
$state = 'OK';
|
||||
$answer = "Interface $name (index $snmpkey) is up.";
|
||||
}
|
||||
## if AdminStatus is down - some one made a consious effort to change config
|
||||
##
|
||||
if ( not ($response->{$snmpIfAdminStatus} == 1) ) {
|
||||
$answer = "Interface $name (index $snmpkey) is administratively down.";
|
||||
if ( not defined $adminWarn or $adminWarn eq "w" ) {
|
||||
$state = 'WARNING';
|
||||
} elsif ( $adminWarn eq "i" ) {
|
||||
$state = 'OK';
|
||||
} elsif ( $adminWarn eq "c" ) {
|
||||
$state = 'CRITICAL';
|
||||
} else { # If wrong value for -a, say warning
|
||||
$state = 'WARNING';
|
||||
}
|
||||
}
|
||||
## Check operational status
|
||||
elsif ( $response->{$snmpIfOperStatus} == 2 ) {
|
||||
$state = 'CRITICAL';
|
||||
$answer = "Interface $name (index $snmpkey) is down.";
|
||||
} elsif ( $response->{$snmpIfOperStatus} == 5 ) {
|
||||
if (defined $dormantWarn ) {
|
||||
if ($dormantWarn eq "w") {
|
||||
$state = 'WARNING';
|
||||
$answer = "Interface $name (index $snmpkey) is dormant.";
|
||||
}elsif($dormantWarn eq "c") {
|
||||
$state = 'CRITICAL';
|
||||
$answer = "Interface $name (index $snmpkey) is dormant.";
|
||||
}elsif($dormantWarn eq "i") {
|
||||
$state = 'OK';
|
||||
$answer = "Interface $name (index $snmpkey) is dormant.";
|
||||
}
|
||||
}else{
|
||||
# dormant interface - but warning/critical/ignore not requested
|
||||
$state = 'CRITICAL';
|
||||
$answer = "Interface $name (index $snmpkey) is dormant.";
|
||||
}
|
||||
} elsif ( $response->{$snmpIfOperStatus} == 6 ) {
|
||||
$state = 'CRITICAL';
|
||||
$answer = "Interface $name (index $snmpkey) notPresent - possible hotswap in progress.";
|
||||
} elsif ( $response->{$snmpIfOperStatus} == 7 ) {
|
||||
$state = 'CRITICAL';
|
||||
$answer = "Interface $name (index $snmpkey) down due to lower layer being down.";
|
||||
} elsif ( $response->{$snmpIfOperStatus} == 3 || $response->{$snmpIfOperStatus} == 4 ) {
|
||||
$state = 'CRITICAL';
|
||||
$answer = "Interface $name (index $snmpkey) down (testing/unknown).";
|
||||
} else {
|
||||
$state = 'OK';
|
||||
$answer = "Interface $name (index $snmpkey) is up.";
|
||||
}
|
||||
|
||||
|
||||
|
||||
print ("$state: $answer");
|
||||
print ("$state: $answer\n");
|
||||
exit $ERRORS{$state};
|
||||
|
||||
|
||||
### subroutines
|
||||
|
||||
sub fetch_ifdescr {
|
||||
if (!defined ($response = $session->get_table($snmpIfDescr))) {
|
||||
sub fetch_ifindex {
|
||||
my $oid = shift;
|
||||
my $lookup = shift;
|
||||
|
||||
if (!defined ($response = $session->get_table($oid))) {
|
||||
$answer=$session->error;
|
||||
$session->close;
|
||||
$state = 'CRITICAL';
|
||||
|
@ -236,10 +252,10 @@ sub fetch_ifdescr {
|
|||
}
|
||||
|
||||
foreach $key ( keys %{$response}) {
|
||||
if ($response->{$key} =~ /^$ifdescr$/) {
|
||||
if ($response->{$key} =~ /^$lookup$/) {
|
||||
$key =~ /.*\.(\d+)$/;
|
||||
$snmpkey = $1;
|
||||
#print "$ifdescr = $key / $snmpkey \n"; #debug
|
||||
#print "$lookup = $key / $snmpkey \n"; #debug
|
||||
}
|
||||
}
|
||||
unless (defined $snmpkey) {
|
||||
|
@ -252,22 +268,28 @@ sub fetch_ifdescr {
|
|||
return $snmpkey;
|
||||
}
|
||||
|
||||
sub usage() {
|
||||
printf "\nMissing arguments!\n";
|
||||
printf "\n";
|
||||
printf "usage: \n";
|
||||
printf "check_ifoperstatus -k <IF_KEY> -H <HOSTNAME> [-C <community>]\n";
|
||||
printf "Copyright (C) 2000 Christoph Kron\n";
|
||||
printf "check_ifoperstatus.pl comes with ABSOLUTELY NO WARRANTY\n";
|
||||
printf "This programm is licensed under the terms of the ";
|
||||
printf "GNU General Public License\n(check source code for details)\n";
|
||||
printf "\n\n";
|
||||
exit $ERRORS{"UNKNOWN"};
|
||||
sub usage($) {
|
||||
print "$_[0]\n";
|
||||
print_usage();
|
||||
exit $ERRORS{"UNKNOWN"};
|
||||
}
|
||||
|
||||
sub print_usage() {
|
||||
printf "\n";
|
||||
printf "usage: \n";
|
||||
printf "check_ifoperstatus -k <IF_KEY> -H <HOSTNAME> [-C <community>]\n";
|
||||
printf "Copyright (C) 2000 Christoph Kron\n";
|
||||
printf "check_ifoperstatus.pl comes with ABSOLUTELY NO WARRANTY\n";
|
||||
printf "This programm is licensed under the terms of the ";
|
||||
printf "GNU General Public License\n(check source code for details)\n";
|
||||
printf "\n\n";
|
||||
}
|
||||
|
||||
sub print_help() {
|
||||
print_revision($PROGNAME, '@NP_VERSION@');
|
||||
print_usage();
|
||||
printf "check_ifoperstatus plugin for Nagios monitors operational \n";
|
||||
printf "status of a particular network interface on the target host\n";
|
||||
printf "status of a particular network interface on the target host\n";
|
||||
printf "\nUsage:\n";
|
||||
printf " -H (--hostname) Hostname to query - (required)\n";
|
||||
printf " -C (--community) SNMP read community (defaults to public,\n";
|
||||
|
@ -278,18 +300,20 @@ sub print_help() {
|
|||
printf " if monitoring with -d\n";
|
||||
printf " -L (--seclevel) choice of \"noAuthNoPriv\", \"authNoPriv\", or \"authPriv\"\n";
|
||||
printf " -U (--secname) username for SNMPv3 context\n";
|
||||
printf " -c (--context) SNMPv3 context name (default is empty string)";
|
||||
printf " -c (--context) SNMPv3 context name (default is empty string)\n";
|
||||
printf " -A (--authpass) authentication password (cleartext ascii or localized key\n";
|
||||
printf " in hex with 0x prefix generated by using \"snmpkey\" utility\n";
|
||||
printf " in hex with 0x prefix generated by using \"snmpkey\" utility\n";
|
||||
printf " auth password and authEngineID\n";
|
||||
printf " -a (--authproto) Authentication protocol ( MD5 or SHA1)\n";
|
||||
printf " -a (--authproto) Authentication protocol (MD5 or SHA1)\n";
|
||||
printf " -X (--privpass) privacy password (cleartext ascii or localized key\n";
|
||||
printf " in hex with 0x prefix generated by using \"snmpkey\" utility\n";
|
||||
printf " in hex with 0x prefix generated by using \"snmpkey\" utility\n";
|
||||
printf " privacy password and authEngineID\n";
|
||||
printf " -P (--privproto) privacy protocol (DES or AES; default: DES)\n";
|
||||
printf " -k (--key) SNMP IfIndex value\n";
|
||||
printf " -d (--descr) SNMP ifDescr value\n";
|
||||
printf " -T (--type) SNMP ifType integer value (see http://www.iana.org/assignments/ianaiftype-mib)\n";
|
||||
printf " -p (--port) SNMP port (default 161)\n";
|
||||
printf " -I (--ifmib) Agent supports IFMIB ifXTable. Do not use if\n";
|
||||
printf " -I (--ifmib) Agent supports IFMIB ifXTable. Do not use if\n";
|
||||
printf " you don't know what this is. \n";
|
||||
printf " -n (--name) the value should match the returned ifName\n";
|
||||
printf " (Implies the use of -I)\n";
|
||||
|
@ -299,12 +323,11 @@ sub print_help() {
|
|||
printf " -t (--timeout) seconds before the plugin times out (default=$TIMEOUT)\n";
|
||||
printf " -V (--version) Plugin version\n";
|
||||
printf " -h (--help) usage help \n\n";
|
||||
printf " -k or -d must be specified\n\n";
|
||||
printf "Note: either -k or -d must be specified and -d is much more network \n";
|
||||
printf " -k or -d or -T must be specified\n\n";
|
||||
printf "Note: either -k or -d or -T must be specified and -d and -T are much more network \n";
|
||||
printf "intensive. Use it sparingly or not at all. -n is used to match against\n";
|
||||
printf "a much more descriptive ifName value in the IfXTable to verify that the\n";
|
||||
printf "snmpkey has not changed to some other network interface after a reboot.\n\n";
|
||||
print_revision($PROGNAME, '$Revision: 1642 $');
|
||||
|
||||
}
|
||||
|
||||
|
@ -319,6 +342,7 @@ sub process_arguments() {
|
|||
"U=s" => \$secname, "secname=s" => \$secname,
|
||||
"A=s" => \$authpass, "authpass=s" => \$authpass,
|
||||
"X=s" => \$privpass, "privpass=s" => \$privpass,
|
||||
"P=s" => \$privproto, "privproto=s" => \$privproto,
|
||||
"c=s" => \$context, "context=s" => \$context,
|
||||
"k=i" => \$snmpkey, "key=i",\$snmpkey,
|
||||
"d=s" => \$ifdescr, "descr=s" => \$ifdescr,
|
||||
|
@ -331,17 +355,17 @@ sub process_arguments() {
|
|||
"D=s" => \$adminWarn, "admin-down=s" => \$adminWarn,
|
||||
"M=i" => \$maxmsgsize, "maxmsgsize=i" => \$maxmsgsize,
|
||||
"t=i" => \$timeout, "timeout=i" => \$timeout,
|
||||
"T=i" => \$iftype, "type=i" => \$iftype,
|
||||
);
|
||||
|
||||
|
||||
|
||||
if ($status == 0){
|
||||
print_help();
|
||||
exit $ERRORS{'OK'};
|
||||
}
|
||||
|
||||
|
||||
if ($opt_V) {
|
||||
print_revision($PROGNAME,'$Revision: 1642 $ ');
|
||||
print_revision($PROGNAME,'@NP_VERSION@');
|
||||
exit $ERRORS{'OK'};
|
||||
}
|
||||
|
||||
|
@ -351,19 +375,14 @@ sub process_arguments() {
|
|||
}
|
||||
|
||||
if (! utils::is_hostname($hostname)){
|
||||
usage();
|
||||
exit $ERRORS{"UNKNOWN"};
|
||||
usage("Hostname invalid or not given");
|
||||
}
|
||||
|
||||
|
||||
unless ($snmpkey > 0 || defined $ifdescr){
|
||||
printf "Either a valid snmpkey key (-k) or a ifDescr (-d) must be provided)\n";
|
||||
usage();
|
||||
exit $ERRORS{"UNKNOWN"};
|
||||
unless ($snmpkey > 0 || defined $ifdescr || defined $iftype){
|
||||
usage("Either a valid snmp key (-k) or a ifDescr (-d) must be provided");
|
||||
}
|
||||
|
||||
|
||||
if (defined $name) {
|
||||
if (defined $ifName) {
|
||||
$ifXTable=1;
|
||||
}
|
||||
|
||||
|
@ -378,128 +397,76 @@ sub process_arguments() {
|
|||
$timeout = $TIMEOUT;
|
||||
}
|
||||
|
||||
if ($snmp_version =~ /3/ ) {
|
||||
# Must define a security level even though default is noAuthNoPriv
|
||||
# v3 requires a security username
|
||||
if (defined $seclevel && defined $secname) {
|
||||
|
||||
# Must define a security level even though defualt is noAuthNoPriv
|
||||
unless ( grep /^$seclevel$/, qw(noAuthNoPriv authNoPriv authPriv) ) {
|
||||
usage();
|
||||
exit $ERRORS{"UNKNOWN"};
|
||||
}
|
||||
|
||||
# Authentication wanted
|
||||
if ( $seclevel eq 'authNoPriv' || $seclevel eq 'authPriv' ) {
|
||||
|
||||
unless ( $authproto eq 'MD5' || $authproto eq 'SHA1' ) {
|
||||
usage();
|
||||
exit $ERRORS{"UNKNOWN"};
|
||||
}
|
||||
|
||||
if ( !defined $authpass) {
|
||||
usage();
|
||||
exit $ERRORS{"UNKNOWN"};
|
||||
}else{
|
||||
if ($authpass =~ /^0x/ ) {
|
||||
$auth = "-authkey => $authpass" ;
|
||||
}else{
|
||||
$auth = "-authpassword => $authpass";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
# Privacy (DES encryption) wanted
|
||||
if ($seclevel eq 'authPriv' ) {
|
||||
if (! defined $privpass) {
|
||||
usage();
|
||||
exit $ERRORS{"UNKNOWN"};
|
||||
}else{
|
||||
if ($privpass =~ /^0x/){
|
||||
$priv = "-privkey => $privpass";
|
||||
}else{
|
||||
$priv = "-privpassword => $privpass";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Context name defined or default
|
||||
|
||||
unless ( defined $context) {
|
||||
$context = "";
|
||||
}
|
||||
|
||||
|
||||
|
||||
}else {
|
||||
usage();
|
||||
exit $ERRORS{'UNKNOWN'}; ;
|
||||
}
|
||||
} # end snmpv3
|
||||
|
||||
|
||||
if ( $snmp_version =~ /[12]/ ) {
|
||||
($session, $error) = Net::SNMP->session(
|
||||
-hostname => $hostname,
|
||||
-community => $community,
|
||||
-port => $port,
|
||||
-version => $snmp_version,
|
||||
-maxmsgsize => $maxmsgsize
|
||||
);
|
||||
|
||||
if (!defined($session)) {
|
||||
$state='UNKNOWN';
|
||||
$answer=$error;
|
||||
print ("$state: $answer");
|
||||
exit $ERRORS{$state};
|
||||
}
|
||||
|
||||
}elsif ( $snmp_version =~ /3/ ) {
|
||||
|
||||
if ($seclevel eq 'noAuthNoPriv') {
|
||||
($session, $error) = Net::SNMP->session(
|
||||
-hostname => $hostname,
|
||||
-port => $port,
|
||||
-version => $snmp_version,
|
||||
-username => $secname,
|
||||
);
|
||||
|
||||
}elsif ( $seclevel eq 'authNoPriv' ) {
|
||||
($session, $error) = Net::SNMP->session(
|
||||
-hostname => $hostname,
|
||||
-port => $port,
|
||||
-version => $snmp_version,
|
||||
-username => $secname,
|
||||
$auth,
|
||||
-authprotocol => $authproto,
|
||||
);
|
||||
}elsif ($seclevel eq 'authPriv' ) {
|
||||
($session, $error) = Net::SNMP->session(
|
||||
-hostname => $hostname,
|
||||
-port => $port,
|
||||
-version => $snmp_version,
|
||||
-username => $secname,
|
||||
$auth,
|
||||
-authprotocol => $authproto,
|
||||
$priv
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
if (!defined($session)) {
|
||||
$state='UNKNOWN';
|
||||
$answer=$error;
|
||||
print ("$state: $answer");
|
||||
exit $ERRORS{$state};
|
||||
}
|
||||
|
||||
}else{
|
||||
if ($snmp_version !~ /[123]/){
|
||||
$state='UNKNOWN';
|
||||
print ("$state: No support for SNMP v$snmp_version yet\n");
|
||||
exit $ERRORS{$state};
|
||||
}
|
||||
|
||||
%session_opts = (
|
||||
-hostname => $hostname,
|
||||
-port => $port,
|
||||
-version => $snmp_version,
|
||||
-maxmsgsize => $maxmsgsize
|
||||
);
|
||||
|
||||
$session_opts{'-community'} = $community if (defined $community && $snmp_version =~ /[12]/);
|
||||
|
||||
if ($snmp_version =~ /3/ ) {
|
||||
# Must define a security level even though default is noAuthNoPriv
|
||||
# v3 requires a security username
|
||||
if (defined $seclevel && defined $secname) {
|
||||
$session_opts{'-username'} = $secname;
|
||||
|
||||
# Must define a security level even though defualt is noAuthNoPriv
|
||||
unless ( grep /^$seclevel$/, qw(noAuthNoPriv authNoPriv authPriv) ) {
|
||||
usage("Must define a valid security level even though default is noAuthNoPriv");
|
||||
}
|
||||
|
||||
# Authentication wanted
|
||||
if ( $seclevel eq 'authNoPriv' || $seclevel eq 'authPriv' ) {
|
||||
if (defined $authproto && $authproto ne 'MD5' && $authproto ne 'SHA1') {
|
||||
usage("Auth protocol can be either MD5 or SHA1");
|
||||
}
|
||||
$session_opts{'-authprotocol'} = $authproto if(defined $authproto);
|
||||
|
||||
if ( !defined $authpass) {
|
||||
usage("Auth password/key is not defined");
|
||||
}else{
|
||||
if ($authpass =~ /^0x/ ) {
|
||||
$session_opts{'-authkey'} = $authpass ;
|
||||
}else{
|
||||
$session_opts{'-authpassword'} = $authpass ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Privacy (DES encryption) wanted
|
||||
if ($seclevel eq 'authPriv' ) {
|
||||
if (! defined $privpass) {
|
||||
usage("Privacy passphrase/key is not defined");
|
||||
}else{
|
||||
if ($privpass =~ /^0x/){
|
||||
$session_opts{'-privkey'} = $privpass;
|
||||
}else{
|
||||
$session_opts{'-privpassword'} = $privpass;
|
||||
}
|
||||
}
|
||||
|
||||
$session_opts{'-privprotocol'} = $privproto if(defined $privproto);
|
||||
}
|
||||
|
||||
# Context name defined or default
|
||||
unless ( defined $context) {
|
||||
$context = "";
|
||||
}
|
||||
|
||||
}else {
|
||||
usage("Security level or name is not defined");
|
||||
}
|
||||
} # end snmpv3
|
||||
|
||||
|
||||
}
|
||||
## End validation
|
||||
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
#
|
||||
# 11.01.2000 Version 1.0
|
||||
#
|
||||
# $Id: check_ifstatus.pl 884 2004-08-18 19:51:35Z tonvoon $
|
||||
|
||||
use POSIX;
|
||||
use strict;
|
||||
|
@ -43,7 +42,8 @@ Getopt::Long::Configure('bundling');
|
|||
my $PROGNAME = "check_ifstatus";
|
||||
|
||||
sub print_help ();
|
||||
sub usage ();
|
||||
sub usage ($);
|
||||
sub print_usage ();
|
||||
sub process_arguments ();
|
||||
|
||||
|
||||
|
@ -64,7 +64,7 @@ my $snmpoid=0;
|
|||
my $key=0;
|
||||
my $community = "public";
|
||||
my $maxmsgsize = 1472 ; # Net::SNMP default is 1472
|
||||
my ($seclevel, $authproto, $secname, $authpass, $privpass, $auth, $priv, $context);
|
||||
my ($seclevel, $authproto, $secname, $authpass, $privpass, $privproto, $auth, $priv, $context);
|
||||
my $port = 161;
|
||||
my @snmpoids;
|
||||
my $snmpIfAdminStatus = '1.3.6.1.2.1.2.2.1.7';
|
||||
|
@ -93,6 +93,7 @@ my $opt_u;
|
|||
my $opt_x ;
|
||||
my %excluded ;
|
||||
my @unused_ports ;
|
||||
my %session_opts;
|
||||
|
||||
|
||||
|
||||
|
@ -116,6 +117,15 @@ if ($status != 0)
|
|||
|
||||
|
||||
alarm($timeout);
|
||||
($session, $error) = Net::SNMP->session(%session_opts);
|
||||
|
||||
if (!defined($session)) {
|
||||
$state='UNKNOWN';
|
||||
$answer=$error;
|
||||
print ("$state: $answer\n");
|
||||
exit $ERRORS{$state};
|
||||
}
|
||||
|
||||
|
||||
push(@snmpoids,$snmpIfOperStatus);
|
||||
push(@snmpoids,$snmpIfAdminStatus);
|
||||
|
@ -210,19 +220,25 @@ my $perfdata = sprintf("up=%d,down=%d,dormant=%d,excluded=%d,unused=%d",$ifup,$i
|
|||
print ("$state: $answer |$perfdata\n");
|
||||
exit $ERRORS{$state};
|
||||
|
||||
|
||||
sub usage (){
|
||||
printf "\nMissing arguments!\n";
|
||||
printf "\n";
|
||||
printf "check_ifstatus -C <READCOMMUNITY> -p <PORT> -H <HOSTNAME>\n";
|
||||
printf "Copyright (C) 2000 Christoph Kron\n";
|
||||
printf "Updates 5/2002 Subhendu Ghosh\n";
|
||||
printf "\n\n";
|
||||
support();
|
||||
sub usage($) {
|
||||
print "$_[0]\n";
|
||||
print_usage();
|
||||
exit $ERRORS{"UNKNOWN"};
|
||||
}
|
||||
|
||||
sub print_help (){
|
||||
sub print_usage() {
|
||||
printf "\n";
|
||||
printf "usage: \n";
|
||||
printf "check_ifstatus -C <READCOMMUNITY> -p <PORT> -H <HOSTNAME>\n";
|
||||
printf "Copyright (C) 2000 Christoph Kron\n";
|
||||
printf "Updates 5/2002 Subhendu Ghosh\n";
|
||||
support();
|
||||
printf "\n\n";
|
||||
}
|
||||
|
||||
sub print_help() {
|
||||
print_revision($PROGNAME, '@NP_VERSION@');
|
||||
print_usage();
|
||||
printf "check_ifstatus plugin for Nagios monitors operational \n";
|
||||
printf "status of each network interface on the target host\n";
|
||||
printf "\nUsage:\n";
|
||||
|
@ -243,19 +259,20 @@ sub print_help (){
|
|||
printf " See the IANAifType-MIB for a list of interface types.\n";
|
||||
printf " -L (--seclevel) choice of \"noAuthNoPriv\", \"authNoPriv\", or \"authPriv\"\n";
|
||||
printf " -U (--secname) username for SNMPv3 context\n";
|
||||
printf " -c (--context) SNMPv3 context name (default is empty string)";
|
||||
printf " -c (--context) SNMPv3 context name (default is empty string)\n";
|
||||
printf " -A (--authpass) authentication password (cleartext ascii or localized key\n";
|
||||
printf " in hex with 0x prefix generated by using \"snmpkey\" utility\n";
|
||||
printf " in hex with 0x prefix generated by using \"snmpkey\" utility\n";
|
||||
printf " auth password and authEngineID\n";
|
||||
printf " -a (--authproto) Authentication protocol ( MD5 or SHA1)\n";
|
||||
printf " -a (--authproto) Authentication protocol (MD5 or SHA1)\n";
|
||||
printf " -X (--privpass) privacy password (cleartext ascii or localized key\n";
|
||||
printf " in hex with 0x prefix generated by using \"snmpkey\" utility\n";
|
||||
printf " in hex with 0x prefix generated by using \"snmpkey\" utility\n";
|
||||
printf " privacy password and authEngineID\n";
|
||||
printf " -P (--privproto) privacy protocol (DES or AES; default: DES)\n";
|
||||
printf " -M (--maxmsgsize) Max message size - usefull only for v1 or v2c\n";
|
||||
printf " -t (--timeout) seconds before the plugin times out (default=$TIMEOUT)\n";
|
||||
printf " -V (--version) Plugin version\n";
|
||||
printf " -h (--help) usage help \n\n";
|
||||
print_revision($PROGNAME, '$Revision: 884 $');
|
||||
print_revision($PROGNAME, '@NP_VERSION@');
|
||||
|
||||
}
|
||||
|
||||
|
@ -270,6 +287,7 @@ sub process_arguments() {
|
|||
"U=s" => \$secname, "secname=s" => \$secname,
|
||||
"A=s" => \$authpass, "authpass=s" => \$authpass,
|
||||
"X=s" => \$privpass, "privpass=s" => \$privpass,
|
||||
"P=s" => \$privproto, "privproto=s" => \$privproto,
|
||||
"c=s" => \$context, "context=s" => \$context,
|
||||
"p=i" =>\$port, "port=i" => \$port,
|
||||
"H=s" => \$hostname, "hostname=s" => \$hostname,
|
||||
|
@ -281,11 +299,12 @@ sub process_arguments() {
|
|||
);
|
||||
|
||||
if ($status == 0){
|
||||
print_help() ;
|
||||
print_help();
|
||||
exit $ERRORS{'OK'};
|
||||
}
|
||||
|
||||
if ($opt_V) {
|
||||
print_revision($PROGNAME,'$Revision: 884 $ ');
|
||||
print_revision($PROGNAME,'@NP_VERSION@');
|
||||
exit $ERRORS{'OK'};
|
||||
}
|
||||
|
||||
|
@ -298,68 +317,75 @@ sub process_arguments() {
|
|||
$timeout = $TIMEOUT;
|
||||
}
|
||||
|
||||
if ($snmp_version !~ /[123]/){
|
||||
$state='UNKNOWN';
|
||||
print ("$state: No support for SNMP v$snmp_version yet\n");
|
||||
exit $ERRORS{$state};
|
||||
}
|
||||
|
||||
%session_opts = (
|
||||
-hostname => $hostname,
|
||||
-port => $port,
|
||||
-version => $snmp_version,
|
||||
-maxmsgsize => $maxmsgsize
|
||||
);
|
||||
|
||||
$session_opts{'-community'} = $community if (defined $community && $snmp_version =~ /[12]/);
|
||||
|
||||
if ($snmp_version =~ /3/ ) {
|
||||
# Must define a security level even though default is noAuthNoPriv
|
||||
# v3 requires a security username
|
||||
if (defined $seclevel && defined $secname) {
|
||||
if (defined $seclevel && defined $secname) {
|
||||
$session_opts{'-username'} = $secname;
|
||||
|
||||
# Must define a security level even though defualt is noAuthNoPriv
|
||||
unless ($seclevel eq ('noAuthNoPriv' || 'authNoPriv' || 'authPriv' ) ) {
|
||||
usage();
|
||||
exit $ERRORS{"UNKNOWN"};
|
||||
unless ( grep /^$seclevel$/, qw(noAuthNoPriv authNoPriv authPriv) ) {
|
||||
usage("Must define a valid security level even though default is noAuthNoPriv");
|
||||
}
|
||||
|
||||
# Authentication wanted
|
||||
if ($seclevel eq ('authNoPriv' || 'authPriv') ) {
|
||||
|
||||
unless ($authproto eq ('MD5' || 'SHA1') ) {
|
||||
usage();
|
||||
exit $ERRORS{"UNKNOWN"};
|
||||
if ( $seclevel eq 'authNoPriv' || $seclevel eq 'authPriv' ) {
|
||||
if (defined $authproto && $authproto ne 'MD5' && $authproto ne 'SHA1') {
|
||||
usage("Auth protocol can be either MD5 or SHA1");
|
||||
}
|
||||
$session_opts{'-authprotocol'} = $authproto if(defined $authproto);
|
||||
|
||||
if ( !defined $authpass) {
|
||||
usage();
|
||||
exit $ERRORS{"UNKNOWN"};
|
||||
usage("Auth password/key is not defined");
|
||||
}else{
|
||||
if ($authpass =~ /^0x/ ) {
|
||||
$auth = "-authkey => $authpass" ;
|
||||
$session_opts{'-authkey'} = $authpass ;
|
||||
}else{
|
||||
$auth = "-authpassword => $authpass";
|
||||
$session_opts{'-authpassword'} = $authpass ;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
# Privacy (DES encryption) wanted
|
||||
if ($seclevel eq 'authPriv' ) {
|
||||
if ($seclevel eq 'authPriv' ) {
|
||||
if (! defined $privpass) {
|
||||
usage();
|
||||
exit $ERRORS{"UNKNOWN"};
|
||||
usage("Privacy passphrase/key is not defined");
|
||||
}else{
|
||||
if ($privpass =~ /^0x/){
|
||||
$priv = "-privkey => $privpass";
|
||||
$session_opts{'-privkey'} = $privpass;
|
||||
}else{
|
||||
$priv = "-privpassword => $privpass";
|
||||
$session_opts{'-privpassword'} = $privpass;
|
||||
}
|
||||
}
|
||||
|
||||
$session_opts{'-privprotocol'} = $privproto if(defined $privproto);
|
||||
}
|
||||
|
||||
# Context name defined or default
|
||||
|
||||
unless ( defined $context) {
|
||||
$context = "";
|
||||
}
|
||||
|
||||
|
||||
|
||||
}else {
|
||||
usage();
|
||||
exit $ERRORS{'UNKNOWN'}; ;
|
||||
usage("Security level or name is not defined");
|
||||
}
|
||||
} # end snmpv3
|
||||
|
||||
# for snmp v1 & v2c we default to community = "public"
|
||||
|
||||
# Excluded interfaces types (ifType) (backup interfaces, dial-on demand interfaces, PPP interfaces
|
||||
if (defined $opt_x) {
|
||||
my @x = split(/,/, $opt_x);
|
||||
|
@ -381,79 +407,16 @@ sub process_arguments() {
|
|||
}
|
||||
|
||||
if (! utils::is_hostname($hostname)){
|
||||
usage();
|
||||
usage("Hostname invalid or not given");
|
||||
exit $ERRORS{"UNKNOWN"};
|
||||
}
|
||||
|
||||
# create SNMP session handle based on options passed.
|
||||
|
||||
if ( ! $snmp_version ) {
|
||||
$snmp_version =1 ;
|
||||
}else{
|
||||
if ( $snmp_version =~ /[12]/ ) {
|
||||
|
||||
($session, $error) = Net::SNMP->session(
|
||||
-hostname => $hostname,
|
||||
-community => $community,
|
||||
-port => $port,
|
||||
-version => $snmp_version,
|
||||
-maxmsgsize => $maxmsgsize
|
||||
);
|
||||
|
||||
if (!defined($session)) {
|
||||
$state='UNKNOWN';
|
||||
$answer=$error;
|
||||
print ("$state: $answer");
|
||||
exit $ERRORS{$state};
|
||||
}
|
||||
|
||||
|
||||
}elsif ( $snmp_version =~ /3/ ) {
|
||||
|
||||
if ($seclevel eq 'noAuthNoPriv') {
|
||||
($session, $error) = Net::SNMP->session(
|
||||
-hostname => $hostname,
|
||||
-port => $port,
|
||||
-version => $snmp_version,
|
||||
-username => $secname,
|
||||
);
|
||||
|
||||
}elsif ( $seclevel eq 'authNoPriv' ) {
|
||||
($session, $error) = Net::SNMP->session(
|
||||
-hostname => $hostname,
|
||||
-port => $port,
|
||||
-version => $snmp_version,
|
||||
-username => $secname,
|
||||
-authprotocol => $authproto,
|
||||
$auth
|
||||
);
|
||||
}elsif ($seclevel eq 'authPriv' ) {
|
||||
($session, $error) = Net::SNMP->session(
|
||||
-hostname => $hostname,
|
||||
-port => $port,
|
||||
-version => $snmp_version,
|
||||
-username => $secname,
|
||||
-authprotocol => $authproto,
|
||||
$auth,
|
||||
$priv
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
if (!defined($session)) {
|
||||
$state='UNKNOWN';
|
||||
$answer=$error;
|
||||
print ("$state: $answer");
|
||||
exit $ERRORS{$state};
|
||||
}
|
||||
|
||||
}else{
|
||||
if ($snmp_version !~ /[123]/) {
|
||||
$state='UNKNOWN';
|
||||
print ("$state: No support for SNMP v$snmp_version yet\n");
|
||||
exit $ERRORS{$state};
|
||||
}
|
||||
}
|
||||
|
||||
return $ERRORS{"OK"};
|
||||
|
||||
}
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#
|
||||
# Date: 1999/09/20
|
||||
#
|
||||
# $Id: check_ircd.pl 22 2002-05-07 05:35:49Z sghosh $
|
||||
#
|
||||
# Description: This script will check to see if an IRCD is running
|
||||
# about how many users it has
|
||||
|
@ -119,7 +118,7 @@ sub print_usage () {
|
|||
|
||||
sub print_help ()
|
||||
{
|
||||
print_revision($PROGNAME,'$Revision: 22 $ ');
|
||||
print_revision($PROGNAME,'@NP_VERSION@');
|
||||
print "Copyright (c) 2000 Richard Mayhew/Karl DeBisschop
|
||||
|
||||
Perl Check IRCD plugin for Nagios
|
||||
|
@ -190,7 +189,7 @@ MAIN:
|
|||
"H=s" => \$opt_H, "hostname=s" => \$opt_H);
|
||||
|
||||
if ($opt_V) {
|
||||
print_revision($PROGNAME,'$Revision: 22 $ ');
|
||||
print_revision($PROGNAME,'@NP_VERSION@');
|
||||
exit $ERRORS{'OK'};
|
||||
}
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ TOUCH="/bin/touch"
|
|||
|
||||
PROGNAME=`/bin/basename $0`
|
||||
PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'`
|
||||
REVISION=`echo '$Revision: 1749 $' | sed -e 's/[^0-9.]//g'`
|
||||
REVISION="@NP_VERSION@"
|
||||
|
||||
. $PROGPATH/utils.sh
|
||||
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
#
|
||||
# $Id: check_mailq.pl 1443 2006-07-05 13:45:57Z tonvoon $
|
||||
#
|
||||
############################################################################
|
||||
|
||||
|
@ -522,7 +521,7 @@ sub process_arguments(){
|
|||
);
|
||||
|
||||
if ($opt_V) {
|
||||
print_revision($PROGNAME,'$Revision: 1443 $ ');
|
||||
print_revision($PROGNAME,'@NP_VERSION@');
|
||||
exit $ERRORS{'OK'};
|
||||
}
|
||||
|
||||
|
@ -580,7 +579,7 @@ sub print_usage () {
|
|||
}
|
||||
|
||||
sub print_help () {
|
||||
print_revision($PROGNAME,'$Revision: 1443 $');
|
||||
print_revision($PROGNAME,'@NP_VERSION@');
|
||||
print "Copyright (c) 2002 Subhendu Ghosh/Carlos Canau/Benjamin Schmid\n";
|
||||
print "\n";
|
||||
print_usage();
|
||||
|
@ -588,7 +587,7 @@ sub print_help () {
|
|||
print " Checks the number of messages in the mail queue (supports multiple sendmail queues, qmail)\n";
|
||||
print " Feedback/patches to support non-sendmail mailqueue welcome\n\n";
|
||||
print "-w (--warning) = Min. number of messages in queue to generate warning\n";
|
||||
print "-c (--critical) = Min. number of messages in queu to generate critical alert ( w < c )\n";
|
||||
print "-c (--critical) = Min. number of messages in queue to generate critical alert ( w < c )\n";
|
||||
print "-W (--Warning) = Min. number of messages for same domain in queue to generate warning\n";
|
||||
print "-C (--Critical) = Min. number of messages for same domain in queue to generate critical alert ( W < C )\n";
|
||||
print "-t (--timeout) = Plugin timeout in seconds (default = $utils::TIMEOUT)\n";
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
# be installed on the system, however since it's part of the ntp suite, you
|
||||
# should already have it installed.
|
||||
#
|
||||
# $Id: check_ntp.pl 1291 2005-11-30 00:49:47Z harpermann $
|
||||
#
|
||||
# Nothing clever done in this program - its a very simple bare basics hack to
|
||||
# get the job done.
|
||||
|
@ -97,7 +96,7 @@ GetOptions
|
|||
"H=s" => \$opt_H, "hostname=s" => \$opt_H);
|
||||
|
||||
if ($opt_V) {
|
||||
print_revision($PROGNAME,'$Revision: 1291 $ ');
|
||||
print_revision($PROGNAME,'@NP_VERSION@');
|
||||
exit $ERRORS{'OK'};
|
||||
}
|
||||
|
||||
|
@ -443,7 +442,7 @@ sub print_usage () {
|
|||
}
|
||||
|
||||
sub print_help () {
|
||||
print_revision($PROGNAME,'$Revision: 1291 $');
|
||||
print_revision($PROGNAME,'@NP_VERSION@');
|
||||
print "Copyright (c) 2003 Bo Kersey/Karl DeBisschop\n";
|
||||
print "\n";
|
||||
print_usage();
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
PROGNAME=`basename $0`
|
||||
PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'`
|
||||
REVISION=`echo '$Revision: 1749 $' | sed -e 's/[^0-9.]//g'`
|
||||
REVISION="@NP_VERSION@"
|
||||
|
||||
. $PROGPATH/utils.sh
|
||||
|
||||
|
|
|
@ -15,10 +15,8 @@
|
|||
#
|
||||
# initial version: 3 May 2000 by Truongchinh Nguyen and Karl DeBisschop
|
||||
# Modified May 2002 Subhendu Ghosh - support for ePN and patches
|
||||
# current status: $Revision: 677 $
|
||||
#
|
||||
# Copyright Notice: GPL
|
||||
# $Id: check_rpc.pl 677 2003-08-10 12:11:49Z kdebisschop $
|
||||
#
|
||||
|
||||
use strict;
|
||||
|
@ -38,13 +36,13 @@ sub print_help ();
|
|||
sub print_usage ();
|
||||
sub in ($$);
|
||||
|
||||
$ENV{'BASH_ENV'}='';
|
||||
$ENV{'BASH_ENV'}='';
|
||||
$ENV{'ENV'}='';
|
||||
$ENV{'PATH'}='';
|
||||
$ENV{'LC_ALL'}='C';
|
||||
|
||||
#Initialise protocol for each progname number
|
||||
# 'u' for UDP, 't' for TCP
|
||||
# 'u' for UDP, 't' for TCP
|
||||
$proto[10003]='u';
|
||||
$proto[10004]='u';
|
||||
$proto[10007]='u';
|
||||
|
@ -67,9 +65,9 @@ GetOptions(
|
|||
if ($opt_h) { print_help(); exit $ERRORS{'OK'}; }
|
||||
|
||||
# -V means display version number
|
||||
if ($opt_V) {
|
||||
print_revision($PROGNAME,'$Revision: 677 $ ');
|
||||
exit $ERRORS{'OK'};
|
||||
if ($opt_V) {
|
||||
print_revision($PROGNAME,'@NP_VERSION@');
|
||||
exit $ERRORS{'OK'};
|
||||
}
|
||||
|
||||
# Hash containing all RPC program names and numbers
|
||||
|
@ -275,7 +273,7 @@ if (defined $opt_c ) {
|
|||
}else{
|
||||
print "Version $vers is not an integer\n" if $verbose;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}else{
|
||||
get_rpcinfo();
|
||||
|
@ -311,7 +309,7 @@ sub get_rpcinfo {
|
|||
while ( $line = <CMD> ) {
|
||||
printf "$line " if $verbose;
|
||||
chomp $line;
|
||||
|
||||
|
||||
if ( $line =~ /program $prognum version ([0-9]*) ready and waiting/ ) {
|
||||
$response .= " version $1";
|
||||
$state = 'OK' unless $state ne 'UNKNOWN';
|
||||
|
@ -336,7 +334,7 @@ sub get_rpcinfo {
|
|||
|
||||
|
||||
sub print_help() {
|
||||
print_revision($PROGNAME,'$Revision: 677 $ ');
|
||||
print_revision($PROGNAME,'@NP_VERSION@');
|
||||
print "Copyright (c) 2002 Karl DeBisschop/Truongchinh Nguyen/Subhendu Ghosh\n";
|
||||
print "\n";
|
||||
print "Check if a rpc service is registered and running using\n";
|
||||
|
|
|
@ -4,7 +4,7 @@ PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
|
|||
|
||||
PROGNAME=`basename $0`
|
||||
PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'`
|
||||
REVISION=`echo '$Revision: 162 $' | sed -e 's/[^0-9.]//g'`
|
||||
REVISION="@NP_VERSION@"
|
||||
|
||||
. $PROGPATH/utils.sh
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#!/usr/bin/perl -wT
|
||||
#
|
||||
# $Id: check_wave.pl 162 2002-10-28 13:05:08Z kdebisschop $
|
||||
|
||||
|
||||
use strict;
|
||||
|
@ -30,7 +29,7 @@ GetOptions
|
|||
"H=s" => \$opt_H, "hostname=s" => \$opt_H);
|
||||
|
||||
if ($opt_V) {
|
||||
print_revision($PROGNAME,'$Revision: 162 $'); #'
|
||||
print_revision($PROGNAME,'@NP_VERSION@'); #'
|
||||
exit $ERRORS{'OK'};
|
||||
}
|
||||
|
||||
|
@ -112,7 +111,7 @@ sub print_usage () {
|
|||
}
|
||||
|
||||
sub print_help () {
|
||||
print_revision($PROGNAME,'$Revision: 162 $');
|
||||
print_revision($PROGNAME,'@NP_VERSION@');
|
||||
print "Copyright (c) 2000 Jeffery Blank/Karl DeBisschop\n";
|
||||
print "\n";
|
||||
print_usage();
|
||||
|
|
|
@ -37,6 +37,9 @@ BEGIN {
|
|||
|
||||
}
|
||||
|
||||
# Plugin revision
|
||||
/@NP_VERSION@/ {sub(/@NP_VERSION@/,ENVIRON["NP_VERSION"]);}
|
||||
|
||||
# scripting language (first line)
|
||||
|
||||
/^#! ?\/.*\/python/ {sub(/^#! ?\/.*\/python/,"#! @PYTHON@");}
|
||||
|
@ -44,6 +47,17 @@ BEGIN {
|
|||
/^#! ?\/.*\/[a-z]{0,2}awk/ {sub(/^#! ?\/.*\/[a-z]{0,2}awk/,"#! @AWK@");}
|
||||
/^#! ?\/.*\/sh/ {sub(/^#! ?\/.*\/sh/,"#! @SHELL@");}
|
||||
|
||||
# If a script contains a reference to a fully qualified command,
|
||||
# subst will replace the fully qualified command with whatever is
|
||||
# returned from the which subroutine. run before changes to INC to add libexecdir
|
||||
# FIXME: Prepend executables with a substitution keyword instead.
|
||||
#
|
||||
/^[^#]/ && /(\/.*)?\/(bin|sbin|lib|libexec)\// {
|
||||
match($0,/(\/.*)?\/(bin|sbin|lib|libexec)\/[-_a-zA-Z0-9]+/);
|
||||
c=substr($0,RSTART,RLENGTH);
|
||||
sub(c,which(c,path));
|
||||
}
|
||||
|
||||
# add to libexecdir to INC for perl utils.pm
|
||||
/^use/ { if (/lib/) { if (/utils.pm|"."/ ) {sub(/utils.pm|"."/,led() )} } }
|
||||
|
||||
|
@ -58,16 +72,6 @@ BEGIN {
|
|||
sub(/\=.*$/,"='@with_trusted_path@' # autoconf-derived");
|
||||
}
|
||||
|
||||
# If a script contains a reference to a fully qualified command,
|
||||
# subst will replace the fully qualified command with whatever is
|
||||
# returned from the which subroutine
|
||||
#
|
||||
/^[^#]/ && /(\/.*)?\/(bin|sbin|lib|libexec)\// {
|
||||
match($0,/(\/.*)?\/(bin|sbin|lib|libexec)\/[-_a-zA-Z0-9]+/);
|
||||
c=substr($0,RSTART,RLENGTH);
|
||||
sub(c,which(c,path));
|
||||
}
|
||||
|
||||
{
|
||||
print;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#
|
||||
# check_file_age tests
|
||||
#
|
||||
# $Id: check_file_age.t 1297 2005-12-15 15:17:49Z tonvoon $
|
||||
#
|
||||
|
||||
use strict;
|
||||
|
|
93
plugins-scripts/t/check_ifoperstatus.t
Normal file
93
plugins-scripts/t/check_ifoperstatus.t
Normal file
|
@ -0,0 +1,93 @@
|
|||
#! /usr/bin/perl -w -I ..
|
||||
#
|
||||
# SNMP Test via check_ifoperstatus
|
||||
#
|
||||
#
|
||||
|
||||
use strict;
|
||||
use Test::More;
|
||||
use NPTest;
|
||||
|
||||
my $tests = 15;
|
||||
plan tests => $tests;
|
||||
my $res;
|
||||
|
||||
my $plugin = "check_ifoperstatus";
|
||||
SKIP: {
|
||||
skip "$plugin is not created", $tests if ( ! -x $plugin );
|
||||
|
||||
my $host_snmp = getTestParameter( "NP_HOST_SNMP", "A host providing an SNMP Service", "localhost");
|
||||
|
||||
my $snmp_community = getTestParameter( "NP_SNMP_COMMUNITY",
|
||||
"The SNMP Community string for SNMP Testing",
|
||||
"public");
|
||||
|
||||
my ($snmp_interface, $snmp_ifxtable);
|
||||
if ($host_snmp) {
|
||||
$snmp_interface = getTestParameter( "NP_SNMP_INTERFACE", "Name of an active network interface on SNMP server", "lo" );
|
||||
|
||||
$snmp_ifxtable = getTestParameter( "NP_SNMP_IFXTABLE",
|
||||
"Is IFXTABLE activated in SNMP server (1: yes, 0: no)? snmpwalk -v1 -c $snmp_community $host_snmp ifxtable",
|
||||
"1" );
|
||||
}
|
||||
|
||||
my $host_nonresponsive = getTestParameter( "NP_HOST_NONRESPONSIVE",
|
||||
"The hostname of system not responsive to network requests", "10.0.0.1" );
|
||||
|
||||
my $hostname_invalid = getTestParameter( "NP_HOSTNAME_INVALID",
|
||||
"An invalid (not known to DNS) hostname",
|
||||
"nosuchhost" );
|
||||
|
||||
|
||||
|
||||
$res = NPTest->testCmd( "./$plugin" );
|
||||
is( $res->return_code, 3, "No arguments" );
|
||||
like( $res->output, '/usage/', "Output contains usage" );
|
||||
|
||||
$res = NPTest->testCmd( "./$plugin -H fakehostname" );
|
||||
is( $res->return_code, 3, "No key/descr specified" );
|
||||
like( $res->output, '/Either a valid snmp key/', "Output contains 'Either a valid snmp key'" );
|
||||
|
||||
$res = NPTest->testCmd( "./$plugin -H fakehost -k 1 -v 3 --seclevel rubbish --secname foobar" );
|
||||
is( $res->return_code, 3, "invalid seclevel" );
|
||||
like( $res->output, "/Must define a valid security level/", "Output contains 'Must define a valid security level'" );
|
||||
|
||||
SKIP: {
|
||||
skip "no snmp host defined", 6 if ( ! $host_snmp );
|
||||
|
||||
$res = NPTest->testCmd( "./$plugin -H $host_snmp -C $snmp_community -k 1");
|
||||
cmp_ok( $res->return_code, '==', 0, "Exit OK for ifindex 1" );
|
||||
like($res->output, '/^OK.*Interface.*is up/', "String contains OK Interface is up");
|
||||
|
||||
SKIP: {
|
||||
skip "no snmp interface defined", 2 if ( ! $snmp_interface );
|
||||
$res = NPTest->testCmd( "./$plugin -H $host_snmp -C $snmp_community -d $snmp_interface");
|
||||
cmp_ok( $res->return_code, '==', 0, "Exit OK for ifdescr $snmp_interface" );
|
||||
like($res->output, '/^OK.*Interface.*is up/', "String contains OK Interface is up");
|
||||
}
|
||||
|
||||
SKIP: {
|
||||
skip "ifxtable not available", 2 if ( ! $snmp_ifxtable );
|
||||
$res = NPTest->testCmd( "./$plugin -H $host_snmp -C $snmp_community -k 1 -n rubbish");
|
||||
cmp_ok( $res->return_code, '==', 3, "Exit UNKNOWN if interface name doesn't match" );
|
||||
like($res->output, '/doesn\'t match snmp value/', "String contains 'doesn't match snmp value'");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
# These checks need a complete command line. An invalid community is used so
|
||||
# the tests can run on hosts w/o snmp host/community in NPTest.cache. Execution will fail anyway
|
||||
SKIP: {
|
||||
skip "no non responsive host defined", 1 if ( ! $host_nonresponsive );
|
||||
$res = NPTest->testCmd( "./$plugin -H $host_nonresponsive -C np_foobar -k 1");
|
||||
cmp_ok( $res->return_code, '==', 1, "Exit WARNING with non responsive host" );
|
||||
}
|
||||
|
||||
SKIP: {
|
||||
skip "no invalid host defined", 2 if ( ! $hostname_invalid );
|
||||
$res = NPTest->testCmd( "./$plugin -H $hostname_invalid -C np_foobar -k 1");
|
||||
cmp_ok( $res->return_code, '==', 3, "Exit UNKNOWN with invalid host" );
|
||||
like($res->output, "/Unable to resolve.*$hostname_invalid/", "String matches unable to resolve.*$hostname_invalid");
|
||||
}
|
||||
|
||||
}
|
67
plugins-scripts/t/check_ifstatus.t
Normal file
67
plugins-scripts/t/check_ifstatus.t
Normal file
|
@ -0,0 +1,67 @@
|
|||
#! /usr/bin/perl -w -I ..
|
||||
#
|
||||
# SNMP Test via check_ifoperstatus
|
||||
#
|
||||
#
|
||||
|
||||
use strict;
|
||||
use Test::More;
|
||||
use NPTest;
|
||||
|
||||
my $tests = 9;
|
||||
plan tests => $tests;
|
||||
my $res;
|
||||
|
||||
my $plugin = "check_ifstatus";
|
||||
SKIP: {
|
||||
skip "$plugin is not created", $tests if ( ! -x $plugin );
|
||||
|
||||
my $host_snmp = getTestParameter( "NP_HOST_SNMP", "A host providing an SNMP Service", "localhost");
|
||||
|
||||
my $snmp_community = getTestParameter( "NP_SNMP_COMMUNITY",
|
||||
"The SNMP Community string for SNMP Testing",
|
||||
"public");
|
||||
|
||||
my $host_nonresponsive = getTestParameter( "NP_HOST_NONRESPONSIVE",
|
||||
"The hostname of system not responsive to network requests", "10.0.0.1" );
|
||||
|
||||
my $hostname_invalid = getTestParameter( "NP_HOSTNAME_INVALID",
|
||||
"An invalid (not known to DNS) hostname",
|
||||
"nosuchhost" );
|
||||
|
||||
|
||||
$res = NPTest->testCmd( "./$plugin" );
|
||||
is( $res->return_code, 3, "No arguments" );
|
||||
like( $res->output, '/usage/', "Output contains usage" );
|
||||
|
||||
$res = NPTest->testCmd( "./$plugin -H fakehost -v 3 --seclevel rubbish --secname foobar" );
|
||||
is( $res->return_code, 3, "invalid seclevel" );
|
||||
like( $res->output, "/Must define a valid security level/", "Output contains 'Must define a valid security level'" );
|
||||
|
||||
SKIP: {
|
||||
skip "no snmp host defined", 2 if ( ! $host_snmp );
|
||||
|
||||
$res = NPTest->testCmd( "./$plugin -H $host_snmp -C $snmp_community ");
|
||||
like($res->output, '/^.*host.*interfaces up/', "String contains host.*interfaces up");
|
||||
|
||||
$res = NPTest->testCmd( "./$plugin -H $host_snmp -C rubbish");
|
||||
cmp_ok( $res->return_code, '==', 2, "Exit CRITICAL for community 'rubbish'" );
|
||||
|
||||
}
|
||||
|
||||
# These checks need a complete command line. An invalid community is used so
|
||||
# the tests can run on hosts w/o snmp host/community in NPTest.cache. Execution will fail anyway
|
||||
SKIP: {
|
||||
skip "no non responsive host defined", 1 if ( ! $host_nonresponsive );
|
||||
$res = NPTest->testCmd( "./$plugin -H $host_nonresponsive -C np_foobar");
|
||||
cmp_ok( $res->return_code, '==', 2, "Exit CRITICAL with non responsive host" );
|
||||
}
|
||||
|
||||
SKIP: {
|
||||
skip "no invalid host defined", 2 if ( ! $hostname_invalid );
|
||||
$res = NPTest->testCmd( "./$plugin -H $hostname_invalid -C np_foobar");
|
||||
cmp_ok( $res->return_code, '==', 3, "Exit UNKNOWN with invalid host" );
|
||||
like($res->output, "/Unable to resolve.*$hostname_invalid/", "String matches unable to resolve.*$hostname_invalid");
|
||||
}
|
||||
|
||||
}
|
|
@ -2,7 +2,6 @@
|
|||
#
|
||||
# Remote Procedure Call (RPC) Tests via check_rpc
|
||||
#
|
||||
# $Id: check_rpc.t 1207 2005-07-25 01:47:15Z illumino $
|
||||
#
|
||||
|
||||
use strict;
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#
|
||||
# utils.pm tests
|
||||
#
|
||||
# $Id: utils.t 1549 2006-12-12 12:59:06Z tonvoon $
|
||||
#
|
||||
# Run with perl t/utils.t
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
# Utility drawer for Nagios plugins.
|
||||
# $Id: utils.pm.in 1751 2007-07-07 11:55:48Z psychotrahe $
|
||||
#
|
||||
# This will be deprecated soon. Please use Nagios::Plugin from CPAN
|
||||
# for new plugins
|
||||
|
@ -32,8 +31,6 @@ $TIMEOUT = 15;
|
|||
sub print_revision ($$) {
|
||||
my $commandName = shift;
|
||||
my $pluginRevision = shift;
|
||||
$pluginRevision =~ s/^\$Revision: //;
|
||||
$pluginRevision =~ s/ \$\s*$//;
|
||||
print "$commandName v$pluginRevision (@PACKAGE@ @VERSION@)\n";
|
||||
print "@WARRANTY@";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue