svn commit: r371663 - in head/sysutils/logstash: . files
Matthew Seaman
matthew at FreeBSD.org
Wed Oct 29 07:14:47 UTC 2014
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 at 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
+ at sample %%ETCDIR%%/elasticsearch.yml.sample
+ at sample %%ETCDIR%%/logstash.conf.sample
logstash/LICENSE
logstash/README.md
logstash/bin/logstash
More information about the svn-ports-all
mailing list