diff options
author | Wolfram Schlich <wschlich@gentoo.org> | 2007-04-16 16:27:09 +0000 |
---|---|---|
committer | Wolfram Schlich <wschlich@gentoo.org> | 2007-04-16 16:27:09 +0000 |
commit | 93b66000e6939411cd9a1177b75fdcd33f2bda3f (patch) | |
tree | 58248ff15b6458639eb9cdb0a85f108887172300 /net-analyzer/zabbix-server | |
parent | stable amd64, bug 169512 (diff) | |
download | gentoo-2-93b66000e6939411cd9a1177b75fdcd33f2bda3f.tar.gz gentoo-2-93b66000e6939411cd9a1177b75fdcd33f2bda3f.tar.bz2 gentoo-2-93b66000e6939411cd9a1177b75fdcd33f2bda3f.zip |
version bump wrt bug #173074
(Portage version: 2.1.2.3)
Diffstat (limited to 'net-analyzer/zabbix-server')
5 files changed, 324 insertions, 1 deletions
diff --git a/net-analyzer/zabbix-server/ChangeLog b/net-analyzer/zabbix-server/ChangeLog index 6cdfdfa6a75c..dd7d8ba6d914 100644 --- a/net-analyzer/zabbix-server/ChangeLog +++ b/net-analyzer/zabbix-server/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-analyzer/zabbix-server # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix-server/ChangeLog,v 1.13 2007/02/13 22:04:03 wschlich Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix-server/ChangeLog,v 1.14 2007/04/16 16:27:09 wschlich Exp $ + +*zabbix-server-1.1.7 (16 Apr 2007) + + 16 Apr 2007; Wolfram Schlich <wschlich@gentoo.org> + +files/1.1.7/init.d/zabbix-server, +files/1.1.7/zabbix_server.conf, + +zabbix-server-1.1.7.ebuild: + version bump wrt bug #173074 13 Feb 2007; Wolfram Schlich <wschlich@gentoo.org> zabbix-server-1.1.6.ebuild: diff --git a/net-analyzer/zabbix-server/files/1.1.7/init.d/zabbix-server b/net-analyzer/zabbix-server/files/1.1.7/init.d/zabbix-server new file mode 100644 index 000000000000..c277757a6f55 --- /dev/null +++ b/net-analyzer/zabbix-server/files/1.1.7/init.d/zabbix-server @@ -0,0 +1,21 @@ +#!/sbin/runscript +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix-server/files/1.1.7/init.d/zabbix-server,v 1.1 2007/04/16 16:27:09 wschlich Exp $ + +depend() { + need net + use mysql postgresql +} + +start() { + ebegin "Starting Zabbix server" + start-stop-daemon --start -c zabbix:zabbix --exec /usr/sbin/zabbix_server + eend $? +} + +stop() { + ebegin "Stopping Zabbix server" + start-stop-daemon --stop -u zabbix --pidfile /var/run/zabbix/zabbix_server.pid + eend $? +} diff --git a/net-analyzer/zabbix-server/files/1.1.7/zabbix_server.conf b/net-analyzer/zabbix-server/files/1.1.7/zabbix_server.conf new file mode 100644 index 000000000000..12490f881130 --- /dev/null +++ b/net-analyzer/zabbix-server/files/1.1.7/zabbix_server.conf @@ -0,0 +1,98 @@ +# This is config file for ZABBIX server process +# To get more information about ZABBIX, +# go http://www.zabbix.com + +############ GENERAL PARAMETERS ################# + +# This defines which server this is. +# Default value 1 +# This parameter must be between 1 and 255 +Server=1 + +# Number of pre-forked instances of pollers +# Default value is 6 +# This parameter must be between 6 and 255 +StartPollers=6 + +# Number of pre-forked instances of trappers +# Default value is 5 +# This parameter must be between 2 and 255 +StartTrappers=5 + +# Listen interface for trapper. Trapper will listen all network interfaces +# if this parameter is missing. +ListenIP=127.0.0.1 + +# Listen port for trapping. Default port number is 10051. This parameter +# must be between 1024 and 32767 +ListenPort=10051 + +# How often ZABBIX will perform housekeeping procedure +# (in hours) +# Default value is 1 hour +# Housekeeping is removing unnecessary information from +# tables history, alert, and alarms +# This parameter must be between 1 and 24 +HousekeepingFrequency=1 + +# How often ZABBIX will try to send unsent alerts +# (in seconds) +# Default value is 30 seconds +SenderFrequency=30 + +# Uncomment this line to disable housekeeping procedure +#DisableHousekeeping=1 + +# Specifies debug level +# 0 - debug is not created +# 1 - critical information +# 2 - error information +# 3 - warnings (default) +# 4 - for debugging (produces lots of information) +DebugLevel=3 + +# Specifies how long we wait for agent (in sec) +# Must be between 1 and 30 +Timeout=5 + +# After how many seconds of unreachability treat a host as unavailable +UnreachablePeriod=45 + +# How ofter check host for availability during the unreachability period +UnavailableDelay=15 + +# How ofter check host for availability during the unavailability period +UnavailableDelay=60 + +# Name of PID file +PidFile=/var/run/zabbix/zabbix_server.pid + +# Name of log file +# If not set, syslog is used +LogFile=/var/log/zabbix/zabbix_server.log + +#Location for custom alert scripts +AlertScriptsPath=/var/lib/zabbix/scripts + +#Location of 'fping. Default is /usr/sbin/fping +FpingLocation=/usr/sbin/fping + +# Frequency of ICMP pings. Defauls is 30 second. +PingerFrequency=30 + +# Database host name +# Default is localhost +DBHost=localhost + +# Database name +DBName=zabbix + +# Database user +DBUser=zabbix + +# Database password +# Comment this line if no password used +DBPassword=zabbix + +# Connect to MySQL using Unix socket? +#DBSocket=/var/run/mysqld/mysqld.sock diff --git a/net-analyzer/zabbix-server/files/digest-zabbix-server-1.1.7 b/net-analyzer/zabbix-server/files/digest-zabbix-server-1.1.7 new file mode 100644 index 000000000000..2926f2e1c561 --- /dev/null +++ b/net-analyzer/zabbix-server/files/digest-zabbix-server-1.1.7 @@ -0,0 +1,3 @@ +MD5 ac24ab58ef1a985c1e2a5217386d5dba zabbix-1.1.7.tar.gz 1515333 +RMD160 f09833ec59639dce6d83a7739f7a626ec6f8df0b zabbix-1.1.7.tar.gz 1515333 +SHA256 6354cd7ab311212f027e71ca78ff607f50b6323fe044d50ec1b76dc6b2878f20 zabbix-1.1.7.tar.gz 1515333 diff --git a/net-analyzer/zabbix-server/zabbix-server-1.1.7.ebuild b/net-analyzer/zabbix-server/zabbix-server-1.1.7.ebuild new file mode 100644 index 000000000000..7d8b2bf4faff --- /dev/null +++ b/net-analyzer/zabbix-server/zabbix-server-1.1.7.ebuild @@ -0,0 +1,194 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix-server/zabbix-server-1.1.7.ebuild,v 1.1 2007/04/16 16:27:09 wschlich Exp $ + +inherit eutils + +MY_P=${PN//-server/} +MY_PV=${PV//_/} +DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers. Server part." +HOMEPAGE="http://www.zabbix.com/" +SRC_URI="mirror://sourceforge/zabbix/${MY_P}-${MY_PV}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~sparc ~x86" +IUSE="ldap mysql oracle postgres snmp" +DEPEND="virtual/libc + snmp? ( net-analyzer/net-snmp ) + ldap? ( net-nds/openldap ) + mysql? ( virtual/mysql ) + postgres? ( dev-db/libpq )" +RDEPEND="${RDEPEND} net-analyzer/fping" + +S=${WORKDIR}/${MY_P}-${MY_PV} + +pkg_setup() { + local dbnum dbtypes="mysql postgres oracle" dbtype + declare -i dbnum=0 + for dbtype in ${dbtypes}; do + useq ${dbtype} && let dbnum++ + done + if [ ${dbnum} -gt 1 ]; then + eerror + eerror "You can't use more than one database type in Zabbix." + eerror "Select exactly one database type out of these: ${dbtypes}" + eerror + die "Multiple database types selected." + elif [ ${dbnum} -lt 1 ]; then + eerror + eerror "Select exactly one database type out of these: ${dbtypes}" + eerror + die "No database type selected." + fi + if useq oracle; then + if [ -z "${ORACLE_HOME}" ]; then + eerror + eerror "The environment variable ORACLE_HOME must be set" + eerror "and point to the correct location." + eerror "It looks like you don't have Oracle installed." + eerror + die "Environment variable ORACLE_HOME is not set" + fi + if has_version 'dev-db/oracle-instantclient-basic'; then + ewarn + ewarn "Please ensure you have a full install of the Oracle client." + ewarn "dev-db/oracle-instantclient* is NOT sufficient." + ewarn + fi + fi + + enewgroup zabbix + enewuser zabbix -1 -1 /var/lib/zabbix/home zabbix +} + +pkg_postinst() { + einfo + einfo "You need to configure your database for Zabbix." + einfo + einfo "Have a look at /usr/share/zabbix/database for" + einfo "database creation and upgrades." + einfo + einfo "For more info read the Zabbix manual at" + einfo "http://www.zabbix.com/manual/v1.1/" + einfo + + zabbix_homedir="$(egetent passwd zabbix | cut -d : -f 6 )" + if [ -n "${zabbix_homedir}" ] && \ + [ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then + ewarn + ewarn "The user 'zabbix' should have his homedir changed" + ewarn "to /var/lib/zabbix/home if you want to use" + ewarn "custom alert scripts." + ewarn + ewarn "A real homedir might be needed for configfiles" + ewarn "for custom alert scripts (e.g. ~/.sendxmpprc when" + ewarn "using sendxmpp for Jabber alerts)." + ewarn + ewarn "To change the homedir use:" + ewarn " usermod -d /var/lib/zabbix/home zabbix" + ewarn + fi + + # repeat fowners/fperms functionality from src_install() + # here to catch wrong permissions on existing files in + # the live filesystem (yeah, that sucks). + chown zabbix:zabbix \ + ${ROOT}etc/zabbix \ + ${ROOT}etc/zabbix/zabbix_server.conf \ + ${ROOT}var/lib/zabbix \ + ${ROOT}var/lib/zabbix/home \ + ${ROOT}var/lib/zabbix/scripts \ + ${ROOT}var/log/zabbix \ + ${ROOT}var/run/zabbix + chmod 0640 \ + ${ROOT}etc/zabbix/zabbix_server.conf + chmod 0750 \ + ${ROOT}etc/zabbix \ + ${ROOT}var/lib/zabbix \ + ${ROOT}var/lib/zabbix/home \ + ${ROOT}var/lib/zabbix/scripts \ + ${ROOT}var/log/zabbix \ + ${ROOT}var/run/zabbix + + # check for fping + fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null) + case "${fping_perms}" in + 4[157][157][157]) + ;; + *) + ewarn + ewarn "If you want to use the checks 'icmpping' and 'icmppingsec'," + ewarn "you have to make /usr/sbin/fping setuid root and executable" + ewarn "by everyone. Run the following command to fix it:" + ewarn + ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping" + ewarn + ewarn "Please be aware that this might impose a security risk," + ewarn "depending on the code quality of fping." + ewarn + ebeep 3 + epause 5 + ;; + esac +} + +src_compile() { + econf \ + --enable-server \ + $(use_with ldap) \ + $(use_with snmp net-snmp) \ + $(use_with mysql) \ + $(use_with postgres pgsql) \ + $(use_with oracle) \ + || die "econf failed" + emake || die "emake failed" +} + +src_install() { + dodir \ + /etc/zabbix \ + /var/lib/zabbix \ + /var/lib/zabbix/home \ + /var/lib/zabbix/scripts \ + /var/log/zabbix \ + /var/run/zabbix \ + /usr/share/zabbix/database + + keepdir \ + /etc/zabbix \ + /var/lib/zabbix \ + /var/lib/zabbix/home \ + /var/lib/zabbix/scripts \ + /var/log/zabbix \ + /var/run/zabbix + + insinto /etc/zabbix + doins ${FILESDIR}/${PV}/zabbix_server.conf + + doinitd ${FILESDIR}/${PV}/init.d/zabbix-server + + fowners zabbix:zabbix \ + /etc/zabbix \ + /etc/zabbix/zabbix_server.conf \ + /var/lib/zabbix \ + /var/lib/zabbix/home \ + /var/lib/zabbix/scripts \ + /var/log/zabbix \ + /var/run/zabbix + fperms 0640 \ + /etc/zabbix/zabbix_server.conf + fperms 0750 \ + /etc/zabbix \ + /var/lib/zabbix \ + /var/lib/zabbix/home \ + /var/lib/zabbix/scripts \ + /var/log/zabbix \ + /var/run/zabbix + + dosbin src/zabbix_server/zabbix_server + + insinto /usr/share/zabbix/database + doins -r upgrades create + + dodoc README INSTALL NEWS ChangeLog +} |