summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-admin/mon')
-rw-r--r--app-admin/mon/Manifest24
-rw-r--r--app-admin/mon/files/digest-mon-1.2.03
-rw-r--r--app-admin/mon/files/mon-1.2.0-sendmail.patch36
-rw-r--r--app-admin/mon/files/mon-1.2.0-syslog.patch18
-rw-r--r--app-admin/mon/files/mon.cf34
-rw-r--r--app-admin/mon/files/mon.init32
-rw-r--r--app-admin/mon/mon-1.2.0.ebuild68
7 files changed, 215 insertions, 0 deletions
diff --git a/app-admin/mon/Manifest b/app-admin/mon/Manifest
new file mode 100644
index 0000000..28a0f38
--- /dev/null
+++ b/app-admin/mon/Manifest
@@ -0,0 +1,24 @@
+AUX mon-1.2.0-sendmail.patch 1450 RMD160 26e24a127b07855973b848f7ced95cd540ebc16e SHA1 37062b6764c688d7c09c122e276dbb63847b95d6 SHA256 7f72873f2669138ab1ee8fa6a1129936e8f5c65bee5da23b9ae03c0b9adfdab5
+MD5 70400bd77cafb35cae2c10c4bcb5ba3a files/mon-1.2.0-sendmail.patch 1450
+RMD160 26e24a127b07855973b848f7ced95cd540ebc16e files/mon-1.2.0-sendmail.patch 1450
+SHA256 7f72873f2669138ab1ee8fa6a1129936e8f5c65bee5da23b9ae03c0b9adfdab5 files/mon-1.2.0-sendmail.patch 1450
+AUX mon-1.2.0-syslog.patch 483 RMD160 a44e89b478a6a197095cbddcf138b7121f45d17f SHA1 17378c67c02bed9d413ff61f481aa5d606a59c4c SHA256 6cbd6683d55bbfd1da0f0b395a36bc4e177a9446899e6fdce26da4c2658b5b9e
+MD5 bb5741768a3c76b028fe778e16359791 files/mon-1.2.0-syslog.patch 483
+RMD160 a44e89b478a6a197095cbddcf138b7121f45d17f files/mon-1.2.0-syslog.patch 483
+SHA256 6cbd6683d55bbfd1da0f0b395a36bc4e177a9446899e6fdce26da4c2658b5b9e files/mon-1.2.0-syslog.patch 483
+AUX mon.cf 751 RMD160 1a039992f4e7812be4a029b9eddf07c6301e8d2b SHA1 757751288e49b15c492c646875377a523ce9dfbd SHA256 209da270077b8837bc10f10c1b13a8a2d835fe1c633b7676c6862ee10b9c3f17
+MD5 0a1e2a0813ad7879c29b8233ccddddbf files/mon.cf 751
+RMD160 1a039992f4e7812be4a029b9eddf07c6301e8d2b files/mon.cf 751
+SHA256 209da270077b8837bc10f10c1b13a8a2d835fe1c633b7676c6862ee10b9c3f17 files/mon.cf 751
+AUX mon.init 731 RMD160 a3515e8d9c61b3868eb64387a72f59b9589cd738 SHA1 f5ebfd680f4de41ac8d5243b6c63c8f1778617b4 SHA256 52d096ee3ebbf26e422cad715abaec14f3e3208e8df5616f0b2a1adf8f2a15ca
+MD5 4fce90c7d9dc2d7873e2c39ef91fba27 files/mon.init 731
+RMD160 a3515e8d9c61b3868eb64387a72f59b9589cd738 files/mon.init 731
+SHA256 52d096ee3ebbf26e422cad715abaec14f3e3208e8df5616f0b2a1adf8f2a15ca files/mon.init 731
+DIST mon-1.2.0.tar.bz2 245480 RMD160 51a40f2eda425c23f2afe92ffbf0ebe0cc5c58fe SHA1 e3a0c8e687c65cc944c8ce17cb1a3a7a8c4cc018 SHA256 a97550bf5051eb8dc4f77c0f30fa501f138f51e49f0957ce6967e7916213bf91
+EBUILD mon-1.2.0.ebuild 1496 RMD160 9830bb6f1e2943e2a7dd5bfaaf31aff36115613d SHA1 ed9982e23f347080b96689030f4e8476543ec4b6 SHA256 b6449a85b3e047deac575deee647f62f5bc938d0745f79774b478aca7395d8ee
+MD5 d846cb9880d584c22ff7fceea71f7ef3 mon-1.2.0.ebuild 1496
+RMD160 9830bb6f1e2943e2a7dd5bfaaf31aff36115613d mon-1.2.0.ebuild 1496
+SHA256 b6449a85b3e047deac575deee647f62f5bc938d0745f79774b478aca7395d8ee mon-1.2.0.ebuild 1496
+MD5 3b199947de74d27ea4a2021870a2553b files/digest-mon-1.2.0 232
+RMD160 5e88daf12d596add085f791840d717e5f1c0ce17 files/digest-mon-1.2.0 232
+SHA256 29749b7ab0c96e67b24797785c597ab6d11399938d7c5d752a3db4fb9bdfb5b5 files/digest-mon-1.2.0 232
diff --git a/app-admin/mon/files/digest-mon-1.2.0 b/app-admin/mon/files/digest-mon-1.2.0
new file mode 100644
index 0000000..5a961fa
--- /dev/null
+++ b/app-admin/mon/files/digest-mon-1.2.0
@@ -0,0 +1,3 @@
+MD5 ed52e4d4c6bbe8bca72f2a7843c0bcea mon-1.2.0.tar.bz2 245480
+RMD160 51a40f2eda425c23f2afe92ffbf0ebe0cc5c58fe mon-1.2.0.tar.bz2 245480
+SHA256 a97550bf5051eb8dc4f77c0f30fa501f138f51e49f0957ce6967e7916213bf91 mon-1.2.0.tar.bz2 245480
diff --git a/app-admin/mon/files/mon-1.2.0-sendmail.patch b/app-admin/mon/files/mon-1.2.0-sendmail.patch
new file mode 100644
index 0000000..e174295
--- /dev/null
+++ b/app-admin/mon/files/mon-1.2.0-sendmail.patch
@@ -0,0 +1,36 @@
+diff -urN mon-1.2.0.orig/alert.d/mail.alert mon-1.2.0/alert.d/mail.alert
+--- mon-1.2.0.orig/alert.d/mail.alert 2005-04-17 09:42:26.000000000 +0200
++++ mon-1.2.0/alert.d/mail.alert 2007-09-03 18:19:50.000000000 +0200
+@@ -46,7 +46,7 @@
+ $t = localtime($opt_t);
+ ($wday,$mon,$day,$tm) = split (/\s+/, $t);
+
+-open (MAIL, "| /usr/lib/sendmail -oi -t $mailfrom") ||
++open (MAIL, "| /usr/sbin/sendmail -oi -t $mailfrom") ||
+ die "could not open pipe to mail: $!\n";
+ print MAIL <<EOF;
+ To: $mailaddrs
+diff -urN mon-1.2.0.orig/alert.d/netpage.alert mon-1.2.0/alert.d/netpage.alert
+--- mon-1.2.0.orig/alert.d/netpage.alert 2005-04-17 09:42:26.000000000 +0200
++++ mon-1.2.0/alert.d/netpage.alert 2007-09-03 18:19:50.000000000 +0200
+@@ -41,7 +41,7 @@
+
+ $ALERT = $opt_u ? "UPALERT" : "ALERT";
+
+-open (MAIL, "| /usr/lib/sendmail -oi -t") ||
++open (MAIL, "| /usr/sbin/sendmail -oi -t") ||
+ die "could not open pipe to mail: $!\n";
+
+ print MAIL <<EOF;
+diff -urN mon-1.2.0.orig/clients/skymon/skymon mon-1.2.0/clients/skymon/skymon
+--- mon-1.2.0.orig/clients/skymon/skymon 2005-04-17 09:42:26.000000000 +0200
++++ mon-1.2.0/clients/skymon/skymon 2007-09-03 18:20:15.000000000 +0200
+@@ -233,7 +233,7 @@
+ # &load_address() || die "could not load address\n";
+ # print "$BUF";
+
+- open (MAIL, "| /usr/lib/sendmail -oi -t") ||
++ open (MAIL, "| /usr/sbin/sendmail -oi -t") ||
+ die "could not open pipe to mail: $!\n";
+ print MAIL <<EOF;
+ To: $ADDR
diff --git a/app-admin/mon/files/mon-1.2.0-syslog.patch b/app-admin/mon/files/mon-1.2.0-syslog.patch
new file mode 100644
index 0000000..ad0c668
--- /dev/null
+++ b/app-admin/mon/files/mon-1.2.0-syslog.patch
@@ -0,0 +1,18 @@
+--- mon-1.2.0.orig/mon 2007-10-08 19:04:50.000000000 +0200
++++ mon-1.2.0/mon 2007-10-09 16:04:16.000000000 +0200
+@@ -5410,11 +5410,10 @@
+
+ no warnings; # Redefining syslog
+ sub syslog {
+- eval {
+- local $SIG{"__DIE__"}= sub { };
+- my @log = map { s/\%//mg; } @_;
+- Sys::Syslog::syslog(@log);
+- }
++ local $SIG{"__DIE__"} = sub { };
++ my ($level, $msg) = @_;
++ $msg =~ s/\%//mg;
++ Sys::Syslog::syslog($level, $msg);
+ }
+ use warnings;
+
diff --git a/app-admin/mon/files/mon.cf b/app-admin/mon/files/mon.cf
new file mode 100644
index 0000000..dee693e
--- /dev/null
+++ b/app-admin/mon/files/mon.cf
@@ -0,0 +1,34 @@
+#
+# Very simple mon.cf file
+#
+
+alertdir = /usr/lib/mon/alert.d
+mondir = /usr/lib/mon/mon.d
+logdir = /var/log/mon.d
+statedir = /var/lib/mon.d
+maxprocs = 20
+histlength = 100
+randstart = 60s
+
+#
+# define groups of hosts to monitor
+#
+
+hostgroup servers localhost
+
+watch servers
+ service ping
+ interval 5m
+ monitor fping.monitor
+ period wd {Mon-Fri} hr {7am-24pm}
+ alert mail.alert root@localhost
+ alertevery 1h
+ period wd {Sat-Sun}
+ alert mail.alert root@localhost
+ service telnet
+ interval 10m
+ monitor telnet.monitor
+ period wd {Mon-Fri} hr {7am-24pm}
+ alertevery 1h
+ alertafter 2 30m
+ alert mail.alert root@localhost
diff --git a/app-admin/mon/files/mon.init b/app-admin/mon/files/mon.init
new file mode 100644
index 0000000..bb7122e
--- /dev/null
+++ b/app-admin/mon/files/mon.init
@@ -0,0 +1,32 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/mon/files/mon.rc6,v 1.7 2007/07/09 22:47:42 uberlord Exp $
+
+depend() {
+ need clock
+ after logger
+}
+
+checkconfig() {
+ if [ ! -e /etc/mon/mon.cf ] ; then
+ eerror "You need an /etc/mon/mon.cf file to run mon"
+ eerror "There is a sample at /etc/mon/mon.cf.sample"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting mon"
+ start-stop-daemon --start --exec /usr/sbin/mon \
+ --pidfile /var/run/mon.pid \
+ -- -P /var/run/mon.pid -f
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping mon"
+ start-stop-daemon --stop --pidfile /var/run/mon.pid
+ eend $?
+}
diff --git a/app-admin/mon/mon-1.2.0.ebuild b/app-admin/mon/mon-1.2.0.ebuild
new file mode 100644
index 0000000..d5579e6
--- /dev/null
+++ b/app-admin/mon/mon-1.2.0.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+inherit toolchain-funcs eutils multilib
+
+DESCRIPTION="highly configurable service monitoring daemon"
+HOMEPAGE="http://www.kernel.org/software/mon/"
+SRC_URI="mirror://kernel/software/admin/mon/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc x86"
+IUSE="ldap mysql pam"
+
+DEPEND=">=dev-perl/Mon-0.11
+ >=virtual/perl-Time-HiRes-1.20
+ dev-perl/Convert-BER
+ dev-perl/Filesys-DiskSpace
+ dev-perl/Net-Telnet
+ ldap? ( dev-perl/perl-ldap )
+ dev-perl/Expect
+ dev-perl/Net-DNS
+ mysql? ( dev-perl/DBD-mysql )
+ pam? ( dev-perl/Authen-PAM )
+ >=dev-perl/Period-1.20-r2"
+
+src_unpack() {
+ unpack "${A}"
+ cd "${S}"
+ epatch "${FILESDIR}/${P}-sendmail.patch"
+ epatch "${FILESDIR}/${P}-syslog.patch"
+}
+
+src_compile() {
+ cd "${S}"/mon.d
+ make CC="$(tc-getCC) ${CFLAGS}" || die
+}
+
+src_install() {
+ dosbin mon clients/mon*
+
+ insinto /usr/$(get_libdir)/mon/utils
+ doins utils/*
+
+ exeinto /usr/$(get_libdir)/mon/alert.d
+ doexe alert.d/*
+
+ exeinto /usr/$(get_libdir)/mon/mon.d
+ doexe mon.d/*.monitor
+
+ insopts -g uucp -m 02555
+ doins mon.d/*.wrap
+
+ dodir /var/log/mon.d
+ dodir /var/lib/mon.d
+
+ doman doc/*.{1,8}
+ dodoc CHANGES doc/CHANGES* CREDITS \
+ KNOWN-PROBLEMS README TODO VERSION \
+ doc/README* doc/*.txt
+ docinto etc; dodoc etc/*
+ newdoc "${FILESDIR}"/mon.cf mon.cf.sample
+
+ newinitd "${FILESDIR}"/mon.init mon
+ insinto /etc/mon
+ newins "${FILESDIR}"/mon.cf mon.cf.sample
+}