Import resmon-20090802 and nagios-plugins-resmon-20090802
Resmon is a lightweight utility for local host monitoring that can be queried by tools such as nagios over http. One of the main design goals is portability: that resmon should require nothing more than a default install of Perl. Also provide nagios-plugins-resmon for checking resmon agents. Assistance by and ok merdely@
This commit is contained in:
parent
b03af60431
commit
83bc9e629c
54
sysutils/resmon/Makefile
Normal file
54
sysutils/resmon/Makefile
Normal file
@ -0,0 +1,54 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2009/08/02 19:12:15 jdixon Exp $
|
||||
|
||||
COMMENT-main = system monitoring tool
|
||||
COMMENT-nagios = nagios plugin for resmon
|
||||
|
||||
V = 20090802
|
||||
DISTNAME = resmon-$V
|
||||
PKGNAME-main = ${DISTNAME}
|
||||
PKGNAME-nagios = nagios-plugins-resmon-$V
|
||||
CATEGORIES = sysutils
|
||||
HOMEPAGE = http://labs.omniti.com/trac/resmon
|
||||
|
||||
MAINTAINER = Jason Dixon <jdixon@openbsd.org>
|
||||
|
||||
MULTI_PACKAGES = -main -nagios
|
||||
|
||||
# BSD
|
||||
PERMIT_PACKAGE_CDROM = Yes
|
||||
PERMIT_PACKAGE_FTP = Yes
|
||||
PERMIT_DISTFILES_CDROM = Yes
|
||||
PERMIT_DISTFILES_FTP = Yes
|
||||
|
||||
MASTER_SITES = http://www.dixongroup.net/
|
||||
NO_BUILD = Yes
|
||||
NO_REGRESS = Yes
|
||||
PKG_ARCH = *
|
||||
|
||||
RUN_DEPENDS-nagios = ::net/nagios/plugins,-main
|
||||
|
||||
INSTDIR = ${PREFIX}/libdata/perl5/site_perl
|
||||
RESMONCONF = ${SYSCONFDIR}/resmon
|
||||
RESMONSTATE = /var/resmon
|
||||
SUBST_VARS = INSTDIR RESMONCONF RESMONSTATE
|
||||
|
||||
DOCSDIR = ${PREFIX}/share/doc/resmon
|
||||
EXAMPLESDIR = ${PREFIX}/share/examples/resmon
|
||||
|
||||
|
||||
pre-configure:
|
||||
${SUBST_CMD} ${WRKDIST}/resmon ${WRKDIST}/resmon.conf.sample
|
||||
|
||||
do-install:
|
||||
@find ${WRKDIST} -name \*.bak -or -name \*.orig | xargs rm
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/resmon ${PREFIX}/sbin
|
||||
@cp -R ${WRKDIST}/lib/Resmon ${INSTDIR}
|
||||
${INSTALL_DATA_DIR} ${DOCSDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/LICENSE ${DOCSDIR}
|
||||
${INSTALL_DATA_DIR} ${EXAMPLESDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/resmon.conf.sample ${EXAMPLESDIR}
|
||||
${INSTALL_SCRIPT_DIR} ${PREFIX}/libexec/nagios
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/scripts/check_resmon_xml_part \
|
||||
${PREFIX}/libexec/nagios
|
||||
|
||||
.include <bsd.port.mk>
|
5
sysutils/resmon/distinfo
Normal file
5
sysutils/resmon/distinfo
Normal file
@ -0,0 +1,5 @@
|
||||
MD5 (resmon-20090802.tar.gz) = LSx7GCVRETJf6MFVoPjh2Q==
|
||||
RMD160 (resmon-20090802.tar.gz) = f9iNINA2lXFOHHVYwR/4LcAqN98=
|
||||
SHA1 (resmon-20090802.tar.gz) = 04zz34VydTwi5THRomm2t96C3iQ=
|
||||
SHA256 (resmon-20090802.tar.gz) = dfl54za3QWWVJz6qjAuCvRwDk4N0NQ9EtZ0NJnDx6l4=
|
||||
SIZE (resmon-20090802.tar.gz) = 26917
|
11
sysutils/resmon/patches/patch-resmon
Normal file
11
sysutils/resmon/patches/patch-resmon
Normal file
@ -0,0 +1,11 @@
|
||||
$OpenBSD: patch-resmon,v 1.1.1.1 2009/08/02 19:12:15 jdixon Exp $
|
||||
--- resmon.orig Mon Jun 8 14:32:28 2009
|
||||
+++ resmon Sun Aug 2 03:06:45 2009
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
BEGIN {
|
||||
(my $dir = $0) =~ s/\/?[^\/]+$//;
|
||||
- eval "use lib '$dir/lib';";
|
||||
die $@ if($@);
|
||||
};
|
||||
|
59
sysutils/resmon/patches/patch-resmon_conf_sample
Normal file
59
sysutils/resmon/patches/patch-resmon_conf_sample
Normal file
@ -0,0 +1,59 @@
|
||||
$OpenBSD: patch-resmon_conf_sample,v 1.1.1.1 2009/08/02 19:12:15 jdixon Exp $
|
||||
--- resmon.conf.sample.orig Fri Jan 2 14:30:32 2009
|
||||
+++ resmon.conf.sample Sun Aug 2 02:57:48 2009
|
||||
@@ -1,48 +1,21 @@
|
||||
INTERVAL 60;
|
||||
PORT 81;
|
||||
-STATUSFILE /var/run/resmon-status.txt;
|
||||
+STATUSFILE ${RESMONSTATE}/status.txt;
|
||||
TIMEOUT 10;
|
||||
|
||||
-# Resmon health check. Shows the hostname, svn revision, and any problems with
|
||||
-# modules or the configuration file.
|
||||
RESMON {
|
||||
resmon : noop
|
||||
}
|
||||
-LOGFILE {
|
||||
- # Oracle alert file (look for ORA- lines)
|
||||
- /usr/app/oracle/admin/DWP1/bdump/alert_QLP1.log : match => ORA-
|
||||
-}
|
||||
TCPSERVICE {
|
||||
ssh : host => 127.0.0.1, port => 22, timeout => 2
|
||||
}
|
||||
NETSTAT {
|
||||
- oracle-listener : localport => 1521, state => LISTEN, atleast => 1
|
||||
- www1-dbconnections : localport => 1521, remoteip => 10.0.0.81, atleast => 2, limit => 50
|
||||
- www2-dbconnections : localport => 1521, remoteip => 10.0.0.82, atleast => 2, limit => 50
|
||||
- www3-dbconnections : localport => 1521, remoteip => 10.0.0.83, atleast => 2, limit => 50
|
||||
- www4-dbconnections : localport => 1521, remoteip => 10.0.0.84, atleast => 2, limit => 50
|
||||
- www5-dbconnections : localport => 1521, remoteip => 10.0.0.85, atleast => 2, limit => 50
|
||||
+ ident : localport => 113, state => LISTEN, atleast => 1
|
||||
}
|
||||
-A1000 {
|
||||
- fa000_001 : status => Optimal
|
||||
- ag028_003 : status => Optimal
|
||||
- fd032_002 : status => Optimal
|
||||
-}
|
||||
DISK {
|
||||
- /data1 : limit => 95%, warnat => 70%
|
||||
- /data2 : limit => 95%, warnat => 70%
|
||||
- /data3 : limit => 95%, warnat => 70%
|
||||
- /data/oradata/QLP2/statspack01 : limit => 95%
|
||||
- /data/oradata/QLP2/redo01 : limit => 95%
|
||||
- /data/oradata/QLP2/redo03 : limit => 95%
|
||||
- /data/oradata/QLP2/redo04 : limit => 95%
|
||||
- /data/oradata/QLP2/tools01 : limit => 95%
|
||||
- /data/oradata/QLP2/redo02 : limit => 95%
|
||||
- /data/oradata/QLP2/users01 : limit => 95%
|
||||
- /data/oradata/QLP2/temp01 : limit => 95%
|
||||
- /data/oradata/QLP2/data01 : limit => 95%
|
||||
- /data/oradata/QLP2/index01 : limit => 95%
|
||||
- /data/oradata/QLP2/system01 : limit => 95%
|
||||
- /data/oradata/QLP2/arch01 : limit => 95%
|
||||
- /data/oradata/QLP2/rbs01 : limit => 95%
|
||||
+ / : limit => 95%, warnat => 70%
|
||||
+# /tmp : limit => 95%, warnat => 70%
|
||||
+# /usr : limit => 95%, warnat => 70%
|
||||
+# /var : limit => 95%, warnat => 70%
|
||||
+# /home : limit => 95%, warnat => 70%
|
||||
}
|
4
sysutils/resmon/pkg/DESCR-main
Normal file
4
sysutils/resmon/pkg/DESCR-main
Normal file
@ -0,0 +1,4 @@
|
||||
Resmon is a lightweight utility for local host monitoring that can be
|
||||
queried by tools such as nagios over http. One of the main design goals
|
||||
is portability: that resmon should require nothing more than a default
|
||||
install of Perl.
|
1
sysutils/resmon/pkg/DESCR-nagios
Normal file
1
sysutils/resmon/pkg/DESCR-nagios
Normal file
@ -0,0 +1 @@
|
||||
Check resmon monitoring agents.
|
8
sysutils/resmon/pkg/MESSAGE-main
Normal file
8
sysutils/resmon/pkg/MESSAGE-main
Normal file
@ -0,0 +1,8 @@
|
||||
A sample config file for Resmon has been installed in
|
||||
${RESMONCONF}, edit it to suit your needs.
|
||||
|
||||
To start, add the following to /etc/rc.local:
|
||||
|
||||
if [ -x ${PREFIX}/sbin/resmon ]; then
|
||||
echo -n ' resmon'; ${PREFIX}/sbin/resmon -c ${RESMONCONF}/resmon.conf
|
||||
fi
|
62
sysutils/resmon/pkg/PLIST-main
Normal file
62
sysutils/resmon/pkg/PLIST-main
Normal file
@ -0,0 +1,62 @@
|
||||
@comment $OpenBSD: PLIST-main,v 1.1.1.1 2009/08/02 19:12:15 jdixon Exp $
|
||||
libdata/perl5/site_perl/Resmon/
|
||||
libdata/perl5/site_perl/Resmon/Config.pm
|
||||
libdata/perl5/site_perl/Resmon/ExtComm.pm
|
||||
libdata/perl5/site_perl/Resmon/Module/
|
||||
libdata/perl5/site_perl/Resmon/Module.pm
|
||||
libdata/perl5/site_perl/Resmon/Module/A1000.pm
|
||||
libdata/perl5/site_perl/Resmon/Module/ADAPTEC.pm
|
||||
libdata/perl5/site_perl/Resmon/Module/ALTQSTAT.pm
|
||||
libdata/perl5/site_perl/Resmon/Module/BACULADIR.pm
|
||||
libdata/perl5/site_perl/Resmon/Module/BACULAJOBS.pm
|
||||
libdata/perl5/site_perl/Resmon/Module/BACULATAPE.pm
|
||||
libdata/perl5/site_perl/Resmon/Module/CPU.pm
|
||||
libdata/perl5/site_perl/Resmon/Module/DATE.pm
|
||||
libdata/perl5/site_perl/Resmon/Module/DHCPLEASES.pm
|
||||
libdata/perl5/site_perl/Resmon/Module/DISK.pm
|
||||
libdata/perl5/site_perl/Resmon/Module/DNS.pm
|
||||
libdata/perl5/site_perl/Resmon/Module/ECCMGR.pm
|
||||
libdata/perl5/site_perl/Resmon/Module/FAULTS.pm
|
||||
libdata/perl5/site_perl/Resmon/Module/FILEAGE.pm
|
||||
libdata/perl5/site_perl/Resmon/Module/FILECOUNT.pm
|
||||
libdata/perl5/site_perl/Resmon/Module/FILESIZE.pm
|
||||
libdata/perl5/site_perl/Resmon/Module/FRESHSVN.pm
|
||||
libdata/perl5/site_perl/Resmon/Module/INODES.pm
|
||||
libdata/perl5/site_perl/Resmon/Module/LARGEFILES.pm
|
||||
libdata/perl5/site_perl/Resmon/Module/LOAD.pm
|
||||
libdata/perl5/site_perl/Resmon/Module/LOGFILE.pm
|
||||
libdata/perl5/site_perl/Resmon/Module/MDSTAT.pm
|
||||
libdata/perl5/site_perl/Resmon/Module/NAGIOS.pm
|
||||
libdata/perl5/site_perl/Resmon/Module/NETBACKUPTAPE.pm
|
||||
libdata/perl5/site_perl/Resmon/Module/NETSTAT.pm
|
||||
libdata/perl5/site_perl/Resmon/Module/NEWFILES.pm
|
||||
libdata/perl5/site_perl/Resmon/Module/OLDFILES.pm
|
||||
libdata/perl5/site_perl/Resmon/Module/PGREP.pm
|
||||
libdata/perl5/site_perl/Resmon/Module/PING.pm
|
||||
libdata/perl5/site_perl/Resmon/Module/QUEUESIZE.pm
|
||||
libdata/perl5/site_perl/Resmon/Module/REMOTEFILESIZE.pm
|
||||
libdata/perl5/site_perl/Resmon/Module/RESMON.pm
|
||||
libdata/perl5/site_perl/Resmon/Module/ROMOUNT.pm
|
||||
libdata/perl5/site_perl/Resmon/Module/SCRIPT.pm
|
||||
libdata/perl5/site_perl/Resmon/Module/SIMPLESVN.pm
|
||||
libdata/perl5/site_perl/Resmon/Module/SMFMAINTENANCE.pm
|
||||
libdata/perl5/site_perl/Resmon/Module/SWAPSIZE.pm
|
||||
libdata/perl5/site_perl/Resmon/Module/TCPSERVICE.pm
|
||||
libdata/perl5/site_perl/Resmon/Module/TWRAID.pm
|
||||
libdata/perl5/site_perl/Resmon/Module/WALCHECK.pm
|
||||
libdata/perl5/site_perl/Resmon/Module/ZFSYNCHECK.pm
|
||||
libdata/perl5/site_perl/Resmon/Module/ZIMBRA.pm
|
||||
libdata/perl5/site_perl/Resmon/Module/ZPOOL.pm
|
||||
libdata/perl5/site_perl/Resmon/Module/ZPOOLERRS.pm
|
||||
libdata/perl5/site_perl/Resmon/Module/ZPOOLFREE.pm
|
||||
libdata/perl5/site_perl/Resmon/Status.pm
|
||||
libdata/perl5/site_perl/Resmon/Updater.pm
|
||||
@comment libexec/nagios/
|
||||
sbin/resmon
|
||||
@sample ${RESMONCONF}/
|
||||
@sample ${RESMONSTATE}/
|
||||
share/doc/resmon/
|
||||
share/doc/resmon/LICENSE
|
||||
share/examples/resmon/
|
||||
share/examples/resmon/resmon.conf.sample
|
||||
@sample ${RESMONCONF}/resmon.conf
|
2
sysutils/resmon/pkg/PLIST-nagios
Normal file
2
sysutils/resmon/pkg/PLIST-nagios
Normal file
@ -0,0 +1,2 @@
|
||||
@comment $OpenBSD: PLIST-nagios,v 1.1.1.1 2009/08/02 19:12:15 jdixon Exp $
|
||||
libexec/nagios/check_resmon_xml_part
|
Loading…
Reference in New Issue
Block a user