Date: Tue, 7 Mar 2006 15:03:35 -0500 (EST) From: Wesley Shields <wxs@csh.rit.edu> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/94187: [NEW PORT]: sysutils/grok Message-ID: <200603072003.k27K3ZeT007760@syn.csh.rit.edu> Resent-Message-ID: <200603072000.k27K0LCD055446@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 94187 >Category: ports >Synopsis: [NEW PORT]: sysutils/grok >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Tue Mar 07 20:00:19 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Wesley Shields >Release: FreeBSD 6.0-RELEASE-p2 i386 >Organization: >Environment: System: FreeBSD syn 6.0-RELEASE-p2 FreeBSD 6.0-RELEASE-p2 #1: Wed Jan 11 11:57:33 EST 2006 root@syn:/usr/obj/usr/src/sys/GENERIC i386 >Description: Attached is a shar for sysutils/grok. It is a program designed to watch logfiles, or stdout from processes and react depending upon the output. It is highly flexible. >How-To-Repeat: N/A >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: # # grok # grok/pkg-plist # grok/pkg-descr # grok/distinfo # grok/Makefile # grok/files # grok/files/grok.sh.in # grok/pkg-message # echo c - grok mkdir -p grok > /dev/null 2>&1 echo x - grok/pkg-plist sed 's/^X//' >grok/pkg-plist << 'END-of-grok/pkg-plist' Xbin/grok X@unexec if cmp -s %D/etc/grok.conf.sample %D/etc/grok.conf; then rm -f %D/etc/grok.conf; fi Xetc/grok.conf.sample X@exec if [ ! -f %D/etc/grok.conf ] ; then cp -p %D/%F %B/grok.conf; fi END-of-grok/pkg-plist echo x - grok/pkg-descr sed 's/^X//' >grok/pkg-descr << 'END-of-grok/pkg-descr' XAn expert system for real-time log analysis that allows for user-defined Xactions to happen when a log rule is matched. X XWWW: http://www.csh.rit.edu/~psionic/projects/grok END-of-grok/pkg-descr echo x - grok/distinfo sed 's/^X//' >grok/distinfo << 'END-of-grok/distinfo' XMD5 (grok-1.0.tar.gz) = a4046501b9b0dca3f6079975b8c719bd XSHA256 (grok-1.0.tar.gz) = 17fd62875bfd441d3162037433bb925de3180a04a62d09b054dacc2dc46d8626 XSIZE (grok-1.0.tar.gz) = 28160 END-of-grok/distinfo echo x - grok/Makefile sed 's/^X//' >grok/Makefile << 'END-of-grok/Makefile' X# Ports collection makefile for: grok X# Date created: 07 March 2006 X# Whom: Wesley Shields <wxs@csh.rit.edu> X# X# $FreeBSD$ X# X XPORTNAME= grok XPORTVERSION= 1.0 XCATEGORIES= sysutils XMASTER_SITES= http://www.csh.rit.edu/~psionic/projects/grok/ X XMAINTAINER= wxs@csh.rit.edu XCOMMENT= An expert system for real-time log analysis X XRUN_DEPENDS= ${SITE_PERL}/File/Tail.pm:${PORTSDIR}/devel/p5-File-Tail \ X ${SITE_PERL}/Regexp/Common.pm:${PORTSDIR}/textproc/p5-Regexp-Common \ X ${SITE_PERL}/Parse/RecDescent.pm:${PORTSDIR}/devel/p5-Parse-RecDescent \ X ${SITE_PERL}/Unix/Syslog.pm:${PORTSDIR}/sysutils/p5-Unix-Syslog \ X ${SITE_PERL}/DateTime.pm:${PORTSDIR}/devel/p5-TimeDate X XUSE_PERL5= yes XUSE_RC_SUBR= grok.sh XNO_BUILD= yes X XMAN1= grok.1 X Xdo-install: X ${INSTALL_SCRIPT} ${WRKSRC}/grok ${PREFIX}/bin X ${INSTALL_DATA} ${WRKSRC}/grok.conf ${PREFIX}/etc/grok.conf.sample X ${INSTALL_MAN} ${WRKSRC}/grok.1 ${PREFIX}/man/man1 X Xpost-install: X @if [ ! -f ${PREFIX}/etc/grok.conf ]; then \ X ${CP} -p ${PREFIX}/etc/grok.conf.sample ${PREFIX}/etc/grok.conf ; \ X fi X @${SED} "s|%%PREFIX%%|${PREFIX}|g" ${PKGMESSAGE} X X.include <bsd.port.mk> END-of-grok/Makefile echo c - grok/files mkdir -p grok/files > /dev/null 2>&1 echo x - grok/files/grok.sh.in sed 's/^X//' >grok/files/grok.sh.in << 'END-of-grok/files/grok.sh.in' X#!/bin/sh X X# PROVIDE: grok X# REQUIRE: LOGIN X X# X# Add the following lines to /etc/rc.conf.local or /etc/rc.conf to enable grok: X# grok_enable (bool): Set to "NO" by default. X# Set it to "YES" to enable grok X# grok_config (path): Set to "%%PREFIX%%/etc/grok.conf" by default. X# X X. %%RC_SUBR%% X Xname="grok" Xrcvar=`set_rcvar` X Xload_rc_config $name X X: ${grok_enable="NO"} X: ${grok_config="%%PREFIX%%/etc/grok.conf"} X Xcommand=%%PREFIX%%/bin/grok Xcommand_args="-f $grok_config -b -d" X Xrun_rc_command "$1" END-of-grok/files/grok.sh.in echo x - grok/pkg-message sed 's/^X//' >grok/pkg-message << 'END-of-grok/pkg-message' X============================================================ XYou'll have to edit %%PREFIX%%/etc/grok.conf to your Xliking. Examples and documentation are available at Xgrok(1) and at: X Xhttp://www.csh.rit.edu/~psionic/projects/grok/ X XAlso, modifications to syslog.conf may be necessary. XUsually "user.info /var/log/messages" is enough. X============================================================ END-of-grok/pkg-message exit >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200603072003.k27K3ZeT007760>