Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 May 2011 20:25:01 GMT
From:      Oleksiy Zagorskyi <zalex_ua@i.ua>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/157301: [New port] net-mgmt/zbxlog: Syslog server receives messages and send them to Zabbix
Message-ID:  <201105242025.p4OKP1ea028484@red.freebsd.org>
Resent-Message-ID: <201105242030.p4OKUC7a021050@freefall.freebsd.org>

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

>Number:         157301
>Category:       ports
>Synopsis:       [New port] net-mgmt/zbxlog: Syslog server receives messages and send them to Zabbix
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue May 24 20:30:12 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Oleksiy Zagorskyi
>Release:        8.1
>Organization:
>Environment:
FreeBSD somehost.ua 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:55:53 UTC 2010     root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386

>Description:

>How-To-Repeat:

>Fix:


Patch attached with submission follows:

# 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:
#
#	zbxlog
#	zbxlog/pkg-descr
#	zbxlog/Makefile
#	zbxlog/pkg-plist
#	zbxlog/files
#	zbxlog/files/zbxlog.in
#	zbxlog/files/pkg-message.in
#	zbxlog/distinfo
#
echo c - zbxlog
mkdir -p zbxlog > /dev/null 2>&1
echo x - zbxlog/pkg-descr
sed 's/^X//' >zbxlog/pkg-descr << '48d8d1097df65e29fdd9ee4c822e4785'
XZbxlog is a syslog server that receives syslog messages from local or 
Xremote hosts and send them to corresponding items in Zabbix.
XIt uses zabbix agent protocol in active mode to send syslog messages to zabbix 
Xserver.
X
XWWW:	http://www.alixen.org/
48d8d1097df65e29fdd9ee4c822e4785
echo x - zbxlog/Makefile
sed 's/^X//' >zbxlog/Makefile << '1cd3ff998cb0d16e987c94223caf59aa'
X# New ports collection makefile for:	zbxlog
X# Date created:		2011-05-22
X# Whom:			Oleksiy <zalex_ua@i.ua>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	zbxlog
XPORTVERSION=1.1
XPORTREVISION=
XPORTEPOCH=
XCATEGORIES=	net-mgmt
XMASTER_SITES=	http://www.alixen.org/%SUBDIR%/
XMASTER_SITE_SUBDIR=	attachments/download/31
XDISTNAME=	${PORTNAME}-r${PORTVERSION}
XEXTRACT_SUFX=	.tgz
X
XMAINTAINER=	zalex_ua@i.ua
XCOMMENT=	Syslog server receives messages and send them to Zabbix
X
XLICENSE=        GPLv2
X
XBUILD_DEPENDS=  ${SITE_PERL}/${PERL_ARCH}/NetAddr/IP.pm:${PORTSDIR}/net-mgmt/p5-NetAddr-IP \
X		${SITE_PERL}/${PERL_ARCH}/Socket6.pm:${PORTSDIR}/net/p5-Socket6 \
X		${SITE_PERL}/IO/Socket/INET6.pm:${PORTSDIR}/net/p5-IO-Socket-INET6 \
X		${SITE_PERL}/${PERL_ARCH}/Data/Dumper.pm:${PORTSDIR}/devel/p5-Data-Dumper \
X		${SITE_PERL}/${PERL_ARCH}/DBI.pm:${PORTSDIR}/databases/p5-DBI
X
XNO_BUILD=       yes
XUSE_PERL5_RUN=  yes
X
XUSE_RC_SUBR=    ${PORTNAME}
XSUB_FILES+=     pkg-message
X
XOPTIONSFILE=    ${PORT_DBDIR}/${PORTNAME}/options
XOPTIONS=        MYSQL "Use MySQL backend" on \
X		PGSQL "Use PostgreSQL backend" off
X
X.include <bsd.port.options.mk>
X
X.ifdef WITH_MYSQL
XBUILD_DEPENDS+=   ${SITE_PERL}/${PERL_ARCH}/DBD/mysql.pm:${PORTSDIR}/databases/p5-DBD-mysql
X.endif
X.ifdef WITH_PGSQL
XBUILD_DEPENDS+=   ${SITE_PERL}/${PERL_ARCH}/DBD/Pg.pm:${PORTSDIR}/databases/p5-DBD-Pg
X.endif
X.if !defined(WITH_MYSQL) && !defined(WITH_PGSQL)
XIGNORE=         requires a selected at least one database backend
X.endif
X.if defined(WITH_MYSQL) && defined(WITH_PGSQL)
XIGNORE=         uses only one database backend. Please unselect one
X.endif
X
XRUND_DEPENDS=${BUILD_DEPENDS}
X
Xpost-patch:
X	${REINPLACE_CMD} -e 's|etc/zbxlog.conf|${ETCDIR}/zbxlog.conf|' ${WRKSRC}/bin/zbxlog.pl
X
Xdo-install:
X	${MKDIR} ${DATADIR}
X	${MKDIR} ${ETCDIR}
X	${INSTALL_SCRIPT} ${WRKSRC}/bin/zbxlog.pl ${PREFIX}/sbin/zbxlog.pl
X	cd ${WRKSRC}/lib && ${COPYTREE_SHARE} Zbxlog ${PREFIX}/lib/
X	${INSTALL_DATA} ${WRKSRC}/etc/zbxlog.conf.example ${ETCDIR}/zbxlog.conf.example
X	${CP} ${WRKSRC}/README ${DATADIR}
X	${CP} -R ${WRKSRC}/tests ${DATADIR}
X	${CP} -R ${WRKSRC}/zabbix/patches ${DATADIR}
X
Xpost-install:
X	@${CHOWN} -R root:wheel ${ETCDIR}
X	@${CAT} ${PKGMESSAGE}
X
X.include <bsd.port.mk>
1cd3ff998cb0d16e987c94223caf59aa
echo x - zbxlog/pkg-plist
sed 's/^X//' >zbxlog/pkg-plist << 'dba5688834a8ac82ad7e20b039940311'
Xsbin/zbxlog.pl
Xlib/Zbxlog/Config.pm
Xlib/Zbxlog/Controller.pm
Xlib/Zbxlog/DB.pm
Xlib/Zbxlog/Hosts.pm
Xlib/Zbxlog/Item.pm
Xlib/Zbxlog/Items.pm
Xlib/Zbxlog/Queue.pm
Xlib/Zbxlog/Sender.pm
Xlib/Zbxlog/SyslogMsg.pm
X@dirrm lib/Zbxlog
X%%ETCDIR%%/zbxlog.conf.example
X%%DATADIR%%/README
X%%DATADIR%%/tests/testlog.sh
X%%DATADIR%%/tests/testtriggers.sh
X@dirrm %%DATADIR%%/tests
X%%DATADIR%%/patches/1.8.3/frontends/php/include/defines.inc.php.patch
X%%DATADIR%%/patches/1.8.3/frontends/php/include/items.inc.php.patch
X%%DATADIR%%/patches/1.8.3/frontends/php/include/locales/en_gb.inc.php.patch
X%%DATADIR%%/patches/1.8.4/frontends/php/defines.inc.php.patch
X%%DATADIR%%/patches/1.8.4/frontends/php/en_gb.inc.php.patch
X%%DATADIR%%/patches/1.8.4/frontends/php/items.inc.php.patch
X%%DATADIR%%/patches/1.8.5/frontends/php/defines.inc.php.patch
X%%DATADIR%%/patches/1.8.5/frontends/php/en_gb.inc.php.patch
X%%DATADIR%%/patches/1.8.5/frontends/php/history.php.patch
X%%DATADIR%%/patches/1.8.5/frontends/php/items.inc.php.patch
X%%DATADIR%%/patches/1.9.1/frontends/php/defines.inc.php.patch
X%%DATADIR%%/patches/1.9.1/frontends/php/en_gb.inc.php.patch
X%%DATADIR%%/patches/1.9.1/frontends/php/items.inc.php.patch
X%%DATADIR%%/patches/1.9.2/frontends/php/defines.inc.php.patch
X%%DATADIR%%/patches/1.9.2/frontends/php/en_gb.inc.php.patch
X%%DATADIR%%/patches/1.9.2/frontends/php/history.php.patch
X%%DATADIR%%/patches/1.9.2/frontends/php/items.inc.php.patch
X@dirrm %%DATADIR%%/patches/1.9.2/frontends/php
X@dirrm %%DATADIR%%/patches/1.9.2/frontends
X@dirrm %%DATADIR%%/patches/1.9.2
X@dirrm %%DATADIR%%/patches/1.9.1/frontends/php
X@dirrm %%DATADIR%%/patches/1.9.1/frontends
X@dirrm %%DATADIR%%/patches/1.9.1
X@dirrm %%DATADIR%%/patches/1.8.5/frontends/php
X@dirrm %%DATADIR%%/patches/1.8.5/frontends
X@dirrm %%DATADIR%%/patches/1.8.5
X@dirrm %%DATADIR%%/patches/1.8.4/frontends/php
X@dirrm %%DATADIR%%/patches/1.8.4/frontends
X@dirrm %%DATADIR%%/patches/1.8.4
X@dirrm %%DATADIR%%/patches/1.8.3/frontends/php/include/locales
X@dirrm %%DATADIR%%/patches/1.8.3/frontends/php/include
X@dirrm %%DATADIR%%/patches/1.8.3/frontends/php
X@dirrm %%DATADIR%%/patches/1.8.3/frontends
X@dirrm %%DATADIR%%/patches/1.8.3
X@dirrm %%DATADIR%%/patches
X@dirrm %%DATADIR%%
dba5688834a8ac82ad7e20b039940311
echo c - zbxlog/files
mkdir -p zbxlog/files > /dev/null 2>&1
echo x - zbxlog/files/zbxlog.in
sed 's/^X//' >zbxlog/files/zbxlog.in << '567fd1e1994c85c2dfdbd52238a9c087'
X#!/bin/sh
X
X# PROVIDE: zbxlog
X# REQUIRE: DAEMON mysql zabbix_server
X# KEYWORD: shutdown
X#
X# Add the following lines to /etc/rc.conf.local or /etc/rc.conf to
X# enable zbxlog:
X#
X# zbxlog_enable (bool): Set to NO by default.  Set it to YES to
X#         enable zbxlog.
X#
X
X. /etc/rc.subr
X
Xname="zbxlog"
Xrcvar=${name}_enable
Xpidfile="/var/run/${name}.pid"
Xperl="/usr/bin/perl"
X
Xload_rc_config $name
X: ${zbxlog_enable="NO"}
X
Xrequired_files="%%ETCDIR%%/${name}.conf"
X
Xcommand="%%PREFIX%%/sbin/${name}.pl"
Xcommand_interpreter=${perl}
X
Xstart_cmd="zbxlog_start"
Xstop_postcmd="stop_postcmd"
X
Xzbxlog_start(){
X    daemon -f -p ${pidfile} ${command} && echo "Starting ${name}."
X    }
X
Xstop_postcmd() {
X    rm -f $pidfile && echo "Pid file \"${pidfile}\" has been removed."
X    }
X
Xrun_rc_command "$1"
567fd1e1994c85c2dfdbd52238a9c087
echo x - zbxlog/files/pkg-message.in
sed 's/^X//' >zbxlog/files/pkg-message.in << '0e77706b6eaba34e687b6c676045702c'
X======================================================================
XZbxlog requires a properly configured settings.
X
XMake a copy of sample configuration file:
X    cd %%ETCDIR%%
X    cp zbxlog.conf.example zbxlog.conf
Xand configure it.
X
XFor start zbxlog on boot make:
X    echo zbxlog_enable="YES" >> /etc/rc.conf
X
XFor start immediately make:
X    service zbxlog start
X
XFor more datail, see the README file in
X"%%DATADIR%%" directory.
X======================================================================
0e77706b6eaba34e687b6c676045702c
echo x - zbxlog/distinfo
sed 's/^X//' >zbxlog/distinfo << 'e250c32ea6fb48e0229f09f2d539c4a7'
XSHA256 (zbxlog-r1.1.tgz) = cf968ce0d170a873390b0e70dd50c142d82c8820f8daf92ac3d9a155cea626cf
XSIZE (zbxlog-r1.1.tgz) = 18071
e250c32ea6fb48e0229f09f2d539c4a7
exit



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



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