diff options
author | Renato Botelho <garga@FreeBSD.org> | 2006-03-15 18:39:34 +0800 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2006-03-15 18:39:34 +0800 |
commit | 699b8e120725366ddc4e2d21ee0da9f365d62abd (patch) | |
tree | e573c1a7e2b26e4530b2cde40b9ee86521672f24 /sysutils | |
parent | 7a0ae732aa11b821cec55a53e42c706ae8a8ccdf (diff) | |
download | freebsd-ports-gnome-699b8e120725366ddc4e2d21ee0da9f365d62abd.tar.gz freebsd-ports-gnome-699b8e120725366ddc4e2d21ee0da9f365d62abd.tar.zst freebsd-ports-gnome-699b8e120725366ddc4e2d21ee0da9f365d62abd.zip |
Add grok 1.0, an expert system for real-time log analysis.
PR: ports/94187
Submitted by: Wesley Shields <wxs@csh.rit.edu>
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/Makefile | 1 | ||||
-rw-r--r-- | sysutils/grok/Makefile | 42 | ||||
-rw-r--r-- | sysutils/grok/distinfo | 3 | ||||
-rw-r--r-- | sysutils/grok/files/grok.sh.in | 27 | ||||
-rw-r--r-- | sysutils/grok/files/pkg-message.in | 10 | ||||
-rw-r--r-- | sysutils/grok/pkg-descr | 4 | ||||
-rw-r--r-- | sysutils/grok/pkg-plist | 4 |
7 files changed, 91 insertions, 0 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile index c605d1a04de9..3f5e9276bf07 100644 --- a/sysutils/Makefile +++ b/sysutils/Makefile @@ -219,6 +219,7 @@ SUBDIR += graft SUBDIR += graphicboot SUBDIR += graveman + SUBDIR += grok SUBDIR += growspd SUBDIR += grub SUBDIR += gstopd diff --git a/sysutils/grok/Makefile b/sysutils/grok/Makefile new file mode 100644 index 000000000000..848585cd5c31 --- /dev/null +++ b/sysutils/grok/Makefile @@ -0,0 +1,42 @@ +# Ports collection makefile for: grok +# Date created: 07 March 2006 +# Whom: Wesley Shields <wxs@csh.rit.edu> +# +# $FreeBSD$ +# + +PORTNAME= grok +PORTVERSION= 1.0 +CATEGORIES= sysutils +MASTER_SITES= http://www.csh.rit.edu/~psionic/projects/grok/ + +MAINTAINER= wxs@csh.rit.edu +COMMENT= An expert system for real-time log analysis + +RUN_DEPENDS= ${SITE_PERL}/File/Tail.pm:${PORTSDIR}/devel/p5-File-Tail \ + ${SITE_PERL}/Regexp/Common.pm:${PORTSDIR}/textproc/p5-Regexp-Common \ + ${SITE_PERL}/Parse/RecDescent.pm:${PORTSDIR}/devel/p5-Parse-RecDescent \ + ${SITE_PERL}/${PERL_ARCH}/Unix/Syslog.pm:${PORTSDIR}/sysutils/p5-Unix-Syslog \ + ${SITE_PERL}/Date/Format.pm:${PORTSDIR}/devel/p5-TimeDate + +USE_PERL5= yes +USE_RC_SUBR= grok.sh +NO_BUILD= yes + +SUB_FILES= pkg-message +SUB_LIST= PERL=${PERL} + +MAN1= grok.1 + +do-install: + ${INSTALL_SCRIPT} ${WRKSRC}/grok ${PREFIX}/bin + ${INSTALL_DATA} ${WRKSRC}/grok.conf ${PREFIX}/etc/grok.conf.sample + ${INSTALL_MAN} ${WRKSRC}/grok.1 ${PREFIX}/man/man1 + +post-install: + @if [ ! -f ${PREFIX}/etc/grok.conf ]; then \ + ${CP} -p ${PREFIX}/etc/grok.conf.sample ${PREFIX}/etc/grok.conf ; \ + fi + @${CAT} ${PKGMESSAGE} + +.include <bsd.port.mk> diff --git a/sysutils/grok/distinfo b/sysutils/grok/distinfo new file mode 100644 index 000000000000..c69f09088394 --- /dev/null +++ b/sysutils/grok/distinfo @@ -0,0 +1,3 @@ +MD5 (grok-1.0.tar.gz) = a4046501b9b0dca3f6079975b8c719bd +SHA256 (grok-1.0.tar.gz) = 17fd62875bfd441d3162037433bb925de3180a04a62d09b054dacc2dc46d8626 +SIZE (grok-1.0.tar.gz) = 28160 diff --git a/sysutils/grok/files/grok.sh.in b/sysutils/grok/files/grok.sh.in new file mode 100644 index 000000000000..e0036be5a03e --- /dev/null +++ b/sysutils/grok/files/grok.sh.in @@ -0,0 +1,27 @@ +#!/bin/sh + +# PROVIDE: grok +# REQUIRE: LOGIN + +# +# Add the following lines to /etc/rc.conf.local or /etc/rc.conf to enable grok: +# grok_enable (bool): Set to "NO" by default. +# Set it to "YES" to enable grok +# grok_config (path): Set to "%%PREFIX%%/etc/grok.conf" by default. +# + +. %%RC_SUBR%% + +name="grok" +rcvar=`set_rcvar` + +load_rc_config $name + +: ${grok_enable="NO"} +: ${grok_config="%%PREFIX%%/etc/grok.conf"} + +command_interpreter=%%PERL%% +command=%%PREFIX%%/bin/grok +command_args="-f $grok_config -b -d" + +run_rc_command "$1" diff --git a/sysutils/grok/files/pkg-message.in b/sysutils/grok/files/pkg-message.in new file mode 100644 index 000000000000..37b6ce6a00ab --- /dev/null +++ b/sysutils/grok/files/pkg-message.in @@ -0,0 +1,10 @@ +============================================================ +You'll have to edit %%PREFIX%%/etc/grok.conf to your +liking. Examples and documentation are available at +grok(1) and at: + +http://www.csh.rit.edu/~psionic/projects/grok/ + +Also, modifications to syslog.conf may be necessary. +Usually "user.info /var/log/messages" is enough. +============================================================ diff --git a/sysutils/grok/pkg-descr b/sysutils/grok/pkg-descr new file mode 100644 index 000000000000..28d7d4a9bd1d --- /dev/null +++ b/sysutils/grok/pkg-descr @@ -0,0 +1,4 @@ +An expert system for real-time log analysis that allows for user-defined +actions to happen when a log rule is matched. + +WWW: http://www.csh.rit.edu/~psionic/projects/grok diff --git a/sysutils/grok/pkg-plist b/sysutils/grok/pkg-plist new file mode 100644 index 000000000000..24b56d0b43ca --- /dev/null +++ b/sysutils/grok/pkg-plist @@ -0,0 +1,4 @@ +bin/grok +@unexec if cmp -s %D/etc/grok.conf.sample %D/etc/grok.conf; then rm -f %D/etc/grok.conf; fi +etc/grok.conf.sample +@exec if [ ! -f %D/etc/grok.conf ] ; then cp -p %D/%F %B/grok.conf; fi |