Add Icinga, an enterprise grade open source monitoring system which keeps
watch over networks and any conceivable network resource, notifies the user of errors and recoveries and generates performance data for reporting. Scalable and extensible, Icinga can monitor complex, large environments across dispersed locations. Icinga takes open source monitoring to the next level. WWW: http://www.icinga.org/
This commit is contained in:
parent
10820f3445
commit
18a3d75c1a
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=269555
@ -80,6 +80,7 @@
|
||||
SUBDIR += grepip
|
||||
SUBDIR += gsnmp
|
||||
SUBDIR += horde-nic
|
||||
SUBDIR += icinga
|
||||
SUBDIR += icmpmonitor
|
||||
SUBDIR += icmpquery
|
||||
SUBDIR += ifgraph
|
||||
|
133
net-mgmt/icinga/Makefile
Normal file
133
net-mgmt/icinga/Makefile
Normal file
@ -0,0 +1,133 @@
|
||||
# New ports collection makefile for: icinga
|
||||
# Date created: 2012/02/10
|
||||
# Whom: chinsan
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PORTNAME= icinga
|
||||
PORTVERSION= 1.3.0
|
||||
CATEGORIES= net-mgmt
|
||||
MASTER_SITES= SF
|
||||
|
||||
MAINTAINER= chinsan@FreeBSD.org
|
||||
COMMENT= Enterprise grade open source monitoring system based on nagios
|
||||
|
||||
LIB_DEPENDS= gd.4:${PORTSDIR}/graphics/gd
|
||||
RUN_DEPENDS= ${LOCALBASE}/libexec/nagios/check_nagios:${PORTSDIR}/net-mgmt/nagios-plugins
|
||||
|
||||
LICENSE= GPLv2
|
||||
|
||||
USE_ICONV= yes
|
||||
USE_PERL5_BUILD= yes
|
||||
USE_AUTOTOOLS= autoconf libltdl
|
||||
USE_RC_SUBR= icinga
|
||||
|
||||
OPTIONS= EMBEDDED_PERL "Enable embedded Perl [requires Perl 5.8.0+]" off \
|
||||
NANOSLEEP "Use nanosleep in event timing" off \
|
||||
EVENT_BROKER "Enable event broker functionality" off \
|
||||
UNHANDLED_HACK "Display passive checks in unhandled queries" off \
|
||||
|
||||
GNU_CONFIGURE= yes
|
||||
|
||||
ICINGAUSER?= icinga
|
||||
ICINGAGROUP?= icinga
|
||||
ICINGADIR?= /var/spool/icinga
|
||||
|
||||
ICINGAUID= 183
|
||||
ICINGAGID= ${ICINGAUID}
|
||||
|
||||
ICINGAWWWDIR?= www/icinga
|
||||
ICINGAHTMURL?= /icinga
|
||||
ICINGACGIURL?= ${ICINGAHTMURL}/cgi-bin
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
CPPFLAGS= -I${LOCALBASE}/include -fPIC
|
||||
CFLAGS+= ${CPPFLAGS}
|
||||
|
||||
CONFIGURE_ARGS= --with-command-user=${ICINGAUSER} \
|
||||
--with-command-group=${WWWGRP} \
|
||||
--with-icinga-user=${ICINGAUSER} \
|
||||
--with-icinga-group=${ICINGAGROUP} \
|
||||
--with-htmurl=${ICINGAHTMURL} \
|
||||
--with-cgiurl=${ICINGACGIURL} \
|
||||
--sbindir=${PREFIX}/${ICINGAWWWDIR}/cgi-bin \
|
||||
--libexecdir=${PREFIX}/libexec/icinga \
|
||||
--datarootdir=${PREFIX}/${ICINGAWWWDIR} \
|
||||
--datadir=${PREFIX}/${ICINGAWWWDIR} \
|
||||
--sysconfdir=${PREFIX}/etc/icinga \
|
||||
--localstatedir=${ICINGADIR} \
|
||||
--with-httpd-conf=${PREFIX}/etc \
|
||||
--with-checkresult-dir=${ICINGADIR}/checkresults \
|
||||
--disable-statuswrl
|
||||
|
||||
CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" \
|
||||
CFLAGS="${CFLAGS}" \
|
||||
LDFLAGS="${LDFLAGS}" \
|
||||
LIBS="-L${LOCALBASE}/lib" \
|
||||
PERL=${PERL}
|
||||
|
||||
MAKE_JOBS_UNSAFE= yes
|
||||
|
||||
INSTALL_TARGET= install install-commandmode install-config
|
||||
|
||||
PLIST_SUB= ICINGADIR=${ICINGADIR} \
|
||||
ICINGAWWWDIR=${ICINGAWWWDIR} \
|
||||
ICINGAUSER=${ICINGAUSER} \
|
||||
ICINGAGROUP=${ICINGAGROUP} \
|
||||
ICINGAUID=${ICINGAUID} \
|
||||
ICINGAGID=${ICINGAGID} \
|
||||
ICINGAHTMURL=${ICINGAHTMURL} \
|
||||
ICINGACGIURL=${ICINGACGIURL} \
|
||||
WWWGRP=${WWWGRP}
|
||||
|
||||
SUB_FILES= pkg-install \
|
||||
pkg-deinstall \
|
||||
pkg-message
|
||||
|
||||
# XXX: Don't remove PREFIX from SUB_LIST here.
|
||||
SUB_LIST= PREFIX=${PREFIX} \
|
||||
${PLIST_SUB}
|
||||
|
||||
USE_PHP= yes
|
||||
|
||||
.if defined(WITH_EMBEDDED_PERL)
|
||||
USE_PERL5= 5.8.0+
|
||||
CONFIGURE_ARGS+= --enable-embedded-perl \
|
||||
--with-perlcache
|
||||
PLIST_SUB+= EMBEDDED_PERL=""
|
||||
.else
|
||||
PLIST_SUB+= EMBEDDED_PERL="@comment "
|
||||
.endif
|
||||
|
||||
.if defined(WITH_NANOSLEEP)
|
||||
CONFIGURE_ARGS+= --enable-nanosleep
|
||||
.endif
|
||||
|
||||
.if defined(WITH_EVENT_BROKER)
|
||||
CONFIGURE_ARGS+= --enable-event-broker
|
||||
.else
|
||||
CONFIGURE_ARGS+= --disable-event-broker
|
||||
.endif
|
||||
|
||||
post-patch:
|
||||
.if defined(WITH_UNHANDLED_HACK)
|
||||
@${REINPLACE_CMD} -e 's#;serviceprops=42\&#;serviceprops=10\&#g' \
|
||||
-e 's#;hostprops=42\"#;hostprops=10\"#g' ${WRKSRC}/html/menu.html.in
|
||||
@${REINPLACE_CMD} -e 's#Linux#FreeBSD#' ${WRKSRC}/sample-config/icinga.cfg.in
|
||||
@${REINPLACE_CMD} -e 's#775#755#g; s#664#644#g' ${WRKSRC}/html/Makefile.in
|
||||
@${REINPLACE_CMD} -e 's#/bin/ping#/sbin/ping#' ${WRKSRC}/*
|
||||
@${FIND} ${WRKSRC} -name '*.orig' -delete
|
||||
.endif
|
||||
|
||||
pre-su-install:
|
||||
@${SH} ${PKGINSTALL} ${DISTNAME} PRE-INSTALL
|
||||
|
||||
post-install:
|
||||
@${CHMOD} 775 ${ICINGADIR} ${ICINGADIR}/archives ${ICINGADIR}/checkresults ${ICINGADIR}/rw
|
||||
@${CHOWN} ${ICINGAUSER}:${ICINGAGROUP} ${ICINGADIR} ${ICINGADIR}/archives ${ICINGADIR}/checkresults
|
||||
@${CHOWN} ${ICINGAUSER}:${WWWGRP} ${ICINGADIR}/rw
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
|
||||
.include <bsd.port.post.mk>
|
2
net-mgmt/icinga/distinfo
Normal file
2
net-mgmt/icinga/distinfo
Normal file
@ -0,0 +1,2 @@
|
||||
SHA256 (icinga-1.3.0.tar.gz) = eec3b6ffcc7bdac7c84d08d6bc8d899ca3ccfd40f063f0fdc0fb5e386ee086f4
|
||||
SIZE (icinga-1.3.0.tar.gz) = 12084804
|
103
net-mgmt/icinga/files/icinga.in
Normal file
103
net-mgmt/icinga/files/icinga.in
Normal file
@ -0,0 +1,103 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
# PROVIDE: icinga
|
||||
# REQUIRE: DAEMON
|
||||
# BEFORE: LOGIN
|
||||
# KEYWORD: shutdown
|
||||
|
||||
#
|
||||
# Add the following lines to /etc/rc.conf to enable icinga:
|
||||
# icinga_enable (bool): Set to "NO" by default.
|
||||
# Set it to "YES" to enable icinga.
|
||||
# icinga_precache (bool): Set to "NO" by default.
|
||||
# Set it to "YES" to enable pre-caching.
|
||||
# icinga_flags (str): Set to "" by default.
|
||||
# icinga_configfile (str): Set to "%%PREFIX%%/etc/icinga/icinga.cfg" by default.
|
||||
#
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="icinga"
|
||||
rcvar=`set_rcvar`
|
||||
|
||||
command="%%PREFIX%%/bin/icinga"
|
||||
command_args="-d"
|
||||
extra_commands="reload"
|
||||
pidfile="%%ICINGADIR%%/icinga.lock"
|
||||
icinga_user="%%ICINGAUSER%%"
|
||||
|
||||
start_precmd="start_precmd"
|
||||
stop_postcmd="stop_postcmd"
|
||||
restart_precmd="icinga_checkconfig"
|
||||
reload_precmd="reload_precmd"
|
||||
sig_reload=HUP
|
||||
|
||||
[ -z "${icinga_enable}" ] && icinga_enable="NO"
|
||||
[ -z "${icinga_configfile}" ] && icinga_configfile="%%PREFIX%%/etc/icinga/icinga.cfg"
|
||||
[ -z "${icinga_precache}" ] && icinga_precache="NO"
|
||||
|
||||
load_rc_config "${name}"
|
||||
|
||||
required_files="${icinga_configfile}"
|
||||
command_args="${command_args} ${icinga_configfile}"
|
||||
|
||||
icinga_cacheconfig() {
|
||||
if ! checkyesno icinga_precache; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
echo -n "Pre-Caching icinga configuration: "
|
||||
${command} -pv ${icinga_configfile} 2>&1 >/dev/null
|
||||
if [ $? != 0 ]; then
|
||||
echo "FAILED"
|
||||
${command} -v ${icinga_configfile}
|
||||
return 1
|
||||
else
|
||||
command_args="-u -x ${command_args}"
|
||||
echo "OK"
|
||||
fi
|
||||
}
|
||||
|
||||
icinga_checkconfig() {
|
||||
echo -n "Performing sanity check of icinga configuration: "
|
||||
${command} -v ${icinga_configfile} 2>&1 >/dev/null
|
||||
if [ $? != 0 ]; then
|
||||
echo "FAILED"
|
||||
${command} -v ${icinga_configfile}
|
||||
return 1
|
||||
else
|
||||
echo "OK"
|
||||
fi
|
||||
}
|
||||
|
||||
reload_precmd() {
|
||||
if ! icinga_checkconfig; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
if ! icinga_cacheconfig; then
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
start_precmd() {
|
||||
if ! icinga_checkconfig; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
if ! icinga_cacheconfig; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
su -m "${icinga_user}" -c "touch \"%%ICINGADIR%%/icinga.log\" \"%%ICINGADIR%%/status.sav\""
|
||||
rm -f "%%ICINGADIR%%/rw/icinga.cmd"
|
||||
}
|
||||
|
||||
stop_postcmd() {
|
||||
rm -f "%%ICINGADIR%%/icinga.tmp" "%%ICINGADIR%%/rw/icinga.cmd"
|
||||
}
|
||||
|
||||
run_rc_command "$1"
|
60
net-mgmt/icinga/files/patch-Makefile.in
Normal file
60
net-mgmt/icinga/files/patch-Makefile.in
Normal file
@ -0,0 +1,60 @@
|
||||
--- Makefile.in~ 2011-02-15 21:28:41.000000000 +0800
|
||||
+++ Makefile.in 2011-02-24 00:46:40.000000000 +0800
|
||||
@@ -375,12 +375,12 @@
|
||||
$(MAKE) install-basic
|
||||
|
||||
install-basic:
|
||||
- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(LIBEXECDIR)
|
||||
+ $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(LIBEXECDIR)
|
||||
$(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(LOGDIR)
|
||||
$(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(LOGDIR)/archives
|
||||
$(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CHECKRESULTDIR)
|
||||
if [ $(INSTALLPERLSTUFF) = yes ]; then \
|
||||
- $(INSTALL) -m 664 $(INSTALL_OPTS) p1.pl $(DESTDIR)$(BINDIR); \
|
||||
+ $(INSTALL) -m 644 $(INSTALL_OPTS) p1.pl $(DESTDIR)$(BINDIR); \
|
||||
fi;
|
||||
|
||||
@echo ""
|
||||
@@ -409,20 +409,20 @@
|
||||
|
||||
|
||||
install-config:
|
||||
- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)
|
||||
- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)/objects
|
||||
- $(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/icinga.cfg $(DESTDIR)$(CFGDIR)/icinga.cfg
|
||||
- $(INSTALL) -b -m 660 $(INSTALL_OPTS) sample-config/resource.cfg $(DESTDIR)$(CFGDIR)/resource.cfg
|
||||
- $(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/cgi.cfg $(DESTDIR)$(CFGDIR)/cgi.cfg
|
||||
- $(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/cgiauth.cfg $(DESTDIR)$(CFGDIR)/cgiauth.cfg
|
||||
- $(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/template-object/templates.cfg $(DESTDIR)$(CFGDIR)/objects/templates.cfg
|
||||
- $(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/template-object/commands.cfg $(DESTDIR)$(CFGDIR)/objects/commands.cfg
|
||||
- $(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/template-object/contacts.cfg $(DESTDIR)$(CFGDIR)/objects/contacts.cfg
|
||||
- $(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/template-object/timeperiods.cfg $(DESTDIR)$(CFGDIR)/objects/timeperiods.cfg
|
||||
- $(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/template-object/localhost.cfg $(DESTDIR)$(CFGDIR)/objects/localhost.cfg
|
||||
- $(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/template-object/windows.cfg $(DESTDIR)$(CFGDIR)/objects/windows.cfg
|
||||
- $(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/template-object/printer.cfg $(DESTDIR)$(CFGDIR)/objects/printer.cfg
|
||||
- $(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/template-object/switch.cfg $(DESTDIR)$(CFGDIR)/objects/switch.cfg
|
||||
+ $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)
|
||||
+ $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)/objects
|
||||
+ $(INSTALL) -b -m 644 $(INSTALL_OPTS) sample-config/icinga.cfg $(DESTDIR)$(CFGDIR)/icinga.cfg-sample
|
||||
+ $(INSTALL) -b -m 640 $(INSTALL_OPTS) sample-config/resource.cfg $(DESTDIR)$(CFGDIR)/resource.cfg-sample
|
||||
+ $(INSTALL) -b -m 644 $(INSTALL_OPTS) sample-config/cgi.cfg $(DESTDIR)$(CFGDIR)/cgi.cfg-sample
|
||||
+ $(INSTALL) -b -m 644 $(INSTALL_OPTS) sample-config/cgiauth.cfg $(DESTDIR)$(CFGDIR)/cgiauth.cfg-sample
|
||||
+ $(INSTALL) -b -m 644 $(INSTALL_OPTS) sample-config/template-object/templates.cfg $(DESTDIR)$(CFGDIR)/objects/templates.cfg-sample
|
||||
+ $(INSTALL) -b -m 644 $(INSTALL_OPTS) sample-config/template-object/commands.cfg $(DESTDIR)$(CFGDIR)/objects/commands.cfg-sample
|
||||
+ $(INSTALL) -b -m 644 $(INSTALL_OPTS) sample-config/template-object/contacts.cfg $(DESTDIR)$(CFGDIR)/objects/contacts.cfg-sample
|
||||
+ $(INSTALL) -b -m 644 $(INSTALL_OPTS) sample-config/template-object/timeperiods.cfg $(DESTDIR)$(CFGDIR)/objects/timeperiods.cfg-sample
|
||||
+ $(INSTALL) -b -m 644 $(INSTALL_OPTS) sample-config/template-object/localhost.cfg $(DESTDIR)$(CFGDIR)/objects/localhost.cfg-sample
|
||||
+ $(INSTALL) -b -m 644 $(INSTALL_OPTS) sample-config/template-object/windows.cfg $(DESTDIR)$(CFGDIR)/objects/windows.cfg-sample
|
||||
+ $(INSTALL) -b -m 644 $(INSTALL_OPTS) sample-config/template-object/printer.cfg $(DESTDIR)$(CFGDIR)/objects/printer.cfg-sample
|
||||
+ $(INSTALL) -b -m 644 $(INSTALL_OPTS) sample-config/template-object/switch.cfg $(DESTDIR)$(CFGDIR)/objects/switch.cfg-sample
|
||||
|
||||
@echo ""
|
||||
@echo "*** Config files installed ***"
|
||||
@@ -486,7 +486,6 @@
|
||||
|
||||
install-commandmode:
|
||||
$(INSTALL) -m 775 $(COMMAND_OPTS) -d $(DESTDIR)$(LOGDIR)/rw
|
||||
- chmod g+s $(DESTDIR)$(LOGDIR)/rw
|
||||
|
||||
@echo ""
|
||||
@echo "*** External command directory configured ***"
|
15
net-mgmt/icinga/files/patch-base-Makefile.in
Normal file
15
net-mgmt/icinga/files/patch-base-Makefile.in
Normal file
@ -0,0 +1,15 @@
|
||||
--- base/Makefile.in~ 2010-10-23 01:22:32.000000000 +0800
|
||||
+++ base/Makefile.in 2011-02-16 13:42:58.000000000 +0800
|
||||
@@ -205,9 +205,9 @@
|
||||
$(MAKE) install-basic
|
||||
|
||||
install-basic:
|
||||
- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(BINDIR)
|
||||
- $(INSTALL) -m 774 $(INSTALL_OPTS) @icinga_name@ $(DESTDIR)$(BINDIR)
|
||||
- $(INSTALL) -m 774 $(INSTALL_OPTS) @icingastats_name@ $(DESTDIR)$(BINDIR)
|
||||
+ $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(BINDIR)
|
||||
+ $(INSTALL) -m 755 $(INSTALL_OPTS) @icinga_name@ $(DESTDIR)$(BINDIR)
|
||||
+ $(INSTALL) -m 755 $(INSTALL_OPTS) @icingastats_name@ $(DESTDIR)$(BINDIR)
|
||||
|
||||
strip-post-install:
|
||||
$(STRIP) $(DESTDIR)$(BINDIR)/@icinga_name@
|
14
net-mgmt/icinga/files/patch-cgi-Makefile.in
Normal file
14
net-mgmt/icinga/files/patch-cgi-Makefile.in
Normal file
@ -0,0 +1,14 @@
|
||||
--- cgi/Makefile.in.orig Wed Dec 13 02:57:57 2006
|
||||
+++ cgi/Makefile.in Fri Jul 20 13:35:18 2007
|
||||
@@ -190,9 +190,9 @@
|
||||
$(MAKE) install-basic
|
||||
|
||||
install-basic:
|
||||
- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CGIDIR)
|
||||
+ $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(CGIDIR)
|
||||
for file in *.cgi; do \
|
||||
- $(INSTALL) -m 775 $(INSTALL_OPTS) $$file $(DESTDIR)$(CGIDIR); \
|
||||
+ $(INSTALL) -m 755 $(INSTALL_OPTS) $$file $(DESTDIR)$(CGIDIR); \
|
||||
done
|
||||
|
||||
strip-post-install:
|
53
net-mgmt/icinga/files/patch-configure.in
Normal file
53
net-mgmt/icinga/files/patch-configure.in
Normal file
@ -0,0 +1,53 @@
|
||||
--- configure.in~ 2010-10-23 01:22:32.000000000 +0800
|
||||
+++ configure.in 2011-02-16 14:10:52.000000000 +0800
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
AC_INIT(base/icinga.c)
|
||||
AC_CONFIG_HEADER(include/config.h include/snprintf.h)
|
||||
-AC_PREFIX_DEFAULT(/usr/local/icinga)
|
||||
|
||||
PKG_NAME=icinga-core
|
||||
PKG_VERSION="1.2.1"
|
||||
@@ -136,7 +135,15 @@
|
||||
dnl Test for pthreads support - taken from ICU FreeBSD Port configure script
|
||||
THREADLIBS=""
|
||||
have_pthreads="no"
|
||||
+have_thr="no"
|
||||
|
||||
+dnl Prefer libthr(3) over libpthread(3) due to serious process hanging issues
|
||||
+AC_CHECK_LIB(thr,pthread_create)
|
||||
+if test $ac_cv_lib_thr_pthread_create = yes; then
|
||||
+ THREADLIBS="-lthr"
|
||||
+ have_pthreads="yes"
|
||||
+ have_thr="yes"
|
||||
+else
|
||||
dnl FreeBSD: Try ports/linuxthreads first - Mammad Zadeh <mammad@yahoo-inc.com>
|
||||
dnl FreeBSD -pthread check - Jonathan McDowell <noodles@earth.li>
|
||||
AC_DEFUN([AC_PTHREAD_FREEBSD],[
|
||||
@@ -197,6 +204,7 @@
|
||||
if test $have_pthreads = "no"; then
|
||||
AC_PTHREAD_FREEBSD
|
||||
fi
|
||||
+fi
|
||||
|
||||
AC_SUBST(THREADLIBS)
|
||||
|
||||
@@ -215,7 +223,7 @@
|
||||
AC_DEFINE_UNQUOTED(DEFAULT_NAGIOS_USER,"$icinga_user",[user name to run nagios])
|
||||
AC_DEFINE_UNQUOTED(DEFAULT_ICINGA_GROUP,"$icinga_grp",[group name to run nagios])
|
||||
AC_DEFINE_UNQUOTED(DEFAULT_NAGIOS_GROUP,"$icinga_grp",[group name to run nagios])
|
||||
-INSTALL_OPTS="-o $icinga_user -g $icinga_grp"
|
||||
+INSTALL_OPTS="-o root -g wheel"
|
||||
AC_SUBST(INSTALL_OPTS)
|
||||
|
||||
AC_ARG_WITH(command_user,AC_HELP_STRING([--with-command-user=<user>],[sets user name for command access]),command_user=$withval,command_user=$icinga_user)
|
||||
@@ -827,6 +835,9 @@
|
||||
|
||||
AC_DEFINE_UNQUOTED(EMBEDDEDPERL,,[Is embedded Perl being compiled in?])
|
||||
PERLLIBS="`perl -MExtUtils::Embed -e ldopts`"
|
||||
+ if test x$have_thr = xyes; then
|
||||
+ PERLLIBS="`echo $PERLLIBS | sed 's#pthread #lthr #'`"
|
||||
+ fi
|
||||
PERLDIR="`perl -MConfig -e 'print $Config{installsitearch}'`"
|
||||
CFLAGS="${CFLAGS} `perl -MExtUtils::Embed -e ccopts`"
|
||||
USEPERL=yes
|
17
net-mgmt/icinga/files/patch-contrib-Makefile.in
Normal file
17
net-mgmt/icinga/files/patch-contrib-Makefile.in
Normal file
@ -0,0 +1,17 @@
|
||||
--- contrib/Makefile.in.orig Tue Nov 15 12:19:36 2005
|
||||
+++ contrib/Makefile.in Wed Dec 28 17:49:25 2005
|
||||
@@ -46,10 +46,10 @@
|
||||
devclean: distclean
|
||||
|
||||
install:
|
||||
- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CGIDIR)
|
||||
- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(BINDIR)
|
||||
- for f in $(CGIS); do $(INSTALL) -m 775 $(INSTALL_OPTS) $$f $(DESTDIR)$(CGIDIR); done
|
||||
- for f in $(UTILS); do $(INSTALL) -m 775 $(INSTALL_OPTS) $$f $(DESTDIR)$(BINDIR); done
|
||||
+ $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(CGIDIR)
|
||||
+ $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(BINDIR)
|
||||
+ for f in $(CGIS); do $(INSTALL) -m 755 $(INSTALL_OPTS) $$f $(DESTDIR)$(CGIDIR); done
|
||||
+ for f in $(UTILS); do $(INSTALL) -m 755 $(INSTALL_OPTS) $$f $(DESTDIR)$(BINDIR); done
|
||||
|
||||
##############################################################################
|
||||
# rules and dependencies for actual target programs
|
11
net-mgmt/icinga/files/patch-include-locations.h.in
Normal file
11
net-mgmt/icinga/files/patch-include-locations.h.in
Normal file
@ -0,0 +1,11 @@
|
||||
--- include/locations.h.in.orig Tue May 1 08:15:57 2007
|
||||
+++ include/locations.h.in Fri Jul 20 15:52:49 2007
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#define DEFAULT_TEMP_FILE "@localstatedir@/tempfile"
|
||||
#define DEFAULT_TEMP_PATH "/tmp"
|
||||
-#define DEFAULT_CHECK_RESULT_PATH "@localstatedir@/spool/checkresults"
|
||||
+#define DEFAULT_CHECK_RESULT_PATH "@localstatedir@/checkresults"
|
||||
#define DEFAULT_STATUS_FILE "@localstatedir@/status.dat"
|
||||
#define DEFAULT_LOG_FILE "@localstatedir@/nagios.log"
|
||||
#define DEFAULT_LOG_ARCHIVE_PATH "@localstatedir@/archives/"
|
@ -0,0 +1,40 @@
|
||||
--- sample-config/template-object/localhost.cfg.in.orig Sun Jun 10 02:13:05 2007
|
||||
+++ sample-config/template-object/localhost.cfg.in Fri Jul 20 13:46:46 2007
|
||||
@@ -5,7 +5,7 @@
|
||||
#
|
||||
# NOTE: This config file is intended to serve as an *extremely* simple
|
||||
# example of how you can create configuration entries to monitor
|
||||
-# the local (Linux) machine.
|
||||
+# the local (FreeBSD) machine.
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
# Define a host for the local machine
|
||||
|
||||
define host{
|
||||
- use linux-server ; Name of host template to use
|
||||
+ use freebsd-server ; Name of host template to use
|
||||
; This host definition will inherit all variables that are defined
|
||||
- ; in (or inherited by) the linux-server host template definition.
|
||||
+ ; in (or inherited by) the freebsd-server host template definition.
|
||||
host_name localhost
|
||||
alias localhost
|
||||
address 127.0.0.1
|
||||
@@ -41,12 +41,12 @@
|
||||
###############################################################################
|
||||
###############################################################################
|
||||
|
||||
-# Define an optional hostgroup for Linux machines
|
||||
+# Define an optional hostgroup for FreeBSD machines
|
||||
|
||||
define hostgroup{
|
||||
- hostgroup_name linux-servers ; The name of the hostgroup
|
||||
- alias Linux Servers ; Long name of the group
|
||||
- members localhost ; Comma separated list of hosts that belong to this group
|
||||
+ hostgroup_name freebsd-servers ; The name of the hostgroup
|
||||
+ alias FreeBSD Servers ; Long name of the group
|
||||
+ members localhost ; Comma separated list of hosts that belong to this group
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,26 @@
|
||||
--- sample-config/template-object/templates.cfg.in.orig Fri Jul 20 13:46:57 2007
|
||||
+++ sample-config/template-object/templates.cfg.in Fri Jul 20 13:47:52 2007
|
||||
@@ -63,17 +63,17 @@
|
||||
}
|
||||
|
||||
|
||||
-# Linux host definition template - This is NOT a real host, just a template!
|
||||
+# FreeBSD host definition template - This is NOT a real host, just a template!
|
||||
|
||||
define host{
|
||||
- name linux-server ; The name of this host template
|
||||
+ name freebsd-server ; The name of this host template
|
||||
use generic-host ; This template inherits other values from the generic-host template
|
||||
- check_period 24x7 ; By default, Linux hosts are checked round the clock
|
||||
+ check_period 24x7 ; By default, FreeBSD hosts are checked round the clock
|
||||
check_interval 5 ; Actively check the host every 5 minutes
|
||||
retry_interval 1 ; Schedule host check retries at 1 minute intervals
|
||||
- max_check_attempts 10 ; Check each Linux host 10 times (max)
|
||||
- check_command check-host-alive ; Default command to check Linux hosts
|
||||
- notification_period workhours ; Linux admins hate to be woken up, so we only notify during the day
|
||||
+ max_check_attempts 10 ; Check each FreeBSD host 10 times (max)
|
||||
+ check_command check-host-alive ; Default command to check FreeBSD hosts
|
||||
+ notification_period workhours ; FreeBSD admins hate to be woken up, so we only notify during the day
|
||||
; Note that the notification_period variable is being overridden from
|
||||
; the value that is inherited from the generic-host template!
|
||||
notification_interval 120 ; Resend notifications every 2 hours
|
22
net-mgmt/icinga/files/pkg-deinstall.in
Normal file
22
net-mgmt/icinga/files/pkg-deinstall.in
Normal file
@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
ICINGADIR=%%ICINGADIR%%
|
||||
ICINGAUSER=%%ICINGAUSER%%
|
||||
ICINGAGROUP=%%ICINGAGROUP%%
|
||||
|
||||
if [ "$2" = "POST-DEINSTALL" ]; then
|
||||
if /usr/sbin/pw group show "${ICINGAGROUP}" 2>&1 >/dev/null; then
|
||||
echo "You should manually remove the \"${ICINGAGROUP}\" group."
|
||||
fi
|
||||
|
||||
if /usr/sbin/pw user show "${ICINGAUSER}" 2>&1 >/dev/null; then
|
||||
echo "You should manually remove the \"${ICINGAUSER}\" user."
|
||||
fi
|
||||
|
||||
if [ -e "${ICINGADIR}" ]; then
|
||||
echo "You should manually remove the \"${ICINGADIR}\" directory."
|
||||
fi
|
||||
fi
|
74
net-mgmt/icinga/files/pkg-install.in
Normal file
74
net-mgmt/icinga/files/pkg-install.in
Normal file
@ -0,0 +1,74 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
ICINGADIR=%%ICINGADIR%%
|
||||
ICINGAUSER=%%ICINGAUSER%%
|
||||
ICINGAGROUP=%%ICINGAGROUP%%
|
||||
ICINGAUID=%%ICINGAUID%%
|
||||
ICINGAGID=%%ICINGAGID%%
|
||||
|
||||
ask() {
|
||||
local question default answer
|
||||
|
||||
question=$1
|
||||
default=$2
|
||||
if [ -z "${PACKAGE_BUILDING}" ]; then
|
||||
read -p "${question} [${default}]? " answer
|
||||
fi
|
||||
if [ "x${answer}" = "x" ]; then
|
||||
answer=${default}
|
||||
fi
|
||||
echo ${answer}
|
||||
}
|
||||
|
||||
yesno() {
|
||||
local default question answer
|
||||
|
||||
question=$1
|
||||
default=$2
|
||||
while :; do
|
||||
answer=$(ask "${question}" "${default}")
|
||||
case "${answer}" in
|
||||
[Yy][Ee][Ss]|[Yy])
|
||||
return 0
|
||||
;;
|
||||
[Nn][Oo]|[Nn])
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
echo "Please answer yes or no."
|
||||
done
|
||||
}
|
||||
|
||||
if [ "$2" = "PRE-INSTALL" ]; then
|
||||
if /usr/sbin/pw group show "${ICINGAGROUP}" 2>&1 >/dev/null; then
|
||||
echo "You already have a \"${ICINGAGROUP}\" group, so I will use it."
|
||||
else
|
||||
echo "You need a \"${ICINGAGROUP}\" group."
|
||||
if yesno "Would you like me to create it" "YES"; then
|
||||
/usr/sbin/pw groupadd "${ICINGAGROUP}" -g "${ICINGAGID}" -h - || \
|
||||
/usr/sbin/pw groupadd "${ICINGAGROUP}" -h - || exit
|
||||
echo "Done."
|
||||
else
|
||||
echo "Please create the \"${ICINGAGROUP}\" group manually and try again."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if /usr/sbin/pw user show "${ICINGAUSER}" 2>&1 >/dev/null; then
|
||||
echo "You already have a \"${ICINGAUSER}\" user, so I will use it."
|
||||
else
|
||||
echo "You need a \"${ICINGAUSER}\" user."
|
||||
if yesno "Would you like me to create it" "YES"; then
|
||||
/usr/sbin/pw useradd "${ICINGAUSER}" -u "${ICINGAUID}" -g "${ICINGAGROUP}" -h - -d "${ICINGADIR}" \
|
||||
-s /sbin/nologin -c "Icinga pseudo-user" || \
|
||||
/usr/sbin/pw useradd "${ICINGAUSER}" -g "${ICINGAGROUP}" -h - -d "${ICINGADIR}" \
|
||||
-s /sbin/nologin -c "Icinga pseudo-user" || exit
|
||||
else
|
||||
echo "Please create the \"${ICINGAUSER}\" user manually and try again."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
32
net-mgmt/icinga/files/pkg-message.in
Normal file
32
net-mgmt/icinga/files/pkg-message.in
Normal file
@ -0,0 +1,32 @@
|
||||
**********************************************************************
|
||||
|
||||
Enable Icinga in /etc/rc.conf with the following line:
|
||||
|
||||
icinga_enable="YES"
|
||||
|
||||
Configuration templates are available in %%PREFIX%%/etc/icinga as
|
||||
*.cfg-sample files. Copy them to *.cfg files where required and
|
||||
edit to suit your needs. Documentation is available in HTML form
|
||||
in %%PREFIX%%/%%ICINGAWWWDIR%%/docs.
|
||||
|
||||
If you don't already have a web server running, you will need to
|
||||
install and configure one to finish off your Icinga installation.
|
||||
When used with Apache, the following should be sufficient to publish
|
||||
the web component of Icinga (modify the allow list to suit):
|
||||
|
||||
<Directory %%PREFIX%%/%%ICINGAWWWDIR%%>
|
||||
Order deny,allow
|
||||
Deny from all
|
||||
Allow from 127.0.0.1
|
||||
php_flag engine on
|
||||
php_admin_value open_basedir %%PREFIX%%/%%ICINGAWWWDIR%%/:%%ICINGADIR%%/
|
||||
</Directory>
|
||||
|
||||
<Directory %%PREFIX%%/%%ICINGAWWWDIR%%/cgi-bin>
|
||||
Options ExecCGI
|
||||
</Directory>
|
||||
|
||||
ScriptAlias %%ICINGACGIURL%%/ %%PREFIX%%/%%ICINGAWWWDIR%%/cgi-bin/
|
||||
Alias %%ICINGAHTMURL%%/ %%PREFIX%%/%%ICINGAWWWDIR%%/
|
||||
|
||||
**********************************************************************
|
8
net-mgmt/icinga/pkg-descr
Normal file
8
net-mgmt/icinga/pkg-descr
Normal file
@ -0,0 +1,8 @@
|
||||
Icinga is an enterprise grade open source monitoring system which keeps watch
|
||||
over networks and any conceivable network resource, notifies the user of
|
||||
errors and recoveries and generates performance data for reporting. Scalable
|
||||
and extensible, Icinga can monitor complex, large environments across
|
||||
dispersed locations.
|
||||
Icinga takes open source monitoring to the next level.
|
||||
|
||||
WWW: http://www.icinga.org/
|
1204
net-mgmt/icinga/pkg-plist
Normal file
1204
net-mgmt/icinga/pkg-plist
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user