diff options
author | Benedikt Boehm <hollow@gentoo.org> | 2008-03-28 18:38:07 +0000 |
---|---|---|
committer | Benedikt Boehm <hollow@gentoo.org> | 2008-03-28 18:38:07 +0000 |
commit | 870aa3f88debfbd27d33b07aef96bc8b6c950370 (patch) | |
tree | 4591e6a494488ef497aa59404dca791d36f6171d /net-analyzer | |
parent | Version bump. Thanks Dieter Ries for the update (closing bug #215192). Remove... (diff) | |
download | historical-870aa3f88debfbd27d33b07aef96bc8b6c950370.tar.gz historical-870aa3f88debfbd27d33b07aef96bc8b6c950370.tar.bz2 historical-870aa3f88debfbd27d33b07aef96bc8b6c950370.zip |
initial ebuild
Package-Manager: portage-2.1.4.4
Diffstat (limited to 'net-analyzer')
-rw-r--r-- | net-analyzer/centreon/ChangeLog | 11 | ||||
-rw-r--r-- | net-analyzer/centreon/Manifest | 19 | ||||
-rw-r--r-- | net-analyzer/centreon/centreon-1.4.2.4.ebuild | 290 | ||||
-rw-r--r-- | net-analyzer/centreon/files/99_centreon.conf | 10 | ||||
-rw-r--r-- | net-analyzer/centreon/files/centreon.cron | 7 | ||||
-rw-r--r-- | net-analyzer/centreon/files/installoreon.conf.php | 33 | ||||
-rwxr-xr-x | net-analyzer/centreon/files/ods.initd | 24 | ||||
-rw-r--r-- | net-analyzer/centreon/metadata.xml | 9 |
8 files changed, 403 insertions, 0 deletions
diff --git a/net-analyzer/centreon/ChangeLog b/net-analyzer/centreon/ChangeLog new file mode 100644 index 000000000000..7e2e569b616d --- /dev/null +++ b/net-analyzer/centreon/ChangeLog @@ -0,0 +1,11 @@ +# ChangeLog for net-analyzer/centreon +# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/centreon/ChangeLog,v 1.1 2008/03/28 18:38:06 hollow Exp $ + +*centreon-1.4.2.4 (28 Mar 2008) + + 28 Mar 2008; Benedikt Böhm <hollow@gentoo.org> +files/99_centreon.conf, + +files/centreon.cron, +files/installoreon.conf.php, +files/ods.initd, + +metadata.xml, +centreon-1.4.2.4.ebuild: + initial ebuild + diff --git a/net-analyzer/centreon/Manifest b/net-analyzer/centreon/Manifest new file mode 100644 index 000000000000..494afe690cb1 --- /dev/null +++ b/net-analyzer/centreon/Manifest @@ -0,0 +1,19 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +AUX 99_centreon.conf 257 RMD160 0ee38f9c1bba533c2f547aed016302b928ac8d23 SHA1 d9555c2062b69bada7876ed07679d8973c796ad5 SHA256 4f6c817c3217ec98075bf254c6e92fb98d7e54ef312f999198b8dc3aacd7de58 +AUX centreon.cron 468 RMD160 67f637acac8582852a1ba4e9b5c865970ca9d787 SHA1 38ca62f63e71059a803377de1989515fa6a57eb4 SHA256 6130334337dc2f7a7a3e2eb14f88376add45867e0406a681b9aa4e1b61194525 +AUX installoreon.conf.php 1561 RMD160 fdb73ab561c40335d481dec547c104d48224ac4e SHA1 7a56a8fd220afc2283f752615fa33a587d40341d SHA256 ecc8609624d3cc98f7bd40dd6024a3da76a9fe23a85424c6f3d78e92245a4044 +AUX ods.initd 571 RMD160 b961865bc3530fc0e67b2179e8c4e651564dcea8 SHA1 afa32f103768680bb9d7d37178e376f4ed75179c SHA256 ce73be667b547e5ba3fe345b3962640daca8569a29d4c21920c44a37e7755021 +DIST centreon-1.4.2.4-path_sanity.patch.bz2 8548 RMD160 bcc2f815d6c89e2158ef63738d379c069be824c8 SHA1 f5703ed372312a59684b756b07ff70bc02ec53f9 SHA256 e8f947b87def3f0c15440deb95a1808fa7819b5b193ad8a655cb8d771f4c8cd4 +DIST centreon-1.4.2.4.tar.gz 3801410 RMD160 c59c84b1f9024e60dbbafd8e680091d8f60f9e74 SHA1 c2574c3d2bb2c7c2531b0fbd5ff6b81481a3deab SHA256 a14b27df0b247997996413087da81f71c3b90a6c094ea14b53574a5acd644371 +EBUILD centreon-1.4.2.4.ebuild 7135 RMD160 69a49ddc4d5032e3e693d8c9aa0303bbacbbdc48 SHA1 5b0601741a9265c37ee09dadf704dce91b2488c2 SHA256 261c9790ebe68994a059739457ebb99e56eedf12b63930d69045723e26f9d23a +MISC ChangeLog 456 RMD160 dc1a13f79178c750f1931e9d0752ab20afd8c5a3 SHA1 d42a3c5cc019fd4e32de978b5ba736bc93befd44 SHA256 40339243b404fa12373951dbb25f438bef0e4d6303d43125d6b902be5ffa25cc +MISC metadata.xml 227 RMD160 b30c04f516f29ca17e9f5433bb990138285b6421 SHA1 d35966dc0c8fa3674b54519077680ac46bd6bd66 SHA256 445d8d1b65aa576b74df642f3e3ec9116183d76d8997511d817f0c9e1b977b5d +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.7 (GNU/Linux) + +iD8DBQFH7TsZmPFBzbX68WERAjAIAJ9oLCFfF4Z5hqJe0oHyVL2FnIp2pwCgjt/M +9Fa/zdq+nTr/wJREUi8JzPM= +=WBiV +-----END PGP SIGNATURE----- diff --git a/net-analyzer/centreon/centreon-1.4.2.4.ebuild b/net-analyzer/centreon/centreon-1.4.2.4.ebuild new file mode 100644 index 000000000000..8052117e73cb --- /dev/null +++ b/net-analyzer/centreon/centreon-1.4.2.4.ebuild @@ -0,0 +1,290 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/centreon/centreon-1.4.2.4.ebuild,v 1.1 2008/03/28 18:38:06 hollow Exp $ + +inherit depend.apache depend.php confutils + +DESCRIPTION="Centreon is a monitoring web-frontend based on the nagios monitoring engine" +HOMEPAGE="http://www.oreon-project.org" +SRC_URI="http://download.oreon-project.org/${PN}/${P}.tar.gz + mirror://gentoo/${P}-path_sanity.patch.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="ldap" + +DEPEND="" +RDEPEND=">=net-analyzer/nagios-2.10 + net-analyzer/rrdtool + net-analyzer/net-snmp + net-analyzer/snmptt + app-admin/sudo + dev-php/PEAR-PEAR + dev-php/smarty + >=dev-php/PEAR-Auth_SASL-1.0.1 + >=dev-php/PEAR-DB-1.7.6 + >=dev-php/PEAR-DB_DataObject-1.8.4 + >=dev-php/PEAR-DB_DataObject_FormBuilder-1.0.0_rc4 + >=dev-php/PEAR-Date-1.4.6 + >=dev-php/PEAR-HTML_Common-1.2.2 + >=dev-php/PEAR-HTML_QuickForm-3.2.5 + >=dev-php/PEAR-HTML_QuickForm_advmultiselect-1.1.0 + >=dev-php/PEAR-HTML_Table-1.6.1 + >=dev-php/PEAR-HTTP-1.2.2 + >=dev-php/PEAR-Image_Canvas-0.2.4 + >=dev-php/PEAR-Image_Color-1.0.2 + >=dev-php/PEAR-Image_Graph-0.7.1 + >=dev-php/PEAR-Image_GraphViz-1.1.0 + >=dev-php/PEAR-MDB2-2.0.0 + >=dev-php/PEAR-Mail-1.1.9 + >=dev-php/PEAR-Mail_Mime-1.3.1 + >=dev-php/PEAR-Net_Ping-2.4.1 + >=dev-php/PEAR-Net_SMTP-1.2.8 + >=dev-php/PEAR-Net_Socket-1.0.1 + >=dev-php/PEAR-Net_Traceroute-0.21 + >=dev-php/PEAR-Numbers_Roman-1.0.1 + >=dev-php/PEAR-Numbers_Words-0.14.0 + >=dev-php/PEAR-SOAP-0.10.1 + >=dev-php/PEAR-Validate-0.6.2 + dev-perl/Config-IniFiles + dev-perl/Crypt-DES + dev-perl/DBI + dev-perl/Digest-HMAC + dev-perl/Digest-SHA1 + dev-perl/GD + dev-perl/IO-Socket-INET6 + dev-perl/Net-SNMP + dev-perl/Socket6" + +need_apache2 +need_php5 + +setup_vars() { + INSTALL_DIR_OREON="/usr/share/centreon" + OREON_PATH=${INSTALL_DIR_OREON} + + INSTALL_DIR_NAGIOS="/usr/nagios" + NAGIOS_ETC="/etc/nagios" + NAGIOS_VAR="/var/nagios" + NAGIOS_BIN="${INSTALL_DIR_NAGIOS}/bin" + NAGIOS_PLUGINS="${INSTALL_DIR_NAGIOS}/libexec" + NAGIOS_IMG="${INSTALL_DIR_NAGIOS}/share/images" + NAGIOS_USER="nagios" + NAGIOS_GROUP="nagios" + + BIN_RRDTOOL="/usr/bin/rrdtool" + BIN_MAIL="/bin/mail" +} + +pkg_setup() { + #confutils_require_built_with_all sys-devel/libperl ithreads + #confutils_require_built_with_all dev-lang/perl ithreads + #confutils_require_built_with_all net-analyzer/net-snmp perl + #confutils_require_built_with_all net-analyzer/rrdtool perl + + #require_php_sapi_from apache2 cli + #require_php_with_any_use gd gd-external + #require_php_with_use mysql posix snmp truetype + + use ldap && require_php_with_use ldap + + setup_vars +} + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${WORKDIR}"/${P}-path_sanity.patch +} + +varsubst() { + local path=$1 + + for var in "$@"; do + sed -i -e "s:@${var}@:$(eval echo \$${var}):g" "${D}${path}" + done +} + +install_centreon() { + cd "${S}" + + # copy www and doc files + insinto "${OREON_PATH}" + doins -r www + dosym /usr/nagios/share/doc "${OREON_PATH}"/doc + + # sanitize file modes + find "${D}${OREON_PATH}" -type d -exec chmod 755 {} \; + find "${D}${OREON_PATH}" -type f -exec chmod 644 {} \; + + # keep important directories + keepdir "${OREON_PATH}"/www/modules + keepdir /var/log/centreon + keepdir /var/cache/centreon/rrd + keepdir /var/cache/centreon/smarty/{cache,config,compile} + keepdir /var/cache/centreon/generate/{nagiosCFG,osm} + keepdir /var/cache/centreon/upload/nagiosCFG + + # prepare SQL files + varsubst "${OREON_PATH}"/www/install/insertBaseConf.sql \ + NAGIOS_{USER,GROUP,ETC,BIN,VAR,PLUGINS,IMG} \ + INSTALL_DIR_NAGIOS INSTALL_DIR_OREON \ + BIN_RRDTOOL BIN_MAIL + + varsubst "${OREON_PATH}"/www/install/createTablesODS.sql \ + NAGIOS_VAR + + # fix paths in php files + varsubst "${OREON_PATH}"/www/include/configuration/configCGI/formCGI.php \ + NAGIOS_ETC INSTALL_DIR_NAGIOS + + varsubst "${OREON_PATH}"/www/include/options/oreon/upGrade/preUpdate.php \ + OREON_PATH + + # install apache config + insinto "${APACHE_MODULES_CONFDIR}" + doins "${FILESDIR}"/99_centreon.conf + + # install global installation config + insinto "${OREON_PATH}"/www/install + doins "${FILESDIR}"/installoreon.conf.php + + # set permissions + fowners -R apache:apache \ + /var/cache/centreon \ + "${OREON_PATH}"/www + + fowners -R nagios:apache \ + /var/log/centreon +} + +install_plugins() { + cd "${S}" + + # install plugin configuration + insinto /etc/centreon + doins ./Plugins/src/centreon.conf + rm -f ./Plugins/src/centreon.conf + + varsubst /etc/centreon/centreon.conf \ + INSTALL_DIR_NAGIOS INSTALL_DIR_OREON \ + NAGIOS_ETC NAGIOS_PLUGINS + + fowners -R apache:apache \ + /etc/centreon + + # install nagios plugins + execinto "${NAGIOS_PLUGINS}" + + for plugin in ./Plugins/src/*; do + if [[ ! -d "${plugin}" ]]; then + doexe "${plugin}" + varsubst "${NAGIOS_PLUGINS}/$(basename "${plugin}")" \ + NAGIOS_PLUGINS NAGIOS_VAR + fi + done +} + +install_traps() { + cd "${S}" + + # install snmp traps plugins + dodir "${NAGIOS_PLUGINS}"/traps + dodir /etc/snmp/centreon + + exeinto "${NAGIOS_PLUGINS}"/traps/ + doexe Plugins/src/traps/plugins/* + + # install snmp configs + insinto /etc/snmp/centreon + doins Plugins/src/traps/conf/snmptt.ini + fowners -R apache:nagios /etc/snmp/centreon + + insinto /etc/snmp/ + doins Plugins/src/traps/conf/snmp.conf +} + +install_ods() { + cd "${S}" + + # install ODS daemon + insinto /usr + dosbin ODS/ods + + # install ODS library files + insinto /usr/lib/ods + doins ODS/lib/* + + # install ODS init script + newinitd "${FILESDIR}"/ods.initd ods + + # keep important directories + keepdir /etc/ods + keepdir /var/run/ods + keepdir /var/log/ods + keepdir /var/lib/ods + keepdir /var/lib/ods/database + + # set permissions + fowners -R nagios:nagios \ + /var/run/ods \ + /var/log/ods \ + /var/lib/ods/database + fowners -R apache:nagios /etc/ods +} + +install_cron() { + cd "${S}" + + insinto "${OREON_PATH}" + doins -r cron + + fperms +x "${OREON_PATH}"/cron/*.{pl,php} + + for i in $(find cron/ -type f); do + varsubst "${OREON_PATH}"/${i} OREON_PATH + done + + insinto /etc/cron.d + newins "${FILESDIR}"/centreon.cron centreon +} + +src_install() { + install_centreon + install_plugins + install_traps + install_ods + install_cron +} + +pkg_config() { + setup_vars + + einfo "Setting permissions on ${ROOT}${NAGIOS_ETC}" + chown apache:nagios "${ROOT}${NAGIOS_ETC}" + chmod 0775 "${ROOT}${NAGIOS_ETC}" + + einfo "Setting permissions on ${ROOT}${NAGIOS_PLUGINS}" + chown apache:nagios "${ROOT}${NAGIOS_PLUGINS}" + chmod 0775 "${ROOT}${NAGIOS_PLUGINS}" + + einfo "Setting permissions on ${ROOT}${NAGIOS_PLUGINS}/contrib" + chown apache:nagios "${ROOT}${NAGIOS_PLUGINS}"/contrib + chmod 0775 "${ROOT}${NAGIOS_PLUGINS}"/contrib + + einfo "Adding user apache to group nagios" + usermod -a -G nagios apache + + SUDOERS="${ROOT}etc/sudoers" + + if ! grep -q CENTREON "${SUDOERS}"; then + einfo "Adding sudo configuration" + echo >> "${SUDOERS}" + echo "# centreon configuration" >> "${SUDOERS}" + echo "User_Alias CENTREON=apache" >> "${SUDOERS}" + echo "CENTREON ALL = NOPASSWD: /etc/init.d/nagios restart" >> "${SUDOERS}" + echo "CENTREON ALL = NOPASSWD: /etc/init.d/nagios reload" >> "${SUDOERS}" + echo "CENTREON ALL = NOPASSWD: /etc/init.d/snmptrapd restart" >> "${SUDOERS}" + fi +} diff --git a/net-analyzer/centreon/files/99_centreon.conf b/net-analyzer/centreon/files/99_centreon.conf new file mode 100644 index 000000000000..1fae171aac21 --- /dev/null +++ b/net-analyzer/centreon/files/99_centreon.conf @@ -0,0 +1,10 @@ +<IfDefine CENTREON> + AddType application/x-java-jnlp-file .jnlp + Alias /centreon/ /usr/share/centreon/www/ + <Directory /usr/share/centreon/www/> + Options None + AllowOverride AuthConfig Options + Order allow,deny + Allow from all + </Directory> +</IfDefine> diff --git a/net-analyzer/centreon/files/centreon.cron b/net-analyzer/centreon/files/centreon.cron new file mode 100644 index 000000000000..100a71f8e3fa --- /dev/null +++ b/net-analyzer/centreon/files/centreon.cron @@ -0,0 +1,7 @@ +OREON_DIR=/usr/share/centreon +LOG_DIR=/var/log/centreon + +0 0 * * * nagios /usr/bin/php -q ${OREON_DIR}/cron/inventory_update.php 2>&1 >> ${LOG_DIR}/Inventory_log +0 1 1-31 * * nagios /usr/bin/php -q ${OREON_DIR}/cron/reporting/ArchiveLogInDB.php 2>&1 >> ${LOG_DIR}/ArchiveLogInDB_log +* * * * * nagios ${OREON_DIR}/cron/parsing_status.pl 2>&1 >> ${LOG_DIR}/ods_parsing_status +* * * * * nagios ${OREON_DIR}/cron/parsing_log.pl 2>&1 >> ${LOG_DIR}/ods_parsing_log diff --git a/net-analyzer/centreon/files/installoreon.conf.php b/net-analyzer/centreon/files/installoreon.conf.php new file mode 100644 index 000000000000..de10d40569cd --- /dev/null +++ b/net-analyzer/centreon/files/installoreon.conf.php @@ -0,0 +1,33 @@ +<? +$conf_installoreon['oreon_dir'] = "/usr/share/centreon/"; +$conf_installoreon['oreon_dir_www'] = "/usr/share/centreon/www/"; +$conf_installoreon['oreon_dir_rrd'] = "/var/cache/centreon/rrd/"; + +$conf_installoreon['nagios'] = "/usr/nagios/"; +$conf_installoreon['nagios_bin'] = "/usr/nagios/bin/"; +$conf_installoreon['nagios_var'] = "/var/nagios/"; +$conf_installoreon['nagios_conf'] = "/etc/nagios/"; +$conf_installoreon['nagios_plugins'] = "/usr/nagios/libexec/"; +$conf_installoreon['nagios_bin'] = "/usr/nagios/bin/"; +$conf_installoreon['nagios_init_script'] = "/etc/init.d/nagios"; +$conf_installoreon['nagios_user'] = "nagios"; +$conf_installoreon['nagios_group'] = "nagios"; + +$conf_installoreon['apache_user'] = "apache"; +$conf_installoreon['apache_group'] = "apache"; + +$conf_installoreon['rrdtool_dir'] = "/usr/bin/rrdtool"; +$conf_installoreon['mail'] = "/bin/mail"; +$conf_installoreon['pear_dir'] = "/usr/share/php"; + +$conf_installoreon['log_file'] = "/var/nagios/nagios.log"; +$conf_installoreon['status_file'] = "/var/nagios/status.log"; +$conf_installoreon['command_file'] = "/var/nagios/rw/nagios.cmd"; +$conf_installoreon['comment_file'] = "/var/nagios/comment.log"; +$conf_installoreon['downtime_file'] = "/var/nagios/downtime.log"; +$conf_installoreon['lock_file'] = "/var/nagios/nagios.lock"; +$conf_installoreon['temp_file'] = "/var/nagios/nagios.tmp"; +$conf_installoreon['state_retention_file'] = "/var/nagios/status.sav"; +$conf_installoreon['log_archive_path'] = "/var/nagios/archives"; +$conf_installoreon['physical_html_path'] = "/usr/nagios/share"; +?> diff --git a/net-analyzer/centreon/files/ods.initd b/net-analyzer/centreon/files/ods.initd new file mode 100755 index 000000000000..e6daa3595fc4 --- /dev/null +++ b/net-analyzer/centreon/files/ods.initd @@ -0,0 +1,24 @@ +#!/sbin/runscript +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/centreon/files/ods.initd,v 1.1 2008/03/28 18:38:07 hollow Exp $ + +depend() { + need mysql +} + +start() { + ebegin "Starting OreonDataStorage (ODS)" + start-stop-daemon --start --pidfile /var/run/ods.pid \ + --background \ + --exec /usr/sbin/ods \ + --user nagios \ + --group nagios + eend +} + +stop() { + ebegin "Stopping OreonDataStorage (ODS)" + start-stop-daemon --stop --pidfile /var/run/ods.pid + eend +} diff --git a/net-analyzer/centreon/metadata.xml b/net-analyzer/centreon/metadata.xml new file mode 100644 index 000000000000..ff6894425420 --- /dev/null +++ b/net-analyzer/centreon/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>web-apps</herd> + <maintainer> + <email>hollow@gentoo.org</email> + </maintainer> +</pkgmetadata> + |