From owner-svn-ports-head@FreeBSD.ORG Wed Oct 29 07:14:47 2014 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1D1276F9; Wed, 29 Oct 2014 07:14:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F1D76B9B; Wed, 29 Oct 2014 07:14:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9T7EkEo061872; Wed, 29 Oct 2014 07:14:46 GMT (envelope-from matthew@FreeBSD.org) Received: (from matthew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9T7Ekev061868; Wed, 29 Oct 2014 07:14:46 GMT (envelope-from matthew@FreeBSD.org) Message-Id: <201410290714.s9T7Ekev061868@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: matthew set sender to matthew@FreeBSD.org using -f From: Matthew Seaman Date: Wed, 29 Oct 2014 07:14:46 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r371663 - in head/sysutils/logstash: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Oct 2014 07:14:47 -0000 Author: matthew Date: Wed Oct 29 07:14:45 2014 New Revision: 371663 URL: https://svnweb.freebsd.org/changeset/ports/371663 QAT: https://qat.redports.org/buildarchive/r371663/ Log: Fix handling of config files. PR: 194670 Submitted by: enrico.m.crisostomo@gmail.com (maintainer) Deleted: head/sysutils/logstash/files/elasticsearch.yml head/sysutils/logstash/files/logstash.conf Modified: head/sysutils/logstash/Makefile head/sysutils/logstash/files/logstash.conf.sample head/sysutils/logstash/pkg-plist Modified: head/sysutils/logstash/Makefile ============================================================================== --- head/sysutils/logstash/Makefile Wed Oct 29 07:00:11 2014 (r371662) +++ head/sysutils/logstash/Makefile Wed Oct 29 07:14:45 2014 (r371663) @@ -3,6 +3,7 @@ PORTNAME= logstash PORTVERSION= 1.4.2 +PORTREVISION= 1 CATEGORIES= sysutils java MASTER_SITES= https://download.elasticsearch.org/logstash/logstash/:0 \ https://github.com/emcrisostomo/jnr-ffi/releases/download/2.0.0/:1 @@ -56,8 +57,7 @@ do-install: ${MKDIR} ${STAGEDIR}${LOGSTASH_DATA_DIR} @(cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${LOGSTASH_DIR}) ${INSTALL_DATA} ${FILESDIR}/logstash.conf.sample ${STAGEDIR}${ETCDIR} - ${INSTALL_DATA} ${FILESDIR}/logstash.conf ${STAGEDIR}${ETCDIR} - ${INSTALL_DATA} ${FILESDIR}/elasticsearch.yml ${STAGEDIR}${ETCDIR} + ${INSTALL_DATA} ${FILESDIR}/elasticsearch.yml.sample ${STAGEDIR}${ETCDIR} .for x in ${LOGSTASH_BIN_FILES} @${CHMOD} ${BINMODE} ${STAGEDIR}${LOGSTASH_DIR}/bin/${x} .endfor Modified: head/sysutils/logstash/files/logstash.conf.sample ============================================================================== --- head/sysutils/logstash/files/logstash.conf.sample Wed Oct 29 07:00:11 2014 (r371662) +++ head/sysutils/logstash/files/logstash.conf.sample Wed Oct 29 07:14:45 2014 (r371663) @@ -2,52 +2,54 @@ input { file { type => "syslog" - # # Wildcards work, here :) - # path => [ "/var/log/*.log", "/var/log/messages", "/var/log/syslog" ] - path => "/var/log/messages" - start_position => "beginning" + # path => [ "/var/log/*.log", "/var/log/messages", "/var/log/syslog" ] + path => "/var/log/messages" + start_position => "beginning" } } filter { - if [type] == "syslog" { - grok { - match => { "message" => "%{SYSLOGTIMESTAMP:syslog_timestamp} %{SYSLOGHOST:syslog_hostname} (%{DATA:syslog_program}(?:\[%{POSINT:syslog_pid}\])?: %{GREEDYDATA:syslog_message}|%{GREEDYDATA:syslog_message})" } - add_field => [ "received_at", "%{@timestamp}" ] - add_field => [ "received_from", "%{@source_host}" ] - } - - if !("_grokparsefailure" in [tags]) { - mutate { - replace => [ "@source_host", "%{syslog_hostname}" ] - replace => [ "@message", "%{syslog_message}" ] - } - } - mutate { - remove_field => [ "syslog_hostname", "syslog_message" ] - } - date { - match => [ "syslog_timestamp","MMM d HH:mm:ss", "MMM dd HH:mm:ss", "ISO8601" ] - } - syslog_pri { } - } +# An filter may change the regular expression used to match a record or a field, +# alter the value of parsed fields, add or remove fields, etc. +# +# if [type] == "syslog" { +# grok { +# match => { "message" => "%{SYSLOGTIMESTAMP:syslog_timestamp} %{SYSLOGHOST:syslog_hostname} (%{DATA:syslog_program}(?:\[%{POSINT:syslog_pid}\])?: %{GREEDYDATA:syslog_message}|%{GREEDYDATA:syslog_message})" } +# add_field => [ "received_at", "%{@timestamp}" ] +# add_field => [ "received_from", "%{@source_host}" ] +# } +# +# if !("_grokparsefailure" in [tags]) { +# mutate { +# replace => [ "@source_host", "%{syslog_hostname}" ] +# replace => [ "@message", "%{syslog_message}" ] +# } +# } +# mutate { +# remove_field => [ "syslog_hostname", "syslog_message" ] +# } +# date { +# match => [ "syslog_timestamp","MMM d HH:mm:ss", "MMM dd HH:mm:ss", "ISO8601" ] +# } +# syslog_pri { } +# } } output { - # Emit events to stdout for easy debugging of what is going through - # logstash. - #stdout { debug => "true" } + # Emit events to stdout for easy debugging of what is going through + # logstash. + # stdout { debug => "true" } - # This will use elasticsearch to store your logs. - # The 'embedded' option will cause logstash to run the elasticsearch - # server in the same process, so you don't have to worry about - # how to download, configure, or run elasticsearch! - elasticsearch { - embedded => true - #embedded_http_port => 9200 - #cluster => elasticsearch - #host => host - #port => port - - } + # This will use elasticsearch to store your logs. + # The 'embedded' option will cause logstash to run the elasticsearch + # server in the same process, so you don't have to worry about + # how to download, configure, or run elasticsearch! + elasticsearch { + embedded => true + host => "127.0.0.1" + # embedded_http_port => 9200 + # cluster => elasticsearch + # host => host + # port => port + } } Modified: head/sysutils/logstash/pkg-plist ============================================================================== --- head/sysutils/logstash/pkg-plist Wed Oct 29 07:00:11 2014 (r371662) +++ head/sysutils/logstash/pkg-plist Wed Oct 29 07:14:45 2014 (r371663) @@ -1,6 +1,5 @@ -%%ETCDIR%%/elasticsearch.yml -%%ETCDIR%%/logstash.conf -%%ETCDIR%%/logstash.conf.sample +@sample %%ETCDIR%%/elasticsearch.yml.sample +@sample %%ETCDIR%%/logstash.conf.sample logstash/LICENSE logstash/README.md logstash/bin/logstash