1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-19 19:59:43 +00:00

New port: net/zabbix - advanced network monitoring system

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).

PR:		ports/54565
Submitted by:	Sergey Akifyev <asa@gascom.ru>
This commit is contained in:
Edwin Groothuis 2003-08-30 08:06:39 +00:00
parent de2d00b638
commit d7af773d26
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=88063
35 changed files with 825 additions and 0 deletions

69
net-mgmt/zabbix/Makefile Normal file
View File

@ -0,0 +1,69 @@
# Ports collection makefile for: zabbix
# Date created: Jun 18 2003
# Whom: Sergey Akifyev <asa@gascom.ru>
#
# $FreeBSD$
#
PORTNAME= zabbix
PORTVERSION= 1.0b7
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR=${PORTNAME}
DISTNAME= ${PORTNAME}-1.0beta7
MAINTAINER= asa@gascom.ru
COMMENT= Very advanced network monitoring system
GNU_CONFIGURE= yes
CONFIGURE_ENV= CPPFLAGS=-I${LOCALBASE}/include \
LIBS=-L${LOCALBASE}/lib
CFLAGS+= -I${LOCALBASE}/include
CONFIGURE_ARGS= --prefix=${PREFIX}
.ifdef(ZABBIX_AGENT_ONLY)
PKGNAMESUFFIX= -agent
PLIST= ${MASTERDIR}/pkg-plist.agent
PKGMESSAGE= nonexistent
.else
CONFIGURE_ARGS+=--with-mysql=${LOCALBASE}
LIB_DEPENDS+= snmp.4:${PORTSDIR}/net/net-snmp4 \
mysqlclient.10:${PORTSDIR}/databases/mysql323-client
BUILD_DEPENDS+= mysql:${PORTSDIR}/databases/mysql323-client
RUN_DEPENDS+= safe_mysqld:${PORTSDIR}/databases/mysql323-server
.endif
ZABBIX_BINARIES=zabbix_agent zabbix_agentd zabbix_sender
ZABBIX_CONFIGS= zabbix_agent.conf zabbix_agentd.conf
.ifndef(ZABBIX_AGENT_ONLY)
ZABBIX_BINARIES+=zabbix_suckerd zabbix_trapper zabbix_trapperd
ZABBIX_CONFIGS+=zabbix_suckerd.conf zabbix_trapper.conf zabbix_trapperd.conf
.endif
do-install:
.for FILE in ${ZABBIX_BINARIES}
${INSTALL_PROGRAM} ${WRKSRC}/bin/${FILE} ${PREFIX}/bin
.endfor
${MKDIR} ${PREFIX}/etc/zabbix
${LN} -sf ${PREFIX}/etc/zabbix /etc/zabbix
.for FILE in ${ZABBIX_CONFIGS}
${INSTALL_DATA} ${WRKSRC}/misc/conf/${FILE} \
${PREFIX}/etc/zabbix/${FILE}.sample
.endfor
.ifndef(ZABBIX_AGENT_ONLY)
${MKDIR} ${PREFIX}/share/zabbix
${MKDIR} ${PREFIX}/share/zabbix/create
${INSTALL_DATA} ${MASTERDIR}/scripts/dbsetup.sh \
${PREFIX}/share/zabbix/create
${CP} -Rf ${WRKSRC}/frontends/* ${PREFIX}/share/zabbix
${CP} -Rf ${WRKSRC}/create/* ${PREFIX}/share/zabbix/create
${INSTALL_SCRIPT} ${MASTERDIR}/scripts/dbsetup.sh \
${PREFIX}/share/zabbix/create
${INSTALL_SCRIPT} ${MASTERDIR}/scripts/zabbix.sh.sample \
${PREFIX}/etc/rc.d
.endif
${INSTALL_SCRIPT} ${MASTERDIR}/scripts/zabbix-agent.sh.sample \
${PREFIX}/etc/rc.d
${SH} ${PKGINSTALL}
.include <bsd.port.mk>

1
net-mgmt/zabbix/distinfo Normal file
View File

@ -0,0 +1 @@
MD5 (zabbix-1.0beta7.tar.gz) = 07545fbbbd8c85936a89aaabd8842f7e

View File

@ -0,0 +1,12 @@
--- src/zabbix_sucker/Makefile.in.orig Wed Jun 18 16:53:26 2003
+++ src/zabbix_sucker/Makefile.in Sun Dec 8 17:34:48 2002
@@ -1,7 +1,7 @@
# Build rules
-INCLUDE = @MYSQL_INCLUDE@ @PGSQL_INCLUDE@
-LIBS = @LIBS@ @MYSQL_LFLAGS@ @PGSQL_LFLAGS@
+INCLUDE = @MYSQL_INCLUDE@ @PGSQL_INCLUDE@ -I/usr/local/include
+LIBS = @LIBS@ @MYSQL_LFLAGS@ @PGSQL_LFLAGS@ -L/usr/local/lib -lsnmp
all:

View File

@ -0,0 +1,8 @@
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/

View File

@ -0,0 +1,44 @@
#!/bin/sh
# Script was taken from mysql323-server port, and modified
# to suit zabbix needs
PATH=/bin:/usr/sbin
case $2 in
POST-INSTALL)
USER=zabbix
GROUP=${USER}
UID=112
GID=${UID}
if pw group show "${GROUP}" 2>/dev/null; then
echo "You already have a group \"${GROUP}\", so I will use it."
else
if pw groupadd ${GROUP} -g ${GID}; then
echo "Added group \"${GROUP}\"."
else
echo "Adding group \"${GROUP}\" failed..."
exit 1
fi
fi
if pw user show "${USER}" 2>/dev/null; then
echo "You already have a user \"${USER}\", so I will use it."
if pw usermod ${USER} -d /nonexistent
then
echo "Changed home directory of \"${USER}\" to /nonexistent"
else
echo "Changing home directory of \"${USER}\" to /nonexistent failed..."
exit 1
fi
else
if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
-d /nonexistent -s /sbin/nologin -c "MySQL Daemon"
then
echo "Added user \"${USER}\"."
else
echo "Adding user \"${USER}\" failed..."
exit 1
fi
fi
esac

View File

@ -0,0 +1,10 @@
====================================================
ACHTUNG!!!
1) Run dbsetup.sh from ${PREFIX}/share/zabbix/create
to setup database tables
2) Install apache with mod_php (it should be
GD-enabled for graphs to work) and point it
to serve from ${PREFIX}/share/zabbix/php
====================================================

81
net-mgmt/zabbix/pkg-plist Normal file
View File

@ -0,0 +1,81 @@
etc/zabbix/zabbix_agent.conf.sample
etc/zabbix/zabbix_agentd.conf.sample
etc/zabbix/zabbix_suckerd.conf.sample
etc/zabbix/zabbix_trapper.conf.sample
etc/zabbix/zabbix_trapperd.conf.sample
etc/rc.d/zabbix.sh.sample
etc/rc.d/zabbix-agent.sh.sample
bin/zabbix_agent
bin/zabbix_agentd
bin/zabbix_sender
bin/zabbix_suckerd
bin/zabbix_trapper
bin/zabbix_trapperd
@dirrm etc/zabbix
share/zabbix/php/audio/warning_off.wav
share/zabbix/php/audio/warning_on.wav
share/zabbix/php/about.php
share/zabbix/php/actions.php
share/zabbix/php/alarms.php
share/zabbix/php/alerts.php
share/zabbix/php/chart.php
share/zabbix/php/chart2.php
share/zabbix/php/chart3.php
share/zabbix/php/chart4.php
share/zabbix/php/chart5.php
share/zabbix/php/chart_diff.php
share/zabbix/php/charts.php
share/zabbix/php/compare.php
share/zabbix/php/config.php
share/zabbix/php/css.css
share/zabbix/php/graph.php
share/zabbix/php/graphs.php
share/zabbix/php/helpdesk.php
share/zabbix/php/history.php
share/zabbix/php/hosts.php
share/zabbix/php/index.php
share/zabbix/php/items.php
share/zabbix/php/latest.php
share/zabbix/php/latestalarms.php
share/zabbix/php/map.php
share/zabbix/php/maps.php
share/zabbix/php/media.php
share/zabbix/php/queue.php
share/zabbix/php/report1.php
share/zabbix/php/report2.php
share/zabbix/php/services.php
share/zabbix/php/srv_status.php
share/zabbix/php/sysmap.php
share/zabbix/php/sysmaps.php
share/zabbix/php/tr_comments.php
share/zabbix/php/tr_status.php
share/zabbix/php/trend.php
share/zabbix/php/trends.php
share/zabbix/php/triggers.php
share/zabbix/php/users.php
share/zabbix/php/images/sysmaps/Notebook.png
share/zabbix/php/images/sysmaps/Hub.png
share/zabbix/php/images/sysmaps/Printer.png
share/zabbix/php/images/sysmaps/Router.png
share/zabbix/php/images/sysmaps/Server.png
share/zabbix/php/images/sysmaps/Workstation.png
share/zabbix/php/include/.htaccess
share/zabbix/php/include/config.inc.php
share/zabbix/php/include/db.inc.php
share/zabbix/php/include/defines.inc.php
share/zabbix/create/data/data.sql
share/zabbix/create/mysql/schema.sql
share/zabbix/create/postgresql/schema.sql
share/zabbix/create/dbsetup.sh
@dirrm share/zabbix/php/audio
@dirrm share/zabbix/php/images/sysmaps
@dirrm share/zabbix/php/images
@dirrm share/zabbix/php/include
@dirrm share/zabbix/php
@dirrm share/zabbix/create/data
@dirrm share/zabbix/create/mysql
@dirrm share/zabbix/create/postgresql
@dirrm share/zabbix/create
@dirrm share/zabbix
@exec ln -sf %D/etc/zabbix /etc/zabbix
@unexec rm /etc/zabbix

View File

@ -0,0 +1,9 @@
bin/zabbix_agent
bin/zabbix_agentd
bin/zabbix_sender
etc/zabbix/zabbix_agent.conf.sample
etc/zabbix/zabbix_agentd.conf.sample
etc/rc.d/zabbix-agent.sh.sample
@dirrm /etc/zabbix
@exec ln -sf %D/etc/zabbix /etc/zabbix
@unexec rm /etc/zabbix

View File

@ -0,0 +1,5 @@
#!/bin/sh
echo "create database zabbix;" | mysql
cat mysql/schema.sql | mysql zabbix
cat data/data.sql | mysql zabbix

View File

@ -0,0 +1,14 @@
#!/bin/sh
case "${1}" in
start)
echo -n "zabbix-agent "
zabbix_agentd
;;
stop)
killall zabbix_agentd
;;
*)
echo Usage: `basename ${0}` "{start|stop}"
;;
esac

View File

@ -0,0 +1,16 @@
#!/bin/sh
case "${1}" in
start)
echo -n "zabbix "
zabbix_suckerd
zabbix_trapperd
;;
stop)
killall zabbix_suckerd
killall zabbix_trapperd
;;
*)
echo Usage: `basename ${0}` "{start|stop}"
;;
esac

69
net-mgmt/zabbix2/Makefile Normal file
View File

@ -0,0 +1,69 @@
# Ports collection makefile for: zabbix
# Date created: Jun 18 2003
# Whom: Sergey Akifyev <asa@gascom.ru>
#
# $FreeBSD$
#
PORTNAME= zabbix
PORTVERSION= 1.0b7
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR=${PORTNAME}
DISTNAME= ${PORTNAME}-1.0beta7
MAINTAINER= asa@gascom.ru
COMMENT= Very advanced network monitoring system
GNU_CONFIGURE= yes
CONFIGURE_ENV= CPPFLAGS=-I${LOCALBASE}/include \
LIBS=-L${LOCALBASE}/lib
CFLAGS+= -I${LOCALBASE}/include
CONFIGURE_ARGS= --prefix=${PREFIX}
.ifdef(ZABBIX_AGENT_ONLY)
PKGNAMESUFFIX= -agent
PLIST= ${MASTERDIR}/pkg-plist.agent
PKGMESSAGE= nonexistent
.else
CONFIGURE_ARGS+=--with-mysql=${LOCALBASE}
LIB_DEPENDS+= snmp.4:${PORTSDIR}/net/net-snmp4 \
mysqlclient.10:${PORTSDIR}/databases/mysql323-client
BUILD_DEPENDS+= mysql:${PORTSDIR}/databases/mysql323-client
RUN_DEPENDS+= safe_mysqld:${PORTSDIR}/databases/mysql323-server
.endif
ZABBIX_BINARIES=zabbix_agent zabbix_agentd zabbix_sender
ZABBIX_CONFIGS= zabbix_agent.conf zabbix_agentd.conf
.ifndef(ZABBIX_AGENT_ONLY)
ZABBIX_BINARIES+=zabbix_suckerd zabbix_trapper zabbix_trapperd
ZABBIX_CONFIGS+=zabbix_suckerd.conf zabbix_trapper.conf zabbix_trapperd.conf
.endif
do-install:
.for FILE in ${ZABBIX_BINARIES}
${INSTALL_PROGRAM} ${WRKSRC}/bin/${FILE} ${PREFIX}/bin
.endfor
${MKDIR} ${PREFIX}/etc/zabbix
${LN} -sf ${PREFIX}/etc/zabbix /etc/zabbix
.for FILE in ${ZABBIX_CONFIGS}
${INSTALL_DATA} ${WRKSRC}/misc/conf/${FILE} \
${PREFIX}/etc/zabbix/${FILE}.sample
.endfor
.ifndef(ZABBIX_AGENT_ONLY)
${MKDIR} ${PREFIX}/share/zabbix
${MKDIR} ${PREFIX}/share/zabbix/create
${INSTALL_DATA} ${MASTERDIR}/scripts/dbsetup.sh \
${PREFIX}/share/zabbix/create
${CP} -Rf ${WRKSRC}/frontends/* ${PREFIX}/share/zabbix
${CP} -Rf ${WRKSRC}/create/* ${PREFIX}/share/zabbix/create
${INSTALL_SCRIPT} ${MASTERDIR}/scripts/dbsetup.sh \
${PREFIX}/share/zabbix/create
${INSTALL_SCRIPT} ${MASTERDIR}/scripts/zabbix.sh.sample \
${PREFIX}/etc/rc.d
.endif
${INSTALL_SCRIPT} ${MASTERDIR}/scripts/zabbix-agent.sh.sample \
${PREFIX}/etc/rc.d
${SH} ${PKGINSTALL}
.include <bsd.port.mk>

View File

@ -0,0 +1 @@
MD5 (zabbix-1.0beta7.tar.gz) = 07545fbbbd8c85936a89aaabd8842f7e

View File

@ -0,0 +1,12 @@
--- src/zabbix_sucker/Makefile.in.orig Wed Jun 18 16:53:26 2003
+++ src/zabbix_sucker/Makefile.in Sun Dec 8 17:34:48 2002
@@ -1,7 +1,7 @@
# Build rules
-INCLUDE = @MYSQL_INCLUDE@ @PGSQL_INCLUDE@
-LIBS = @LIBS@ @MYSQL_LFLAGS@ @PGSQL_LFLAGS@
+INCLUDE = @MYSQL_INCLUDE@ @PGSQL_INCLUDE@ -I/usr/local/include
+LIBS = @LIBS@ @MYSQL_LFLAGS@ @PGSQL_LFLAGS@ -L/usr/local/lib -lsnmp
all:

View File

@ -0,0 +1,8 @@
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/

View File

@ -0,0 +1,44 @@
#!/bin/sh
# Script was taken from mysql323-server port, and modified
# to suit zabbix needs
PATH=/bin:/usr/sbin
case $2 in
POST-INSTALL)
USER=zabbix
GROUP=${USER}
UID=112
GID=${UID}
if pw group show "${GROUP}" 2>/dev/null; then
echo "You already have a group \"${GROUP}\", so I will use it."
else
if pw groupadd ${GROUP} -g ${GID}; then
echo "Added group \"${GROUP}\"."
else
echo "Adding group \"${GROUP}\" failed..."
exit 1
fi
fi
if pw user show "${USER}" 2>/dev/null; then
echo "You already have a user \"${USER}\", so I will use it."
if pw usermod ${USER} -d /nonexistent
then
echo "Changed home directory of \"${USER}\" to /nonexistent"
else
echo "Changing home directory of \"${USER}\" to /nonexistent failed..."
exit 1
fi
else
if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
-d /nonexistent -s /sbin/nologin -c "MySQL Daemon"
then
echo "Added user \"${USER}\"."
else
echo "Adding user \"${USER}\" failed..."
exit 1
fi
fi
esac

View File

@ -0,0 +1,10 @@
====================================================
ACHTUNG!!!
1) Run dbsetup.sh from ${PREFIX}/share/zabbix/create
to setup database tables
2) Install apache with mod_php (it should be
GD-enabled for graphs to work) and point it
to serve from ${PREFIX}/share/zabbix/php
====================================================

View File

@ -0,0 +1,81 @@
etc/zabbix/zabbix_agent.conf.sample
etc/zabbix/zabbix_agentd.conf.sample
etc/zabbix/zabbix_suckerd.conf.sample
etc/zabbix/zabbix_trapper.conf.sample
etc/zabbix/zabbix_trapperd.conf.sample
etc/rc.d/zabbix.sh.sample
etc/rc.d/zabbix-agent.sh.sample
bin/zabbix_agent
bin/zabbix_agentd
bin/zabbix_sender
bin/zabbix_suckerd
bin/zabbix_trapper
bin/zabbix_trapperd
@dirrm etc/zabbix
share/zabbix/php/audio/warning_off.wav
share/zabbix/php/audio/warning_on.wav
share/zabbix/php/about.php
share/zabbix/php/actions.php
share/zabbix/php/alarms.php
share/zabbix/php/alerts.php
share/zabbix/php/chart.php
share/zabbix/php/chart2.php
share/zabbix/php/chart3.php
share/zabbix/php/chart4.php
share/zabbix/php/chart5.php
share/zabbix/php/chart_diff.php
share/zabbix/php/charts.php
share/zabbix/php/compare.php
share/zabbix/php/config.php
share/zabbix/php/css.css
share/zabbix/php/graph.php
share/zabbix/php/graphs.php
share/zabbix/php/helpdesk.php
share/zabbix/php/history.php
share/zabbix/php/hosts.php
share/zabbix/php/index.php
share/zabbix/php/items.php
share/zabbix/php/latest.php
share/zabbix/php/latestalarms.php
share/zabbix/php/map.php
share/zabbix/php/maps.php
share/zabbix/php/media.php
share/zabbix/php/queue.php
share/zabbix/php/report1.php
share/zabbix/php/report2.php
share/zabbix/php/services.php
share/zabbix/php/srv_status.php
share/zabbix/php/sysmap.php
share/zabbix/php/sysmaps.php
share/zabbix/php/tr_comments.php
share/zabbix/php/tr_status.php
share/zabbix/php/trend.php
share/zabbix/php/trends.php
share/zabbix/php/triggers.php
share/zabbix/php/users.php
share/zabbix/php/images/sysmaps/Notebook.png
share/zabbix/php/images/sysmaps/Hub.png
share/zabbix/php/images/sysmaps/Printer.png
share/zabbix/php/images/sysmaps/Router.png
share/zabbix/php/images/sysmaps/Server.png
share/zabbix/php/images/sysmaps/Workstation.png
share/zabbix/php/include/.htaccess
share/zabbix/php/include/config.inc.php
share/zabbix/php/include/db.inc.php
share/zabbix/php/include/defines.inc.php
share/zabbix/create/data/data.sql
share/zabbix/create/mysql/schema.sql
share/zabbix/create/postgresql/schema.sql
share/zabbix/create/dbsetup.sh
@dirrm share/zabbix/php/audio
@dirrm share/zabbix/php/images/sysmaps
@dirrm share/zabbix/php/images
@dirrm share/zabbix/php/include
@dirrm share/zabbix/php
@dirrm share/zabbix/create/data
@dirrm share/zabbix/create/mysql
@dirrm share/zabbix/create/postgresql
@dirrm share/zabbix/create
@dirrm share/zabbix
@exec ln -sf %D/etc/zabbix /etc/zabbix
@unexec rm /etc/zabbix

View File

@ -0,0 +1,9 @@
bin/zabbix_agent
bin/zabbix_agentd
bin/zabbix_sender
etc/zabbix/zabbix_agent.conf.sample
etc/zabbix/zabbix_agentd.conf.sample
etc/rc.d/zabbix-agent.sh.sample
@dirrm /etc/zabbix
@exec ln -sf %D/etc/zabbix /etc/zabbix
@unexec rm /etc/zabbix

View File

@ -0,0 +1,5 @@
#!/bin/sh
echo "create database zabbix;" | mysql
cat mysql/schema.sql | mysql zabbix
cat data/data.sql | mysql zabbix

View File

@ -0,0 +1,14 @@
#!/bin/sh
case "${1}" in
start)
echo -n "zabbix-agent "
zabbix_agentd
;;
stop)
killall zabbix_agentd
;;
*)
echo Usage: `basename ${0}` "{start|stop}"
;;
esac

View File

@ -0,0 +1,16 @@
#!/bin/sh
case "${1}" in
start)
echo -n "zabbix "
zabbix_suckerd
zabbix_trapperd
;;
stop)
killall zabbix_suckerd
killall zabbix_trapperd
;;
*)
echo Usage: `basename ${0}` "{start|stop}"
;;
esac

View File

@ -760,6 +760,7 @@
SUBDIR += yptransitd
SUBDIR += ysm
SUBDIR += ytalk
SUBDIR += zabbix
SUBDIR += zabbix-agent
SUBDIR += zebra
SUBDIR += zebra-devel

17
net/zabbix-agent/Makefile Normal file
View File

@ -0,0 +1,17 @@
# Ports collection makefile for: zabbix
# Date created: Jun 18 2003
# Whom: Sergey Akifyev <asa@gascom.ru>
#
# $FreeBSD$
#
PORTNAME= zabbix-agent
CATEGORIES= net
MAINTAINER= asa@gascom.ru
COMMENT= Very advanced network monitoring system (agent only)
ZABBIX_AGENT_ONLY=yes
MASTERDIR= ${.CURDIR}/../zabbix
.include "${MASTERDIR}/Makefile"

69
net/zabbix/Makefile Normal file
View File

@ -0,0 +1,69 @@
# Ports collection makefile for: zabbix
# Date created: Jun 18 2003
# Whom: Sergey Akifyev <asa@gascom.ru>
#
# $FreeBSD$
#
PORTNAME= zabbix
PORTVERSION= 1.0b7
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR=${PORTNAME}
DISTNAME= ${PORTNAME}-1.0beta7
MAINTAINER= asa@gascom.ru
COMMENT= Very advanced network monitoring system
GNU_CONFIGURE= yes
CONFIGURE_ENV= CPPFLAGS=-I${LOCALBASE}/include \
LIBS=-L${LOCALBASE}/lib
CFLAGS+= -I${LOCALBASE}/include
CONFIGURE_ARGS= --prefix=${PREFIX}
.ifdef(ZABBIX_AGENT_ONLY)
PKGNAMESUFFIX= -agent
PLIST= ${MASTERDIR}/pkg-plist.agent
PKGMESSAGE= nonexistent
.else
CONFIGURE_ARGS+=--with-mysql=${LOCALBASE}
LIB_DEPENDS+= snmp.4:${PORTSDIR}/net/net-snmp4 \
mysqlclient.10:${PORTSDIR}/databases/mysql323-client
BUILD_DEPENDS+= mysql:${PORTSDIR}/databases/mysql323-client
RUN_DEPENDS+= safe_mysqld:${PORTSDIR}/databases/mysql323-server
.endif
ZABBIX_BINARIES=zabbix_agent zabbix_agentd zabbix_sender
ZABBIX_CONFIGS= zabbix_agent.conf zabbix_agentd.conf
.ifndef(ZABBIX_AGENT_ONLY)
ZABBIX_BINARIES+=zabbix_suckerd zabbix_trapper zabbix_trapperd
ZABBIX_CONFIGS+=zabbix_suckerd.conf zabbix_trapper.conf zabbix_trapperd.conf
.endif
do-install:
.for FILE in ${ZABBIX_BINARIES}
${INSTALL_PROGRAM} ${WRKSRC}/bin/${FILE} ${PREFIX}/bin
.endfor
${MKDIR} ${PREFIX}/etc/zabbix
${LN} -sf ${PREFIX}/etc/zabbix /etc/zabbix
.for FILE in ${ZABBIX_CONFIGS}
${INSTALL_DATA} ${WRKSRC}/misc/conf/${FILE} \
${PREFIX}/etc/zabbix/${FILE}.sample
.endfor
.ifndef(ZABBIX_AGENT_ONLY)
${MKDIR} ${PREFIX}/share/zabbix
${MKDIR} ${PREFIX}/share/zabbix/create
${INSTALL_DATA} ${MASTERDIR}/scripts/dbsetup.sh \
${PREFIX}/share/zabbix/create
${CP} -Rf ${WRKSRC}/frontends/* ${PREFIX}/share/zabbix
${CP} -Rf ${WRKSRC}/create/* ${PREFIX}/share/zabbix/create
${INSTALL_SCRIPT} ${MASTERDIR}/scripts/dbsetup.sh \
${PREFIX}/share/zabbix/create
${INSTALL_SCRIPT} ${MASTERDIR}/scripts/zabbix.sh.sample \
${PREFIX}/etc/rc.d
.endif
${INSTALL_SCRIPT} ${MASTERDIR}/scripts/zabbix-agent.sh.sample \
${PREFIX}/etc/rc.d
${SH} ${PKGINSTALL}
.include <bsd.port.mk>

1
net/zabbix/distinfo Normal file
View File

@ -0,0 +1 @@
MD5 (zabbix-1.0beta7.tar.gz) = 07545fbbbd8c85936a89aaabd8842f7e

View File

@ -0,0 +1,12 @@
--- src/zabbix_sucker/Makefile.in.orig Wed Jun 18 16:53:26 2003
+++ src/zabbix_sucker/Makefile.in Sun Dec 8 17:34:48 2002
@@ -1,7 +1,7 @@
# Build rules
-INCLUDE = @MYSQL_INCLUDE@ @PGSQL_INCLUDE@
-LIBS = @LIBS@ @MYSQL_LFLAGS@ @PGSQL_LFLAGS@
+INCLUDE = @MYSQL_INCLUDE@ @PGSQL_INCLUDE@ -I/usr/local/include
+LIBS = @LIBS@ @MYSQL_LFLAGS@ @PGSQL_LFLAGS@ -L/usr/local/lib -lsnmp
all:

8
net/zabbix/pkg-descr Normal file
View File

@ -0,0 +1,8 @@
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/

44
net/zabbix/pkg-install Normal file
View File

@ -0,0 +1,44 @@
#!/bin/sh
# Script was taken from mysql323-server port, and modified
# to suit zabbix needs
PATH=/bin:/usr/sbin
case $2 in
POST-INSTALL)
USER=zabbix
GROUP=${USER}
UID=112
GID=${UID}
if pw group show "${GROUP}" 2>/dev/null; then
echo "You already have a group \"${GROUP}\", so I will use it."
else
if pw groupadd ${GROUP} -g ${GID}; then
echo "Added group \"${GROUP}\"."
else
echo "Adding group \"${GROUP}\" failed..."
exit 1
fi
fi
if pw user show "${USER}" 2>/dev/null; then
echo "You already have a user \"${USER}\", so I will use it."
if pw usermod ${USER} -d /nonexistent
then
echo "Changed home directory of \"${USER}\" to /nonexistent"
else
echo "Changing home directory of \"${USER}\" to /nonexistent failed..."
exit 1
fi
else
if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
-d /nonexistent -s /sbin/nologin -c "MySQL Daemon"
then
echo "Added user \"${USER}\"."
else
echo "Adding user \"${USER}\" failed..."
exit 1
fi
fi
esac

10
net/zabbix/pkg-message Normal file
View File

@ -0,0 +1,10 @@
====================================================
ACHTUNG!!!
1) Run dbsetup.sh from ${PREFIX}/share/zabbix/create
to setup database tables
2) Install apache with mod_php (it should be
GD-enabled for graphs to work) and point it
to serve from ${PREFIX}/share/zabbix/php
====================================================

81
net/zabbix/pkg-plist Normal file
View File

@ -0,0 +1,81 @@
etc/zabbix/zabbix_agent.conf.sample
etc/zabbix/zabbix_agentd.conf.sample
etc/zabbix/zabbix_suckerd.conf.sample
etc/zabbix/zabbix_trapper.conf.sample
etc/zabbix/zabbix_trapperd.conf.sample
etc/rc.d/zabbix.sh.sample
etc/rc.d/zabbix-agent.sh.sample
bin/zabbix_agent
bin/zabbix_agentd
bin/zabbix_sender
bin/zabbix_suckerd
bin/zabbix_trapper
bin/zabbix_trapperd
@dirrm etc/zabbix
share/zabbix/php/audio/warning_off.wav
share/zabbix/php/audio/warning_on.wav
share/zabbix/php/about.php
share/zabbix/php/actions.php
share/zabbix/php/alarms.php
share/zabbix/php/alerts.php
share/zabbix/php/chart.php
share/zabbix/php/chart2.php
share/zabbix/php/chart3.php
share/zabbix/php/chart4.php
share/zabbix/php/chart5.php
share/zabbix/php/chart_diff.php
share/zabbix/php/charts.php
share/zabbix/php/compare.php
share/zabbix/php/config.php
share/zabbix/php/css.css
share/zabbix/php/graph.php
share/zabbix/php/graphs.php
share/zabbix/php/helpdesk.php
share/zabbix/php/history.php
share/zabbix/php/hosts.php
share/zabbix/php/index.php
share/zabbix/php/items.php
share/zabbix/php/latest.php
share/zabbix/php/latestalarms.php
share/zabbix/php/map.php
share/zabbix/php/maps.php
share/zabbix/php/media.php
share/zabbix/php/queue.php
share/zabbix/php/report1.php
share/zabbix/php/report2.php
share/zabbix/php/services.php
share/zabbix/php/srv_status.php
share/zabbix/php/sysmap.php
share/zabbix/php/sysmaps.php
share/zabbix/php/tr_comments.php
share/zabbix/php/tr_status.php
share/zabbix/php/trend.php
share/zabbix/php/trends.php
share/zabbix/php/triggers.php
share/zabbix/php/users.php
share/zabbix/php/images/sysmaps/Notebook.png
share/zabbix/php/images/sysmaps/Hub.png
share/zabbix/php/images/sysmaps/Printer.png
share/zabbix/php/images/sysmaps/Router.png
share/zabbix/php/images/sysmaps/Server.png
share/zabbix/php/images/sysmaps/Workstation.png
share/zabbix/php/include/.htaccess
share/zabbix/php/include/config.inc.php
share/zabbix/php/include/db.inc.php
share/zabbix/php/include/defines.inc.php
share/zabbix/create/data/data.sql
share/zabbix/create/mysql/schema.sql
share/zabbix/create/postgresql/schema.sql
share/zabbix/create/dbsetup.sh
@dirrm share/zabbix/php/audio
@dirrm share/zabbix/php/images/sysmaps
@dirrm share/zabbix/php/images
@dirrm share/zabbix/php/include
@dirrm share/zabbix/php
@dirrm share/zabbix/create/data
@dirrm share/zabbix/create/mysql
@dirrm share/zabbix/create/postgresql
@dirrm share/zabbix/create
@dirrm share/zabbix
@exec ln -sf %D/etc/zabbix /etc/zabbix
@unexec rm /etc/zabbix

View File

@ -0,0 +1,9 @@
bin/zabbix_agent
bin/zabbix_agentd
bin/zabbix_sender
etc/zabbix/zabbix_agent.conf.sample
etc/zabbix/zabbix_agentd.conf.sample
etc/rc.d/zabbix-agent.sh.sample
@dirrm /etc/zabbix
@exec ln -sf %D/etc/zabbix /etc/zabbix
@unexec rm /etc/zabbix

View File

@ -0,0 +1,5 @@
#!/bin/sh
echo "create database zabbix;" | mysql
cat mysql/schema.sql | mysql zabbix
cat data/data.sql | mysql zabbix

View File

@ -0,0 +1,14 @@
#!/bin/sh
case "${1}" in
start)
echo -n "zabbix-agent "
zabbix_agentd
;;
stop)
killall zabbix_agentd
;;
*)
echo Usage: `basename ${0}` "{start|stop}"
;;
esac

View File

@ -0,0 +1,16 @@
#!/bin/sh
case "${1}" in
start)
echo -n "zabbix "
zabbix_suckerd
zabbix_trapperd
;;
stop)
killall zabbix_suckerd
killall zabbix_trapperd
;;
*)
echo Usage: `basename ${0}` "{start|stop}"
;;
esac