Skip to content

Commit

Permalink
Update filebeat and winlogbeat to 6.4.1 (#296)
Browse files Browse the repository at this point in the history
Our bundled filebeat had a memory leak (elastic/beats#6797).

Fixes #283

While here:
 The "-configtest" option is deprecated since Beats 6.0.
 Add a version switch to avoid warning.
  • Loading branch information
mpfz0r authored and Marius Sturm committed Oct 2, 2018
1 parent b278ceb commit f0d7240
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
8 changes: 7 additions & 1 deletion backends/beats/filebeat/render.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,13 @@ func (fbc *FileBeatConfig) RenderOnChange(response graylog.ResponseCollectorConf
}

func (fbc *FileBeatConfig) ValidateConfigurationFile() bool {
output, err := exec.Command(fbc.ExecPath(), "-configtest", "-c", fbc.ConfigurationPath()).CombinedOutput()
var output []byte
var err error
if fbc.Beats.Version[0] >= 6 {
output, err = exec.Command(fbc.ExecPath(), "test", "config", "-c", fbc.ConfigurationPath()).CombinedOutput()
} else {
output, err = exec.Command(fbc.ExecPath(), "-configtest", "-c", fbc.ConfigurationPath()).CombinedOutput()
}
soutput := string(output)
if err != nil {
log.Errorf("[%s] Error during configuration validation: %s", fbc.Name(), soutput)
Expand Down
8 changes: 7 additions & 1 deletion backends/beats/winlogbeat/render.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,13 @@ func (wlbc *WinLogBeatConfig) RenderOnChange(response graylog.ResponseCollectorC
}

func (wlbc *WinLogBeatConfig) ValidateConfigurationFile() bool {
output, err := exec.Command(wlbc.ExecPath(), "-configtest", "-c", wlbc.ConfigurationPath()).CombinedOutput()
var output []byte
var err error
if wlbc.Beats.Version[0] >= 6 {
output, err = exec.Command(wlbc.ExecPath(), "test", "config", "-c", wlbc.ConfigurationPath()).CombinedOutput()
} else {
output, err = exec.Command(wlbc.ExecPath(), "-configtest", "-c", wlbc.ConfigurationPath()).CombinedOutput()
}
soutput := string(output)
if err != nil {
log.Errorf("[%s] Error during configuration validation: %s", wlbc.Name(), soutput)
Expand Down
4 changes: 2 additions & 2 deletions dist/fetch_collectors.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

ARCHS=( x86 x86_64 )
FILEBEAT_VERSION=6.1.2
WINLOGBEAT_VERSION=6.1.2
FILEBEAT_VERSION=6.4.1
WINLOGBEAT_VERSION=6.4.1

# $1: beat name
# $2: beat operating system
Expand Down

0 comments on commit f0d7240

Please sign in to comment.