diff --git a/sysutils/monit/Makefile b/sysutils/monit/Makefile new file mode 100644 index 00000000000..dd6d46fbd9b --- /dev/null +++ b/sysutils/monit/Makefile @@ -0,0 +1,38 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2002/11/29 23:22:21 margarida Exp $ + +COMMENT= "monitoring and managing daemons utility" + +VERSION= 3.0 +DISTNAME= monit-${VERSION} +CATEGORIES= sysutils + +HOMEPAGE= http://www.tildeslash.com/monit/ + +MASTER_SITES= ${HOMEPAGE}dist/ + +MAINTAINER= Margarida Sequeira + +# GPL +PERMIT_PACKAGE_CDROM= Yes +PERMIT_PACKAGE_FTP= Yes +PERMIT_DISTFILES_CDROM= Yes +PERMIT_DISTFILES_FTP= Yes + +CONFIGURE_STYLE= gnu + +USE_GMAKE= Yes + +NO_REGRESS= Yes + +post-install: + ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/monit + ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/monit/api-docs + ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/monit + cd ${WRKSRC}/doc && ${INSTALL_DATA} monit.html \ + ${PREFIX}/share/doc/monit + cd ${WRKSRC}/doc/api-docs && ${INSTALL_DATA} * \ + ${PREFIX}/share/doc/monit/api-docs + cd ${WRKSRC} && ${INSTALL_DATA} monitrc \ + ${PREFIX}/share/examples/monit + +.include diff --git a/sysutils/monit/distinfo b/sysutils/monit/distinfo new file mode 100644 index 00000000000..a5c96fcd277 --- /dev/null +++ b/sysutils/monit/distinfo @@ -0,0 +1,3 @@ +MD5 (monit-3.0.tar.gz) = 6eea589efe05667920fa8a8145e50e06 +RMD160 (monit-3.0.tar.gz) = 3a0ed2fadeab335df515e95904c9101de114c956 +SHA1 (monit-3.0.tar.gz) = 25152303db53dd0e2952432db4b4e9ec352f5200 diff --git a/sysutils/monit/patches/patch-configure b/sysutils/monit/patches/patch-configure new file mode 100644 index 00000000000..fb9bfa5a261 --- /dev/null +++ b/sysutils/monit/patches/patch-configure @@ -0,0 +1,21 @@ +$OpenBSD: patch-configure,v 1.1.1.1 2002/11/29 23:22:21 margarida Exp $ +--- configure.orig Sun Sep 22 06:42:11 2002 ++++ configure Sun Sep 22 06:44:13 2002 +@@ -5083,7 +5083,7 @@ then + elif test `uname` = "Linux" + then + ARCH="LINUX" +-elif test `uname` = "FreeBSD" ++elif test `uname` = "OpenBSD" + then + # Test for kvm libs + kvm_libs="" +@@ -5150,7 +5150,7 @@ fi + then + LIBS="$LIBS $kvm_libs" + fi +- ARCH="FREEBSD" ++ ARCH="OPENBSD" + else + { echo "$as_me:$LINENO: WARNING: Architecture not supported: \`uname\`. Trying Linux compile" >&5 + echo "$as_me: WARNING: Architecture not supported: \`uname\`. Trying Linux compile" >&2;} diff --git a/sysutils/monit/patches/patch-monitor_h b/sysutils/monit/patches/patch-monitor_h new file mode 100644 index 00000000000..7c4707944de --- /dev/null +++ b/sysutils/monit/patches/patch-monitor_h @@ -0,0 +1,12 @@ +$OpenBSD: patch-monitor_h,v 1.1.1.1 2002/11/29 23:22:21 margarida Exp $ +--- monitor.h.orig Sun Sep 22 14:10:50 2002 ++++ monitor.h Sun Sep 22 14:11:41 2002 +@@ -276,7 +276,7 @@ int exist_file(char *); + time_t file_changedtime(char *file); + char *get_ctime(); + char *get_RFC1123date(long *); +-char *get_uptime(long delta); ++char *get_uptime(time_t delta); + char *get_process_uptime(char *); + char *get_md5sum(char *); + int check_md5(char *, char *); diff --git a/sysutils/monit/patches/patch-p_y b/sysutils/monit/patches/patch-p_y new file mode 100644 index 00000000000..148a018778f --- /dev/null +++ b/sysutils/monit/patches/patch-p_y @@ -0,0 +1,13 @@ +$OpenBSD: patch-p_y,v 1.1.1.1 2002/11/29 23:22:21 margarida Exp $ +--- p.y.orig Fri Nov 29 17:07:24 2002 ++++ p.y Fri Nov 29 17:17:19 2002 +@@ -932,7 +932,8 @@ static void reset_mailfilter() { + mtf.timeout= FALSE; + mtf.restart= FALSE; + mtf.checksum= FALSE; +- ++ mtf.resource= FALSE; ++ mtf.stop= FALSE; + } + + diff --git a/sysutils/monit/patches/patch-process_sysdep_c b/sysutils/monit/patches/patch-process_sysdep_c new file mode 100644 index 00000000000..8be78a9cf0b --- /dev/null +++ b/sysutils/monit/patches/patch-process_sysdep_c @@ -0,0 +1,65 @@ +$OpenBSD: patch-process_sysdep_c,v 1.1.1.1 2002/11/29 23:22:21 margarida Exp $ +--- process/sysdep.c.orig Fri Sep 13 02:32:26 2002 ++++ process/sysdep.c Sun Sep 22 16:07:30 2002 +@@ -57,7 +57,7 @@ + #include + #endif + +-#ifdef FREEBSD ++#ifdef OPENBSD + #include + #include + #include +@@ -65,14 +65,15 @@ + #include + #include + #include +-#include +-#include +-#include ++#include ++#include ++#include + #include + #include +-#include ++#include + #include + #include ++ssize_t kvm_uread(kvm_t *, const struct proc *, u_long, char *, size_t); + #endif + + #ifdef LINUX +@@ -279,7 +280,7 @@ int get_process_info_sysdep(ProcInfo_T p + + #endif + +-#ifdef FREEBSD ++#ifdef OPENBSD + + #define pagetok(size) ((size) << pageshift) + #define tv2sec(tv) (((u_int64_t) tv.tv_sec * 1000000) + (u_int64_t) tv.tv_usec) +@@ -348,8 +349,8 @@ static void calcru(struct proc *p, struc + int init_process_info_sysdep(void) { + + register int pagesize; +- struct vmmeter vmm; +- ++ struct uvmexp vmm; ++ + struct nlist nlst [] = { + { "_bufspace"}, + { "_cnt" }, +@@ -401,9 +402,9 @@ int init_process_info_sysdep(void) { + + } + +- mem_kbyte_max= vmm.v_pageout_free_min + +- vmm.v_free_count + vmm.v_wire_count + +- vmm.v_active_count + vmm.v_inactive_count; ++ mem_kbyte_max= vmm.freemin + ++ vmm.free + vmm.wired + ++ vmm.active + vmm.inactive; + + return TRUE; + diff --git a/sysutils/monit/patches/patch-validate_c b/sysutils/monit/patches/patch-validate_c new file mode 100644 index 00000000000..36a28f18ef5 --- /dev/null +++ b/sysutils/monit/patches/patch-validate_c @@ -0,0 +1,16 @@ +$OpenBSD: patch-validate_c,v 1.1.1.1 2002/11/29 23:22:21 margarida Exp $ +--- validate.c.orig Fri Nov 29 17:09:25 2002 ++++ validate.c Fri Nov 29 17:15:54 2002 +@@ -478,6 +478,12 @@ static int check_process_state(Process_T + + log("'%s' %s\n", p->name, report); + ++ /* We do not check the process anymore if it's a zombie ++ since such a process is (usually) unmanageable */ ++ LOCK(Run.mutex) ++ p->do_validate= FALSE; ++ END_LOCK; ++ + return FALSE; + + } else { diff --git a/sysutils/monit/pkg/DEINSTALL b/sysutils/monit/pkg/DEINSTALL new file mode 100644 index 00000000000..9a5477947fb --- /dev/null +++ b/sysutils/monit/pkg/DEINSTALL @@ -0,0 +1,25 @@ +#!/bin/sh +# $OpenBSD: DEINSTALL,v 1.1.1.1 2002/11/29 23:22:21 margarida Exp $ +# +# monit de-installation + +set -e +PATH=/bin:/usr/bin:/sbin:/usr/sbin +PREFIX=${PKG_PREFIX:-/usr/local} +CONFIG_DIR=${SYSCONFDIR} + +if [ -f $CONFIG_DIR/monitrc ]; then + echo + echo "+------------" + echo "| To completely deinstall the $1 package you need to perform" + echo "| this step as root:" + echo "|" + echo "| rm $CONFIG_DIR/monitrc" + echo "|" + echo "| Do not do this if you plan on re-installing $1" + echo "| at some future." + echo "+------------" + echo +fi + +exit 0 diff --git a/sysutils/monit/pkg/DESCR b/sysutils/monit/pkg/DESCR new file mode 100644 index 00000000000..5e14dffdac3 --- /dev/null +++ b/sysutils/monit/pkg/DESCR @@ -0,0 +1,24 @@ +monit is an utility for monitoring and managing daemons or similar +programs running on a Unix system. It will start specified programs +if they are not running and restart programs not responding. + +monit supports: + * Daemon mode - poll programs at a specified interval + * Start, stop and restart of programs + * Group- and manage groups of programs + * Logging - syslog or own logfile + * Configuration - comprehensive controlfile + * Runtime and TCP/IP port checking (tcp and udp) + * Unix domain socket checking + * Process status and process timeout + * Process memory usage and process cpu usage + * Alert, stop or restart a process based on it's characteristics + * Check the systems load average + * MD5 checksum for programs started and stopped by monit + * Alert notification for program timeout, restart, + checksum, stop and resource error + * Flexible and customizable email alert messages + * Protocol verification. HTTP, FTP, SMTP, POP, IMAP and NNTP + * A http interface to make monit accessible from a Browser + +WWW: {HOMEPAGE} diff --git a/sysutils/monit/pkg/INSTALL b/sysutils/monit/pkg/INSTALL new file mode 100644 index 00000000000..a67c4471169 --- /dev/null +++ b/sysutils/monit/pkg/INSTALL @@ -0,0 +1,64 @@ +#!/bin/sh +# $OpenBSD: INSTALL,v 1.1.1.1 2002/11/29 23:22:21 margarida Exp $ +# +# Pre/post-installation setup of monit + +# exit on errors, use a sane path and install prefix +# +set -e +PATH=/bin:/usr/bin:/sbin:/usr/sbin +PREFIX=${PKG_PREFIX:-/usr/local} +CONFIG_DIR=${SYSCONFDIR} +SAMPLE_CONFIG_DIR=$PREFIX/share/examples/monit + +do_notice() +{ + echo + echo "+------------" + echo "| The existing $1 configuration file in $CONFIG_DIR," + echo "| has NOT been changed. You may want to compare them" + echo "| to the current sample file in $SAMPLE_CONFIG_DIR," + echo "| and update your configuration as needed." + echo "+------------" +} + +do_install() +{ + install -d -o root -g wheel -m 755 $CONFIG_DIR + install -o root -g wheel -m 644 $SAMPLE_CONFIG_DIR/monitrc $CONFIG_DIR/monitrc + echo + echo "+------------" + echo "| The $1 configuration file (monitrc) has been installed" + echo "| into $CONFIG_DIR. Please view this file and change the" + echo "| configuration to meet your needs." + echo "| You can also place it in ~/.monitrc." + echo "+------------" +} + +# verify proper execution +# +if [ $# -ne 2 ]; then + echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2 + exit 1 +fi + +# Verify/process the command +# +case $2 in + PRE-INSTALL) + : nothing to pre-install for this port + ;; + POST-INSTALL) + if [ ! -f $CONFIG_DIR/monitrc ]; then + do_install $1 + else + do_notice $1 + fi + ;; + *) + echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/sysutils/monit/pkg/PLIST b/sysutils/monit/pkg/PLIST new file mode 100644 index 00000000000..830ff733881 --- /dev/null +++ b/sysutils/monit/pkg/PLIST @@ -0,0 +1,148 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2002/11/29 23:22:21 margarida Exp $ +bin/monit +man/man1/monit.1 +share/doc/monit/api-docs/alert_8c-source.html +share/doc/monit/api-docs/alert_8c.html +share/doc/monit/api-docs/alert_8h-source.html +share/doc/monit/api-docs/alert_8h.html +share/doc/monit/api-docs/annotated.html +share/doc/monit/api-docs/base64_8c-source.html +share/doc/monit/api-docs/base64_8c.html +share/doc/monit/api-docs/base64_8h-source.html +share/doc/monit/api-docs/base64_8h.html +share/doc/monit/api-docs/cervlet_8c-source.html +share/doc/monit/api-docs/cervlet_8c.html +share/doc/monit/api-docs/cervlet_8h-source.html +share/doc/monit/api-docs/cervlet_8h.html +share/doc/monit/api-docs/classes.html +share/doc/monit/api-docs/common_8c-source.html +share/doc/monit/api-docs/common_8c.html +share/doc/monit/api-docs/daemonize_8c-source.html +share/doc/monit/api-docs/daemonize_8c.html +share/doc/monit/api-docs/default_8c-source.html +share/doc/monit/api-docs/default_8c.html +share/doc/monit/api-docs/doxygen.css +share/doc/monit/api-docs/doxygen.png +share/doc/monit/api-docs/engine_8c-source.html +share/doc/monit/api-docs/engine_8c.html +share/doc/monit/api-docs/engine_8h-source.html +share/doc/monit/api-docs/engine_8h.html +share/doc/monit/api-docs/env_8c-source.html +share/doc/monit/api-docs/env_8c.html +share/doc/monit/api-docs/files.html +share/doc/monit/api-docs/files_8c-source.html +share/doc/monit/api-docs/files_8c.html +share/doc/monit/api-docs/ftp_8c-source.html +share/doc/monit/api-docs/ftp_8c.html +share/doc/monit/api-docs/ftv2blank.png +share/doc/monit/api-docs/ftv2doc.png +share/doc/monit/api-docs/ftv2folderclosed.png +share/doc/monit/api-docs/ftv2folderopen.png +share/doc/monit/api-docs/ftv2lastnode.png +share/doc/monit/api-docs/ftv2link.png +share/doc/monit/api-docs/ftv2mlastnode.png +share/doc/monit/api-docs/ftv2mnode.png +share/doc/monit/api-docs/ftv2node.png +share/doc/monit/api-docs/ftv2plastnode.png +share/doc/monit/api-docs/ftv2pnode.png +share/doc/monit/api-docs/ftv2vertline.png +share/doc/monit/api-docs/functions.html +share/doc/monit/api-docs/gc_8c-source.html +share/doc/monit/api-docs/gc_8c.html +share/doc/monit/api-docs/globals.html +share/doc/monit/api-docs/http_8c-source.html +share/doc/monit/api-docs/http_8c.html +share/doc/monit/api-docs/http__utils_8c-source.html +share/doc/monit/api-docs/http__utils_8c.html +share/doc/monit/api-docs/http__utils_8h-source.html +share/doc/monit/api-docs/http__utils_8h.html +share/doc/monit/api-docs/imap_8c-source.html +share/doc/monit/api-docs/imap_8c.html +share/doc/monit/api-docs/index.html +share/doc/monit/api-docs/log_8c-source.html +share/doc/monit/api-docs/log_8c.html +share/doc/monit/api-docs/main.html +share/doc/monit/api-docs/md5_8c-source.html +share/doc/monit/api-docs/md5_8c.html +share/doc/monit/api-docs/md5_8h-source.html +share/doc/monit/api-docs/md5_8h.html +share/doc/monit/api-docs/monit__http_8c-source.html +share/doc/monit/api-docs/monit__http_8c.html +share/doc/monit/api-docs/monit__process_8c-source.html +share/doc/monit/api-docs/monit__process_8c.html +share/doc/monit/api-docs/monit__process_8h-source.html +share/doc/monit/api-docs/monit__process_8h.html +share/doc/monit/api-docs/monitor_8c-source.html +share/doc/monit/api-docs/monitor_8c.html +share/doc/monit/api-docs/monitor_8h-source.html +share/doc/monit/api-docs/monitor_8h.html +share/doc/monit/api-docs/net_8c-source.html +share/doc/monit/api-docs/net_8c.html +share/doc/monit/api-docs/net_8h-source.html +share/doc/monit/api-docs/net_8h.html +share/doc/monit/api-docs/nntp_8c-source.html +share/doc/monit/api-docs/nntp_8c.html +share/doc/monit/api-docs/pop_8c-source.html +share/doc/monit/api-docs/pop_8c.html +share/doc/monit/api-docs/process_8h-source.html +share/doc/monit/api-docs/process_8h.html +share/doc/monit/api-docs/processor_8c-source.html +share/doc/monit/api-docs/processor_8c.html +share/doc/monit/api-docs/processor_8h-source.html +share/doc/monit/api-docs/processor_8h.html +share/doc/monit/api-docs/protocol_8c-source.html +share/doc/monit/api-docs/protocol_8c.html +share/doc/monit/api-docs/protocol_8h-source.html +share/doc/monit/api-docs/protocol_8h.html +share/doc/monit/api-docs/sendmail_8c-source.html +share/doc/monit/api-docs/sendmail_8c.html +share/doc/monit/api-docs/signal_8c-source.html +share/doc/monit/api-docs/signal_8c.html +share/doc/monit/api-docs/smtp_8c-source.html +share/doc/monit/api-docs/smtp_8c.html +share/doc/monit/api-docs/spawn_8c-source.html +share/doc/monit/api-docs/spawn_8c.html +share/doc/monit/api-docs/start_8c-source.html +share/doc/monit/api-docs/start_8c.html +share/doc/monit/api-docs/status_8c-source.html +share/doc/monit/api-docs/status_8c.html +share/doc/monit/api-docs/stop_8c-source.html +share/doc/monit/api-docs/stop_8c.html +share/doc/monit/api-docs/structServiceImpl.html +share/doc/monit/api-docs/structentry.html +share/doc/monit/api-docs/structhost__allow.html +share/doc/monit/api-docs/structinetaddress.html +share/doc/monit/api-docs/structmd5__ctx.html +share/doc/monit/api-docs/structmychecksum.html +share/doc/monit/api-docs/structmycommand.html +share/doc/monit/api-docs/structmymail.html +share/doc/monit/api-docs/structmyport.html +share/doc/monit/api-docs/structmyport_1_1myprotocol.html +share/doc/monit/api-docs/structmyprocess.html +share/doc/monit/api-docs/structmyprocinfo.html +share/doc/monit/api-docs/structmyresource.html +share/doc/monit/api-docs/structmyrun.html +share/doc/monit/api-docs/structmyrun_1_1myautentication.html +share/doc/monit/api-docs/structmyrun_1_1myenvironment.html +share/doc/monit/api-docs/structmyrun_1_1myformat.html +share/doc/monit/api-docs/structrequest.html +share/doc/monit/api-docs/structrequestwrapper.html +share/doc/monit/api-docs/structresponse.html +share/doc/monit/api-docs/sysdep_8c-source.html +share/doc/monit/api-docs/sysdep_8c.html +share/doc/monit/api-docs/sysdep_8h-source.html +share/doc/monit/api-docs/sysdep_8h.html +share/doc/monit/api-docs/tree.html +share/doc/monit/api-docs/tree.js +share/doc/monit/api-docs/treeview.js +share/doc/monit/api-docs/util_8c-source.html +share/doc/monit/api-docs/util_8c.html +share/doc/monit/api-docs/validate_8c-source.html +share/doc/monit/api-docs/validate_8c.html +share/doc/monit/api-docs/xmalloc_8c-source.html +share/doc/monit/api-docs/xmalloc_8c.html +share/doc/monit/monit.html +share/examples/monit/monitrc +@dirrm share/examples/monit +@dirrm share/doc/monit/api-docs +@dirrm share/doc/monit