Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update gosigar package after fix #24502

Merged
merged 78 commits into from
Mar 18, 2021
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
938e66c
mofidy doc
narph Jul 23, 2020
4daef08
Merge branch 'master' of github.com:elastic/beats
narph Aug 3, 2020
b613178
Merge branch 'master' of github.com:elastic/beats
narph Aug 4, 2020
05364cf
Merge branch 'master' of github.com:elastic/beats
narph Aug 4, 2020
f147c4d
Merge branch 'master' of github.com:elastic/beats
narph Aug 4, 2020
4574718
Merge branch 'master' of github.com:elastic/beats
narph Aug 17, 2020
1e43077
Merge branch 'master' of github.com:elastic/beats
narph Aug 19, 2020
807cf06
Merge branch 'master' of github.com:elastic/beats
narph Aug 24, 2020
2096668
Merge branch 'master' of github.com:elastic/beats
narph Aug 27, 2020
da8ac1f
Merge branch 'master' of github.com:elastic/beats
narph Aug 27, 2020
c2d8930
Merge branch 'master' of github.com:elastic/beats
narph Aug 27, 2020
7bd9e73
Merge branch 'master' of github.com:elastic/beats
narph Aug 31, 2020
6e89a84
Merge branch 'master' of github.com:elastic/beats
narph Aug 31, 2020
bdf21e9
Merge branch 'master' of github.com:elastic/beats
narph Sep 2, 2020
7833687
Merge branch 'master' of github.com:elastic/beats
narph Sep 3, 2020
bbf6178
Merge branch 'master' of github.com:elastic/beats
narph Sep 4, 2020
4ba8817
Merge branch 'master' of github.com:elastic/beats
narph Sep 7, 2020
0cba5dc
Merge branch 'master' of github.com:elastic/beats
narph Sep 8, 2020
b2625ca
Merge branch 'master' of github.com:elastic/beats
narph Sep 8, 2020
5100e6a
Merge branch 'master' of github.com:elastic/beats
narph Sep 9, 2020
a302d31
Merge branch 'master' of github.com:elastic/beats
narph Sep 14, 2020
631d667
Merge branch 'master' of github.com:elastic/beats
narph Sep 15, 2020
35072a5
Merge branch 'master' of github.com:elastic/beats
narph Sep 17, 2020
4b2f87a
Merge branch 'master' of github.com:elastic/beats
narph Sep 22, 2020
f26b533
Merge branch 'master' of github.com:elastic/beats
narph Sep 28, 2020
c61620d
Merge branch 'master' of github.com:elastic/beats
narph Sep 28, 2020
43f90c4
Merge branch 'master' of github.com:elastic/beats
narph Sep 30, 2020
2d28f07
Merge branch 'master' of github.com:elastic/beats
narph Oct 1, 2020
0a42bbe
Merge branch 'master' of github.com:elastic/beats
narph Oct 2, 2020
0bedffe
Merge branch 'master' of github.com:elastic/beats
narph Oct 5, 2020
2eb7142
Merge branch 'master' of github.com:elastic/beats
narph Oct 5, 2020
f9e4522
Merge branch 'master' of github.com:elastic/beats
narph Oct 12, 2020
227bd50
Merge branch 'master' of github.com:elastic/beats
narph Oct 15, 2020
6e39971
Merge branch 'master' of github.com:elastic/beats
narph Oct 19, 2020
0e85625
Merge branch 'master' of github.com:elastic/beats
narph Oct 19, 2020
6770f2d
Merge branch 'master' of github.com:elastic/beats
narph Oct 20, 2020
63ab6a7
Merge branch 'master' of github.com:elastic/beats
narph Oct 26, 2020
6358eb8
Merge branch 'master' of github.com:elastic/beats
narph Oct 27, 2020
8a9c382
Merge branch 'master' of github.com:elastic/beats
narph Oct 28, 2020
70f5f0e
Merge branch 'master' of github.com:elastic/beats
narph Oct 28, 2020
81e66b5
Merge branch 'master' of github.com:elastic/beats
narph Oct 29, 2020
6f0f8d0
Merge branch 'master' of github.com:elastic/beats
narph Oct 29, 2020
9c328e4
Merge branch 'master' of github.com:elastic/beats
narph Oct 30, 2020
a4aba6b
Merge branch 'master' of github.com:elastic/beats
narph Nov 3, 2020
3642912
Merge branch 'master' of github.com:elastic/beats
narph Nov 4, 2020
6c2a9b6
Merge branch 'master' of github.com:elastic/beats
narph Nov 4, 2020
149efa3
Merge branch 'master' of github.com:elastic/beats
narph Nov 12, 2020
8967d9f
Merge branch 'master' of github.com:elastic/beats
narph Nov 16, 2020
4c29c98
Merge branch 'master' of github.com:elastic/beats
narph Nov 25, 2020
4c603df
work on fix
narph Mar 11, 2021
002f04e
update changelog
narph Mar 11, 2021
eb29434
Merge branch 'master' of github.com:elastic/beats
narph Mar 11, 2021
db412e1
update notice
narph Mar 11, 2021
8921b11
Update notice
jsoriano Mar 11, 2021
906da39
[Ingest Manager] Sync on rename on windows (#24504)
michalpristas Mar 11, 2021
2fe530d
Add tests for encoding settings of filestream input (#24426)
kvch Mar 11, 2021
92d9d08
[Elastic Agent] Add the ability to provide custom CA's inside of dock…
blakerouse Mar 11, 2021
c1f8f03
Update Golang to 1.15.9 (#24442)
kvch Mar 11, 2021
103f5a2
Add syntax for multiple selector logging (#24207) (#24497)
Mar 11, 2021
8fd1481
chore(ci): use beat_version instead of PR version (#24446)
mdelapenya Mar 11, 2021
42e410f
Add test for close.reader.after_interval to filestream input (#24423)
kvch Mar 11, 2021
6db3b26
Refactor use of system.hostfs to fix cgroup metrics (#24334)
fearful-symmetry Mar 11, 2021
e16ffe1
[Elastic Agent] Add verification check when updating communication to…
blakerouse Mar 12, 2021
64769e9
Fix typo in mqtt input docs (#24509)
dedemorton Mar 12, 2021
6799f04
Update input-http-endpoint.asciidoc (#24490)
dedemorton Mar 12, 2021
1b9a88f
[Ingest Manager] Move logging defaults to agent (#24535)
michalpristas Mar 15, 2021
f29add3
Clarify that the Tomcat module is for ingesting access logs (#24543)
AndyHunt66 Mar 15, 2021
4b9bf5d
Merge branch 'master' into update-gosigar
narph Mar 16, 2021
484a832
Merge branch 'master' of github.com:elastic/beats
narph Mar 17, 2021
74bf93f
[Auditbeat] btmp offset check (#24515)
leehinman Mar 15, 2021
6b8e692
[Heartbeat] Produce error rather than panic on missing source (#24404)
andrewvc Mar 16, 2021
bbd532d
Fix default scope in add_nomad_metadata (#24559)
jsoriano Mar 16, 2021
b7b2a16
[Filebeat] Add Dashboards to Threat Intel Module (#24488)
peasead Mar 17, 2021
38f2876
[CI] bump gvm version and use the binary (#24571)
v1v Mar 17, 2021
06a5919
[CI] Add resilience when installing required tooling (#24542)
v1v Mar 17, 2021
b9f3210
[CI] enable new flaky detector (#24464)
v1v Mar 17, 2021
f45625f
chore: do not pass beat version (#24586)
mdelapenya Mar 17, 2021
749dcbe
Merge branch 'master' into update-gosigar
narph Mar 17, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .ci/packaging.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -429,13 +429,11 @@ def triggerE2ETests(String suite) {
booleanParam(name: 'notifyOnGreenBuilds', value: !isPR()),
booleanParam(name: 'BEATS_USE_CI_SNAPSHOTS', value: true),
string(name: 'runTestsSuites', value: suite),
string(name: 'BEAT_VERSION', value: env.BEAT_VERSION),
string(name: 'GITHUB_CHECK_NAME', value: env.GITHUB_CHECK_E2E_TESTS_NAME),
string(name: 'GITHUB_CHECK_REPO', value: env.REPO),
string(name: 'GITHUB_CHECK_SHA1', value: env.GIT_BASE_COMMIT),
]
if (isPR()) {
kuisathaverat marked this conversation as resolved.
Show resolved Hide resolved
parameters.push(string(name: 'BEAT_VERSION', value: "pr-${env.CHANGE_ID}"))
}

build(job: "${e2eTestsPipeline}",
parameters: parameters,
Expand Down
2 changes: 1 addition & 1 deletion .go-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.15.8
1.15.9
1 change: 1 addition & 0 deletions CHANGELOG-developer.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,4 @@ The list below covers the major changes between 7.0.0-rc2 and master only.
- Add support for customized monitoring API. {pull}22605[22605]
- Update Go version to 1.15.7. {pull}22495[22495]
- Update Go version to 1.15.8. {pull}23955[23955]
- Update Go version to 1.15.9. {pull}24442[24442]
3 changes: 3 additions & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,8 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- Fix panic due to unhandled DeletedFinalStateUnknown in k8s OnDelete {pull}23419[23419]
- Fix error loop with runaway CPU use when the Kafka output encounters some connection errors {pull}23484[23484]
- Allow configuring credential_profile_name and shared_credential_file when using role_arn. {pull}24174[24174]
- Fix issue discovering docker containers and metadata after reconnections {pull}24318[24318]
- Allow cgroup self-monitoring to see alternate `hostfs` paths {pull}24334[24334]

*Auditbeat*

Expand Down Expand Up @@ -518,6 +520,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- Add system.hostfs configuration option for system module. {pull}23831[23831]
- Fix GCP not able to request Cloudfunctions metrics if a region filter was set {pull}24218[24218]
- Fix type of `uwsgi.status.worker.rss` type. {pull}24468[24468]
- Ignore unsupported derive types for filesystem metricset. {issue}22501[22501] {pull}24502[24502]

*Packetbeat*

Expand Down
4 changes: 2 additions & 2 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8299,11 +8299,11 @@ Contents of probable licence file $GOMODCACHE/github.com/elastic/[email protected]/

--------------------------------------------------------------------------------
Dependency : github.com/elastic/gosigar
Version: v0.14.0
Version: v0.14.1
Licence type (autodetected): Apache-2.0
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/elastic/[email protected].0/LICENSE:
Contents of probable licence file $GOMODCACHE/github.com/elastic/[email protected].1/LICENSE:

Apache License
Version 2.0, January 2004
Expand Down
2 changes: 1 addition & 1 deletion auditbeat/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.15.8
FROM golang:1.15.9

RUN \
apt-get update \
Expand Down
2 changes: 1 addition & 1 deletion filebeat/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.15.8
FROM golang:1.15.9

RUN \
apt-get update \
Expand Down
2 changes: 1 addition & 1 deletion filebeat/docs/inputs/input-mqtt.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Example configuration:

<1> `hosts` are required.

<2> `paths` are required.
<2> `topics` are required.

All other settings are optional.

Expand Down
2 changes: 1 addition & 1 deletion filebeat/docs/modules/tomcat.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This file is generated! See scripts/docs_collector.py

experimental[]

This is a module for receiving Apache Tomcat logs over Syslog or a file.
This is a module for receiving Apache Tomcat access logs over Syslog or a file.

include::../include/gs-link.asciidoc[]

Expand Down
4 changes: 2 additions & 2 deletions filebeat/input/filestream/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (

// Config stores the options of a file stream.
type config struct {
readerConfig
Reader readerConfig `config:",inline"`

Paths []string `config:"paths"`
Close closerConfig `config:"close"`
Expand Down Expand Up @@ -79,7 +79,7 @@ type backoffConfig struct {

func defaultConfig() config {
return config{
readerConfig: defaultReaderConfig(),
Reader: defaultReaderConfig(),
Paths: []string{},
Close: defaultCloserConfig(),
CleanInactive: 0,
Expand Down
37 changes: 13 additions & 24 deletions filebeat/input/filestream/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,8 @@ type fileMeta struct {
// are actively written by other applications.
type filestream struct {
readerConfig readerConfig
bufferSize int
tailFile bool // TODO
encodingFactory encoding.EncodingFactory
encoding encoding.Encoding
lineTerminator readfile.LineTerminator
excludeLines []match.Matcher
includeLines []match.Matcher
maxBytes int
closerConfig closerConfig
}

Expand Down Expand Up @@ -97,9 +91,9 @@ func configure(cfg *common.Config) (loginp.Prospector, loginp.Harvester, error)
return nil, nil, fmt.Errorf("error while creating file identifier: %v", err)
}

encodingFactory, ok := encoding.FindEncoding(config.Encoding)
encodingFactory, ok := encoding.FindEncoding(config.Reader.Encoding)
if !ok || encodingFactory == nil {
return nil, nil, fmt.Errorf("unknown encoding('%v')", config.Encoding)
return nil, nil, fmt.Errorf("unknown encoding('%v')", config.Reader.Encoding)
}

prospector := &fileProspector{
Expand All @@ -111,13 +105,8 @@ func configure(cfg *common.Config) (loginp.Prospector, loginp.Harvester, error)
}

filestream := &filestream{
readerConfig: config.readerConfig,
bufferSize: config.BufferSize,
readerConfig: config.Reader,
encodingFactory: encodingFactory,
lineTerminator: config.LineTerminator,
excludeLines: config.ExcludeLines,
includeLines: config.IncludeLines,
maxBytes: config.MaxBytes,
closerConfig: config.Close,
}

Expand Down Expand Up @@ -191,7 +180,7 @@ func (inp *filestream) open(log *logp.Logger, canceler input.Canceler, path stri
return nil, err
}

log.Debug("newLogFileReader with config.MaxBytes:", inp.maxBytes)
log.Debug("newLogFileReader with config.MaxBytes:", inp.readerConfig.MaxBytes)

// TODO: NewLineReader uses additional buffering to deal with encoding and testing
// for new lines in input stream. Simple 8-bit based encodings, or plain
Expand All @@ -211,22 +200,22 @@ func (inp *filestream) open(log *logp.Logger, canceler input.Canceler, path stri
// for the worst case scenario where incoming UTF32 charchers are decoded to the single byte UTF-8 characters.
// This limit serves primarily to avoid memory bload or potential OOM with expectedly long lines in the file.
// The further size limiting is performed by LimitReader at the end of the readers pipeline as needed.
encReaderMaxBytes := inp.maxBytes * 4
encReaderMaxBytes := inp.readerConfig.MaxBytes * 4

var r reader.Reader
r, err = readfile.NewEncodeReader(dbgReader, readfile.Config{
Codec: inp.encoding,
BufferSize: inp.bufferSize,
Terminator: inp.lineTerminator,
BufferSize: inp.readerConfig.BufferSize,
Terminator: inp.readerConfig.LineTerminator,
MaxBytes: encReaderMaxBytes,
})
if err != nil {
f.Close()
return nil, err
}

r = readfile.NewStripNewline(r, inp.lineTerminator)
r = readfile.NewLimitReader(r, inp.maxBytes)
r = readfile.NewStripNewline(r, inp.readerConfig.LineTerminator)
r = readfile.NewLimitReader(r, inp.readerConfig.MaxBytes)

return r, nil
}
Expand Down Expand Up @@ -335,14 +324,14 @@ func (inp *filestream) readFromSource(
// isDroppedLine decides if the line is exported or not based on
// the include_lines and exclude_lines options.
func (inp *filestream) isDroppedLine(log *logp.Logger, line string) bool {
if len(inp.includeLines) > 0 {
if !matchAny(inp.includeLines, line) {
if len(inp.readerConfig.IncludeLines) > 0 {
if !matchAny(inp.readerConfig.IncludeLines, line) {
log.Debug("Drop line as it does not match any of the include patterns %s", line)
return true
}
}
if len(inp.excludeLines) > 0 {
if matchAny(inp.excludeLines, line) {
if len(inp.readerConfig.ExcludeLines) > 0 {
if matchAny(inp.readerConfig.ExcludeLines, line) {
log.Debug("Drop line as it does match one of the exclude patterns%s", line)
return true
}
Expand Down
110 changes: 110 additions & 0 deletions filebeat/input/filestream/input_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,17 @@
package filestream

import (
"bytes"
"context"
"os"
"runtime"
"testing"

"github.com/stretchr/testify/require"
"golang.org/x/text/encoding"
"golang.org/x/text/encoding/unicode"
"golang.org/x/text/transform"

loginp "github.com/elastic/beats/v7/filebeat/input/filestream/internal/input-logfile"
)

Expand Down Expand Up @@ -201,3 +207,107 @@ func TestFilestreamEmptyLinesOnly(t *testing.T) {

env.requireNoEntryInRegistry(testlogName)
}

// test_bom_utf8 from test_harvester.py
func TestFilestreamBOMUTF8(t *testing.T) {
env := newInputTestingEnvironment(t)

testlogName := "test.log"
inp := env.mustCreateInput(map[string]interface{}{
"paths": []string{env.abspath(testlogName)},
})

ctx, cancelInput := context.WithCancel(context.Background())
env.startInput(ctx, inp)

// BOM: 0xEF,0xBB,0xBF
lines := append([]byte{0xEF, 0xBB, 0xBF}, []byte(`#Software: Microsoft Exchange Server
#Version: 14.0.0.0
#Log-type: Message Tracking Log
#Date: 2016-04-05T00:00:02.052Z
#Fields: date-time,client-ip,client-hostname,server-ip,server-hostname,source-context,connector-id,source,event-id,internal-message-id,message-id,recipient-address,recipient-status,total-bytes,recipient-count,related-recipient-address,reference,message-subject,sender-address,return-path,message-info,directionality,tenant-id,original-client-ip,original-server-ip,custom-data
2016-04-05T00:00:02.052Z,,,,,"MDB:61914740-3f1b-4ddb-94e0-557196870cfa, Mailbox:279f077c-216f-4323-a9ee-48e50ffd3cad, Event:269492708, MessageClass:IPM.Note.StorageQuotaWarning.Warning, CreationTime:2016-04-05T00:00:01.022Z, ClientType:System",,STOREDRIVER,NOTIFYMAPI,,,,,,,,,,,,,,,,,S:ItemEntryId=00-00-00-00-37-DB-F9-F9-B5-F2-42-4F-86-62-E6-5D-FC-0C-A1-41-07-00-0E-D6-03-16-80-DC-8C-44-9D-30-07-23-ED-71-B7-F7-00-00-1F-D4-B5-0E-00-00-2E-EF-F2-59-0E-E8-2D-46-BC-31-02-85-0D-67-98-43-00-00-37-4A-A3-B3-00-00
2016-04-05T00:00:02.145Z,,,,,"MDB:61914740-3f1b-4ddb-94e0-557196870cfa, Mailbox:49cb09c6-5b76-415d-a085-da0ad9079682, Event:269492711, MessageClass:IPM.Note.StorageQuotaWarning.Warning, CreationTime:2016-04-05T00:00:01.038Z, ClientType:System",,STOREDRIVER,NOTIFYMAPI,,,,,,,,,,,,,,,,,S:ItemEntryId=00-00-00-00-97-8F-07-43-51-44-61-4A-AD-BD-29-D4-97-4E-20-A0-07-00-0E-D6-03-16-80-DC-8C-44-9D-30-07-23-ED-71-B7-F7-00-8E-8F-BD-EB-57-00-00-3D-FB-CE-26-A4-8D-46-4C-A4-35-0F-A7-9B-FA-D7-B9-00-00-37-44-2F-CA-00-00
`)...)
env.mustWriteLinesToFile(testlogName, lines)

env.waitUntilEventCount(7)

cancelInput()
env.waitUntilInputStops()

messages := env.getOutputMessages()
require.Equal(t, messages[0], "#Software: Microsoft Exchange Server")
}

// test_boms from test_harvester.py
func TestFilestreamUTF16BOMs(t *testing.T) {
encodings := map[string]encoding.Encoding{
"utf-16be-bom": unicode.UTF16(unicode.BigEndian, unicode.UseBOM),
"utf-16le-bom": unicode.UTF16(unicode.LittleEndian, unicode.UseBOM),
}

for name, enc := range encodings {
name := name
encoder := enc.NewEncoder()
t.Run(name, func(t *testing.T) {
env := newInputTestingEnvironment(t)

testlogName := "test.log"
inp := env.mustCreateInput(map[string]interface{}{
"paths": []string{env.abspath(testlogName)},
"encoding": name,
})

ctx, cancelInput := context.WithCancel(context.Background())
env.startInput(ctx, inp)

line := []byte("first line\n")
buf := bytes.NewBuffer(nil)
writer := transform.NewWriter(buf, encoder)
writer.Write(line)
writer.Close()

env.mustWriteLinesToFile(testlogName, buf.Bytes())

env.waitUntilEventCount(1)

env.requireEventsReceived([]string{"first line"})

cancelInput()
env.waitUntilInputStops()
})
}
}

// test_close_timeout from test_harvester.py
func TestFilestreamCloseTimeout(t *testing.T) {
env := newInputTestingEnvironment(t)

testlogName := "test.log"
inp := env.mustCreateInput(map[string]interface{}{
"paths": []string{env.abspath(testlogName)},
"prospector.scanner.check_interval": "24h",
"close.on_state_change.check_interval": "100ms",
"close.reader.after_interval": "500ms",
})

testlines := []byte("first line\n")
env.mustWriteLinesToFile(testlogName, testlines)

ctx, cancelInput := context.WithCancel(context.Background())
env.startInput(ctx, inp)

env.waitUntilEventCount(1)
env.requireOffsetInRegistry(testlogName, len(testlines))
env.waitUntilHarvesterIsDone()

env.mustWriteLinesToFile(testlogName, []byte("first line\nsecond log line\n"))

env.waitUntilEventCount(1)

cancelInput()
env.waitUntilInputStops()

env.requireOffsetInRegistry(testlogName, len(testlines))
}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ require (
github.com/elastic/go-txfile v0.0.7
github.com/elastic/go-ucfg v0.8.3
github.com/elastic/go-windows v1.0.1 // indirect
github.com/elastic/gosigar v0.14.0
github.com/elastic/gosigar v0.14.1
github.com/fatih/color v1.9.0
github.com/fsnotify/fsevents v0.1.1
github.com/fsnotify/fsnotify v1.4.9
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,8 @@ github.com/elastic/go-ucfg v0.8.3/go.mod h1:iaiY0NBIYeasNgycLyTvhJftQlQEUO2hpF+F
github.com/elastic/go-windows v1.0.0/go.mod h1:TsU0Nrp7/y3+VwE82FoZF8gC/XFg/Elz6CcloAxnPgU=
github.com/elastic/go-windows v1.0.1 h1:AlYZOldA+UJ0/2nBuqWdo90GFCgG9xuyw9SYzGUtJm0=
github.com/elastic/go-windows v1.0.1/go.mod h1:FoVvqWSun28vaDQPbj2Elfc0JahhPB7WQEGa3c814Ss=
github.com/elastic/gosigar v0.14.0 h1:5w470Q8AagzVY8U48ab8rVkQrOXiIK1NHBYWrAxi9kI=
github.com/elastic/gosigar v0.14.0/go.mod h1:iXRIGg2tLnu7LBdpqzyQfGDEidKCfWcCMS0WKyPWoMs=
github.com/elastic/gosigar v0.14.1 h1:T0aQ7n/n2ZA9W7DmAnj60v+qzqKERdBgJBO1CG2W6rc=
github.com/elastic/gosigar v0.14.1/go.mod h1:iXRIGg2tLnu7LBdpqzyQfGDEidKCfWcCMS0WKyPWoMs=
github.com/elastic/sarama v1.19.1-0.20210120173147-5c8cb347d877 h1:C9LsbipColsz04JKpKoLlp0pgMJRLq2uXVTeKRDcNcY=
github.com/elastic/sarama v1.19.1-0.20210120173147-5c8cb347d877/go.mod h1:g5s5osgELxgM+Md9Qni9rzo7Rbt+vvFQI4bt/Mc93II=
github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153 h1:yUdfgN0XgIJw7foRItutHYUIhlcKzcSf5vDpdhQAKTc=
Expand Down
2 changes: 1 addition & 1 deletion heartbeat/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.15.8
FROM golang:1.15.9

RUN \
apt-get update \
Expand Down
2 changes: 1 addition & 1 deletion journalbeat/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.15.8
FROM golang:1.15.9

RUN \
apt-get update \
Expand Down
2 changes: 1 addition & 1 deletion libbeat/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.15.8
FROM golang:1.15.9

RUN \
apt-get update \
Expand Down
12 changes: 11 additions & 1 deletion libbeat/cmd/instance/beat.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ import (
"github.com/elastic/beats/v7/libbeat/cloudid"
"github.com/elastic/beats/v7/libbeat/cmd/instance/metrics"
"github.com/elastic/beats/v7/libbeat/common"
"github.com/elastic/beats/v7/libbeat/common/cfgwarn"
"github.com/elastic/beats/v7/libbeat/common/file"
"github.com/elastic/beats/v7/libbeat/common/reload"
"github.com/elastic/beats/v7/libbeat/common/seccomp"
Expand Down Expand Up @@ -1083,13 +1084,22 @@ func initPaths(cfg *common.Config) error {
// the paths field. After we will unpack the complete configuration and keystore reference
// will be correctly replaced.
partialConfig := struct {
Path paths.Path `config:"path"`
Path paths.Path `config:"path"`
Hostfs string `config:"system.hostfs"`
}{}

if paths.IsCLISet() {
cfgwarn.Deprecate("8.0.0", "This flag will be removed in the future and replaced by a config value.")
}

if err := cfg.Unpack(&partialConfig); err != nil {
return fmt.Errorf("error extracting default paths: %+v", err)
}

// Read the value for hostfs as `system.hostfs`
// In the config, there is no `path.hostfs`, as we're merely using the path struct to carry the hostfs variable.
partialConfig.Path.Hostfs = partialConfig.Hostfs

if err := paths.InitPaths(&partialConfig.Path); err != nil {
return fmt.Errorf("error setting default paths: %+v", err)
}
Expand Down
Loading