Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Jul 2003 09:24:17 +0400 (MSD)
From:      Sergey Akifyev <asa@gascom.ru>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/54565: New port: net/zabbix - advanced network monitoring system
Message-ID:  <200307170524.h6H5OHm2000658@asa.gascom.net.ru>
Resent-Message-ID: <200307170530.h6H5U6QR035132@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         54565
>Category:       ports
>Synopsis:       New port: net/zabbix - advanced network monitoring system
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jul 16 22:30:05 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Sergey Akifyev
>Release:        FreeBSD 4.8-RELEASE i386
>Organization:
JSC Gascom
>Environment:
System: FreeBSD asa.gascom.net.ru 4.8-RELEASE FreeBSD 4.8-RELEASE #5: Fri May 16 11:18:03 MSD 2003 asa@boulder.gascom.ru:/usr/src/sys/compile/ASA i386

>Description:
Zabbix is software for application and network monitoring.
Zabbix supports both polling and trapping techniques to
collect data from monitored hosts. Flexible notification
mechanism allows easy and quckly configure email notifications
for pre-defined events. Zabbix is freely available under the
terms of the GNU General Public License (GPL). 

WWW: http://zabbix.sourceforge.net/

Obsoletes: ports/53482
Note: this port doesn't install latest version of zabbix, because
latest versions simply don't work.
>How-To-Repeat:
>Fix:
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	.
#	./zabbix
#	./zabbix/files
#	./zabbix/files/patch-src-zabbix_sucker-Makefile.in
#	./zabbix/Makefile
#	./zabbix/distinfo
#	./zabbix/pkg-descr
#	./zabbix/pkg-message
#	./zabbix/pkg-plist
#	./zabbix/pkg-plist.agent
#	./zabbix/scripts
#	./zabbix/scripts/dbsetup.sh
#	./zabbix/scripts/zabbix-agent.sh.sample
#	./zabbix/scripts/zabbix.sh.sample
#	./zabbix/pkg-install
#	./zabbix-agent
#	./zabbix-agent/Makefile
#
echo c - .
mkdir -p . > /dev/null 2>&1
echo c - ./zabbix
mkdir -p ./zabbix > /dev/null 2>&1
echo c - ./zabbix/files
mkdir -p ./zabbix/files > /dev/null 2>&1
echo x - ./zabbix/files/patch-src-zabbix_sucker-Makefile.in
sed 's/^X//' >./zabbix/files/patch-src-zabbix_sucker-Makefile.in << 'END-of-./zabbix/files/patch-src-zabbix_sucker-Makefile.in'
X--- src/zabbix_sucker/Makefile.in.orig	Wed Jun 18 16:53:26 2003
X+++ src/zabbix_sucker/Makefile.in	Sun Dec  8 17:34:48 2002
X@@ -1,7 +1,7 @@
X # Build rules
X 
X-INCLUDE = @MYSQL_INCLUDE@ @PGSQL_INCLUDE@
X-LIBS    = @LIBS@ @MYSQL_LFLAGS@ @PGSQL_LFLAGS@
X+INCLUDE = @MYSQL_INCLUDE@ @PGSQL_INCLUDE@ -I/usr/local/include
X+LIBS    = @LIBS@ @MYSQL_LFLAGS@ @PGSQL_LFLAGS@ -L/usr/local/lib -lsnmp
X 
X all:
X 
END-of-./zabbix/files/patch-src-zabbix_sucker-Makefile.in
echo x - ./zabbix/Makefile
sed 's/^X//' >./zabbix/Makefile << 'END-of-./zabbix/Makefile'
X# Ports collection makefile for:  zabbix
X# Date created:			  Jun 18 2003
X# Whom:				  Sergey Akifyev <asa@gascom.ru>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	zabbix
XPORTVERSION=	1.0beta7
XCATEGORIES=	net
XMASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
XMASTER_SITE_SUBDIR=${PORTNAME}
X
XMAINTAINER=	asa@gascom.ru
XCOMMENT=	Very advanced network monitoring system
X
XGNU_CONFIGURE=	yes
XCONFIGURE_ENV=	CPPFLAGS=-I/usr/local/include
X
X.ifdef(ZABBIX_AGENT_ONLY)
XPKGNAMESUFFIX=	-agent
XPLIST=		${MASTERDIR}/pkg-plist.agent
XPKGMESSAGE=	nonexistent
X.else
XCONFIGURE_ARGS=	--with-mysql
X
XLIB_DEPENDS=	snmp.4:${PORTSDIR}/net/net-snmp4 \
X		mysqlclient.10:${PORTSDIR}/databases/mysql323-client
XBUILD_DEPENDS=	mysql:${PORTSDIR}/databases/mysql323-client
XRUN_DEPENDS=	safe_mysqld:${PORTSDIR}/databases/mysql323-server
X.endif
X
XZABBIX_BINARIES=zabbix_agent zabbix_agentd zabbix_sender
XZABBIX_CONFIGS=	zabbix_agent.conf zabbix_agentd.conf
X.ifndef(ZABBIX_AGENT_ONLY)
XZABBIX_BINARIES+=zabbix_suckerd zabbix_trapper zabbix_trapperd
XZABBIX_CONFIGS+=zabbix_suckerd.conf zabbix_trapper.conf zabbix_trapperd.conf
X.endif
X
Xdo-install:
X.for FILE in ${ZABBIX_BINARIES}
X	${INSTALL_PROGRAM} ${WRKSRC}/bin/${FILE} ${PREFIX}/bin
X.endfor
X	${MKDIR} ${PREFIX}/etc/zabbix
X	${LN} -sf ${PREFIX}/etc/zabbix /etc/zabbix
X.for FILE in ${ZABBIX_CONFIGS}
X	${INSTALL_DATA} ${WRKSRC}/misc/conf/${FILE} \
X			${PREFIX}/etc/zabbix/${FILE}.sample
X.endfor
X.ifndef(ZABBIX_AGENT_ONLY)
X	${MKDIR} ${PREFIX}/share/zabbix
X	${MKDIR} ${PREFIX}/share/zabbix/create
X	${INSTALL_DATA} ${MASTERDIR}/scripts/dbsetup.sh \
X			${PREFIX}/share/zabbix/create
X	${CP} -Rf ${WRKSRC}/frontends/* ${PREFIX}/share/zabbix
X	${CP} -Rf ${WRKSRC}/create/* ${PREFIX}/share/zabbix/create
X	${INSTALL_SCRIPT} ${MASTERDIR}/scripts/dbsetup.sh \
X			${PREFIX}/share/zabbix/create
X	${INSTALL_SCRIPT} ${MASTERDIR}/scripts/zabbix.sh.sample \
X			${PREFIX}/etc/rc.d
X.endif
X	${INSTALL_SCRIPT} ${MASTERDIR}/scripts/zabbix-agent.sh.sample \
X			${PREFIX}/etc/rc.d
X	${SH} ${PKGINSTALL}
X
X.include <bsd.port.mk>
END-of-./zabbix/Makefile
echo x - ./zabbix/distinfo
sed 's/^X//' >./zabbix/distinfo << 'END-of-./zabbix/distinfo'
XMD5 (zabbix-1.0beta7.tar.gz) = 07545fbbbd8c85936a89aaabd8842f7e
END-of-./zabbix/distinfo
echo x - ./zabbix/pkg-descr
sed 's/^X//' >./zabbix/pkg-descr << 'END-of-./zabbix/pkg-descr'
XZabbix is software for application and network monitoring.
XZabbix supports both polling and trapping techniques to
Xcollect data from monitored hosts. Flexible notification
Xmechanism allows easy and quckly configure email notifications
Xfor pre-defined events. Zabbix is freely available under the
Xterms of the GNU General Public License (GPL). 
X
XWWW: http://zabbix.sourceforge.net/
END-of-./zabbix/pkg-descr
echo x - ./zabbix/pkg-message
sed 's/^X//' >./zabbix/pkg-message << 'END-of-./zabbix/pkg-message'
X====================================================
XACHTUNG!!!
X
X1) Run dbsetup.sh from ${PREFIX}/share/zabbix/create
Xto setup database tables
X
X2) Install apache with mod_php (it should be
XGD-enabled for graphs to work) and point it
Xto serve from ${PREFIX}/share/zabbix/php
X====================================================
END-of-./zabbix/pkg-message
echo x - ./zabbix/pkg-plist
sed 's/^X//' >./zabbix/pkg-plist << 'END-of-./zabbix/pkg-plist'
Xetc/zabbix/zabbix_agent.conf.sample
Xetc/zabbix/zabbix_agentd.conf.sample
Xetc/zabbix/zabbix_suckerd.conf.sample
Xetc/zabbix/zabbix_trapper.conf.sample
Xetc/zabbix/zabbix_trapperd.conf.sample
Xetc/rc.d/zabbix.sh.sample
Xetc/rc.d/zabbix-agent.sh.sample
Xbin/zabbix_agent
Xbin/zabbix_agentd
Xbin/zabbix_sender
Xbin/zabbix_suckerd
Xbin/zabbix_trapper
Xbin/zabbix_trapperd
X@dirrm etc/zabbix
X@dirrm share/zabbix/php/audio
X@dirrm share/zabbix/php/images/sysmaps
X@dirrm share/zabbix/php/images
X@dirrm share/zabbix/php/include
X@dirrm share/zabbix/php
X@dirrm share/zabbix/create/data
X@dirrm share/zabbix/create/mysql
X@dirrm share/zabbix/create/postgresql
X@dirrm share/zabbix/create
X@dirrm share/zabbix
Xshare/zabbix/php/audio/warning_off.wav
Xshare/zabbix/php/audio/warning_on.wav
Xshare/zabbix/php/about.php
Xshare/zabbix/php/actions.php
Xshare/zabbix/php/alarms.php
Xshare/zabbix/php/alerts.php
Xshare/zabbix/php/chart.php
Xshare/zabbix/php/chart2.php
Xshare/zabbix/php/chart3.php
Xshare/zabbix/php/chart4.php
Xshare/zabbix/php/chart5.php
Xshare/zabbix/php/chart_diff.php
Xshare/zabbix/php/charts.php
Xshare/zabbix/php/compare.php
Xshare/zabbix/php/config.php
Xshare/zabbix/php/css.css
Xshare/zabbix/php/graph.php
Xshare/zabbix/php/graphs.php
Xshare/zabbix/php/helpdesk.php
Xshare/zabbix/php/history.php
Xshare/zabbix/php/hosts.php
Xshare/zabbix/php/index.php
Xshare/zabbix/php/items.php
Xshare/zabbix/php/latest.php
Xshare/zabbix/php/latestalarms.php
Xshare/zabbix/php/map.php
Xshare/zabbix/php/maps.php
Xshare/zabbix/php/media.php
Xshare/zabbix/php/queue.php
Xshare/zabbix/php/report1.php
Xshare/zabbix/php/report2.php
Xshare/zabbix/php/services.php
Xshare/zabbix/php/srv_status.php
Xshare/zabbix/php/sysmap.php
Xshare/zabbix/php/sysmaps.php
Xshare/zabbix/php/tr_comments.php
Xshare/zabbix/php/tr_status.php
Xshare/zabbix/php/trend.php
Xshare/zabbix/php/trends.php
Xshare/zabbix/php/triggers.php
Xshare/zabbix/php/users.php
Xshare/zabbix/php/images/sysmaps/Notebook.png
Xshare/zabbix/php/images/sysmaps/Hub.png
Xshare/zabbix/php/images/sysmaps/Printer.png
Xshare/zabbix/php/images/sysmaps/Router.png
Xshare/zabbix/php/images/sysmaps/Server.png
Xshare/zabbix/php/images/sysmaps/Workstation.png
Xshare/zabbix/php/include/.htaccess
Xshare/zabbix/php/include/config.inc.php
Xshare/zabbix/php/include/db.inc.php
Xshare/zabbix/php/include/defines.inc.php
Xshare/zabbix/create/data/data.sql
Xshare/zabbix/create/mysql/schema.sql
Xshare/zabbix/create/postgresql/schema.sql
Xshare/zabbix/create/dbsetup.sh
X@exec ln -sf %D/etc/zabbix /etc/zabbix
X@unexec rm /etc/zabbix
END-of-./zabbix/pkg-plist
echo x - ./zabbix/pkg-plist.agent
sed 's/^X//' >./zabbix/pkg-plist.agent << 'END-of-./zabbix/pkg-plist.agent'
Xbin/zabbix_agent
Xbin/zabbix_agentd
Xbin/zabbix_sender
Xetc/zabbix/zabbix_agent.conf.sample
Xetc/zabbix/zabbix_agentd.conf.sample
X@dirrm /etc/zabbix
X@exec ln -sf %D/etc/zabbix /etc/zabbix
X@unexec rm /etc/zabbix
END-of-./zabbix/pkg-plist.agent
echo c - ./zabbix/scripts
mkdir -p ./zabbix/scripts > /dev/null 2>&1
echo x - ./zabbix/scripts/dbsetup.sh
sed 's/^X//' >./zabbix/scripts/dbsetup.sh << 'END-of-./zabbix/scripts/dbsetup.sh'
X#!/bin/sh
X
Xecho "create database zabbix;" | mysql
Xcat mysql/schema.sql | mysql zabbix
Xcat data/data.sql | mysql zabbix
END-of-./zabbix/scripts/dbsetup.sh
echo x - ./zabbix/scripts/zabbix-agent.sh.sample
sed 's/^X//' >./zabbix/scripts/zabbix-agent.sh.sample << 'END-of-./zabbix/scripts/zabbix-agent.sh.sample'
X#!/bin/sh
X
Xcase "${1}" in
X	start)
X		echo -n "zabbix-agent "
X		zabbix_agentd
X		;;
X	stop)
X		killall zabbix_agentd
X		;;
X	*)
X		echo Usage: `basename ${0}` "{start|stop}"
X		;;
Xesac
END-of-./zabbix/scripts/zabbix-agent.sh.sample
echo x - ./zabbix/scripts/zabbix.sh.sample
sed 's/^X//' >./zabbix/scripts/zabbix.sh.sample << 'END-of-./zabbix/scripts/zabbix.sh.sample'
X#!/bin/sh
X
Xcase "${1}" in
X	start)
X		echo -n "zabbix "
X		zabbix_suckerd
X		zabbix_trapperd
X		;;
X	stop)
X		killall zabbix_suckerd
X		killall zabbix_trapperd
X		;;
X	*)
X		echo Usage: `basename ${0}` "{start|stop}"
X		;;
Xesac
END-of-./zabbix/scripts/zabbix.sh.sample
echo x - ./zabbix/pkg-install
sed 's/^X//' >./zabbix/pkg-install << 'END-of-./zabbix/pkg-install'
X#!/bin/sh
X# Script was taken from mysql323-server port, and modified
X# to suit zabbix needs
X
XPATH=/bin:/usr/sbin
X
Xcase $2 in
XPOST-INSTALL)
X	USER=zabbix
X	GROUP=${USER}
X	UID=112
X	GID=${UID}
X
X	if pw group show "${GROUP}" 2>/dev/null; then
X		echo "You already have a group \"${GROUP}\", so I will use it."
X	else
X		if pw groupadd ${GROUP} -g ${GID}; then
X			echo "Added group \"${GROUP}\"."
X		else
X			echo "Adding group \"${GROUP}\" failed..."
X			exit 1
X		fi
X	fi
X
X	if pw user show "${USER}" 2>/dev/null; then
X		echo "You already have a user \"${USER}\", so I will use it."
X		if pw usermod ${USER} -d /nonexistent
X		then
X			echo "Changed home directory of \"${USER}\" to /nonexistent"
X		else
X			echo "Changing home directory of \"${USER}\" to /nonexistent failed..."
X			exit 1
X		fi
X	else
X		if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
X			-d /nonexistent -s /sbin/nologin -c "MySQL Daemon"
X		then
X			echo "Added user \"${USER}\"."
X		else
X			echo "Adding user \"${USER}\" failed..."
X			exit 1
X		fi
X	fi
Xesac
END-of-./zabbix/pkg-install
echo c - ./zabbix-agent
mkdir -p ./zabbix-agent > /dev/null 2>&1
echo x - ./zabbix-agent/Makefile
sed 's/^X//' >./zabbix-agent/Makefile << 'END-of-./zabbix-agent/Makefile'
X# Ports collection makefile for:  zabbix
X# Date created:			  Jun 18 2003
X# Whom:				  Sergey Akifyev <asa@gascom.ru>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	zabbix-agent
XCATEGORIES=	net
X
XMAINTAINER=	asa@gascom.ru
XCOMMENT=	Very advanced network monitoring system (agent only)
X
XZABBIX_AGENT_ONLY=yes
XMASTERDIR=	${.CURDIR}/../zabbix
X
X.include "${MASTERDIR}/Makefile"
END-of-./zabbix-agent/Makefile
exit

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200307170524.h6H5OHm2000658>