update to filebeat-5.3.1

please note the configuration layout has changed between 1.x and 5.x:
https://www.elastic.co/guide/en/beats/libbeat/5.0/upgrading-1-to-5.html

also tested by sebastia@
This commit is contained in:
jasper 2017-04-27 09:14:40 +00:00
parent 2be25940e8
commit a2cab4de9f
8 changed files with 53 additions and 26 deletions

View File

@ -1,16 +1,20 @@
# $OpenBSD: Makefile,v 1.7 2016/10/10 17:28:56 jasper Exp $
# $OpenBSD: Makefile,v 1.8 2017/04/27 09:14:40 jasper Exp $
COMMENT = lightweight shipper for log file data
BEAT = filebeat
VERSION = 1.3.1
VERSION = 5.3.1
GH_ACCOUNT = elastic
GH_PROJECT = beats
GH_TAGNAME = v${VERSION}
CONFIGS = filebeat.yml filebeat.template.json README.md
CONFIGS = filebeat.yml filebeat.template.json \
filebeat.template-es2x.json README.md
WANTLIB += c pthread
pre-configure:
cp -R ${WRKDIST}/metricbeat/ ${WRKSRC}/../
.include <bsd.port.mk>

View File

@ -1,2 +1,2 @@
SHA256 (beats-1.3.1.tar.gz) = HY5BtCoLLdWUA3lf8Hy/2KmnZHdzHDgSKqkkK0ewVOA=
SIZE (beats-1.3.1.tar.gz) = 10225540
SHA256 (beats-5.3.1.tar.gz) = OSxkf9Ok/UC3DZEZUPOMD9ZaOtS7hUj80K/XfAHTHZ4=
SIZE (beats-5.3.1.tar.gz) = 17594920

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-filebeat_etc_filebeat_yml,v 1.1.1.1 2016/04/26 13:08:03 jasper Exp $
--- filebeat/aetc/filebeat.yml.orig Tue Apr 26 12:37:43 2016
+++ filebeat/etc/filebeat.yml Tue Apr 26 12:38:03 2016
@@ -161,7 +161,7 @@ filebeat:
# Name of the registry file. Per default it is put in the current working
# directory. In case the working directory is changed after when running
# filebeat again, indexing starts from the beginning again.
- #registry_file: .filebeat
+ registry_file: /var/db/filebeat/.filebeat
# Full Path to directory with additional prospector configuration files. Each file must end with .yml
# These config files must have the full filebeat config part inside, but only

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-filebeat_filebeat_yml,v 1.1 2017/04/27 09:14:40 jasper Exp $
--- filebeat/filebeat.yml.orig Wed Jan 11 14:57:52 2017
+++ filebeat/filebeat.yml Wed Jan 11 14:59:23 2017
@@ -20,6 +20,8 @@ filebeat.prospectors:
# Paths that should be crawled and fetched. Glob based paths.
paths:
- /var/log/*.log
+ - /var/log/authlog
+ - /var/log/daemon
#- c:\programdata\elasticsearch\logs\*
# Exclude lines. A list of regular expressions to match. It drops the lines that are

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-libbeat_outputs_console_console_go,v 1.1 2017/04/27 09:14:40 jasper Exp $
From d007dd3c25ff081f58a757c545dd95111b1a016e Mon Sep 17 00:00:00 2001
From: glefloch <glfloch@gmail.com>
Date: Wed, 19 Apr 2017 10:56:47 +0200
Subject: [PATCH 1/2] fix missing return
--- libbeat/outputs/console/console.go.orig Mon Apr 24 19:21:44 2017
+++ libbeat/outputs/console/console.go Mon Apr 24 19:21:56 2017
@@ -78,6 +78,7 @@ func (c *console) PublishEvent(
}
op.SigCompleted(s)
+ return nil
fail:
if opts.Guaranteed {
logp.Critical("Unable to publish events to console: %v", err)

View File

@ -1,11 +1,15 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2016/04/26 13:08:03 jasper Exp $
@comment $OpenBSD: PLIST,v 1.2 2017/04/27 09:14:40 jasper Exp $
@bin bin/filebeat
share/doc/pkg-readmes/${FULLPKGNAME}
share/examples/filebeat/
@sample ${SYSCONFDIR}/filebeat/
share/examples/filebeat/README.md
share/examples/filebeat/filebeat.template-es2x.json
@sample ${SYSCONFDIR}/filebeat/filebeat.template-es2x.json
share/examples/filebeat/filebeat.template.json
@sample ${SYSCONFDIR}/filebeat/filebeat.template.json
share/examples/filebeat/filebeat.yml
@sample ${SYSCONFDIR}/filebeat/filebeat.yml
share/filebeat/
share/filebeat/migrate_beat_config_1_x_to_5_0.py
@rcscript ${RCDIR}/filebeat

View File

@ -1,4 +1,4 @@
$OpenBSD: README,v 1.1.1.1 2016/04/26 13:08:03 jasper Exp $
$OpenBSD: README,v 1.2 2017/04/27 09:14:40 jasper Exp $
+-----------------------------------------------------------------------
| Running ${FULLPKGNAME} on OpenBSD
@ -10,10 +10,16 @@ If Filebeat will be shipping directly into ElasticSearch, the index
template needs to be loaded into the cluster first:
curl -XPUT 'http://localhost:9200/_template/filebeat?pretty' \
-d@${SYSCONFDIR/filebeat/filebeat.template.json
-d@${SYSCONFDIR}/filebeat/filebeat.template.json
Replace `localhost` and `9200` if required by your setup.
Migrating from Filebeat 1.x
===========================
The configuration file layout has changed from beats 1.x to 5.x,
please refer to the upstream documentation at
https://www.elastic.co/guide/en/beats/libbeat/5.0/upgrading-1-to-5.html
Migrating from Logstash Forwarder
=================================
When migrating from logstash-forwarder to filebeat, please review this

View File

@ -1,17 +1,13 @@
#!/bin/sh
#
# $OpenBSD: filebeat.rc,v 1.1.1.1 2016/04/26 13:08:03 jasper Exp $
# $OpenBSD: filebeat.rc,v 1.2 2017/04/27 09:14:40 jasper Exp $
daemon="${PREFIX}/bin/filebeat"
daemon_flags="-c ${SYSCONFDIR}/filebeat/filebeat.yml"
daemon_flags="-path.config ${SYSCONFDIR}/filebeat"
. /etc/rc.d/rc.subr
rc_bg=YES
rc_reload=NO
rc_pre() {
install -d -o root -m 0700 /var/db/filebeat
}
rc_cmd $1