Skip to content

Commit

Permalink
Merge branch 'master' into agent-monitoring-refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
michalpristas authored Jan 21, 2021
2 parents fec9e6d + e5cd64f commit 841fcfc
Show file tree
Hide file tree
Showing 14 changed files with 247 additions and 118 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- Fix CredentialsJSON unpacking for `gcp-pubsub` and `httpjson` inputs. {pull}23277[23277]
- Change the `event.created` in Netflow events to be the time the event was created by Filebeat
to be consistent with ECS. {pull}23094[23094]
- Update `filestream` reader offset when a line is skipped. {pull}23417[23417]

*Filebeat*

Expand Down Expand Up @@ -581,6 +582,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- Honor kube event resysncs to handle missed watch events {pull}22668[22668]
- Add autodiscover provider and metadata processor for Nomad. {pull}14954[14954] {pull}23324[23324]
- Add `processors.rate_limit.n.dropped` monitoring counter metric for the `rate_limit` processor. {pull}23330[23330]
- Update the baseline version of Sarama (Kafka support library) to 1.27.2. {pull}23595[23595]
- Add kubernetes.volume.fs.used.pct field. {pull}23564[23564]

*Auditbeat*
Expand Down
110 changes: 86 additions & 24 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2216,11 +2216,11 @@ SOFTWARE.

--------------------------------------------------------------------------------
Dependency : github.com/elastic/sarama
Version: v1.19.1-0.20200629123429-0e7b69039eec
Version: v1.19.1-0.20210120173147-5c8cb347d877
Licence type (autodetected): MIT
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/elastic/[email protected].20200629123429-0e7b69039eec/LICENSE:
Contents of probable licence file $GOMODCACHE/github.com/elastic/[email protected].20210120173147-5c8cb347d877/LICENSE:

Copyright (c) 2013 Shopify

Expand Down Expand Up @@ -13708,11 +13708,11 @@ Contents of probable licence file $GOMODCACHE/github.com/prometheus/prometheus@v

--------------------------------------------------------------------------------
Dependency : github.com/rcrowley/go-metrics
Version: v0.0.0-20190826022208-cac0b30c2563
Version: v0.0.0-20200313005456-10cdbea86bc0
Licence type (autodetected): BSD-2-Clause-FreeBSD
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/rcrowley/[email protected]20190826022208-cac0b30c2563/LICENSE:
Contents of probable licence file $GOMODCACHE/github.com/rcrowley/[email protected]20200313005456-10cdbea86bc0/LICENSE:

Copyright 2012 Richard Crowley. All rights reserved.

Expand Down Expand Up @@ -16079,11 +16079,11 @@ THE SOFTWARE.

--------------------------------------------------------------------------------
Dependency : golang.org/x/crypto
Version: v0.0.0-20200622213623-75b288015ac9
Version: v0.0.0-20200820211705-5c72a883971a
Licence type (autodetected): BSD-3-Clause
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/golang.org/x/[email protected]20200622213623-75b288015ac9/LICENSE:
Contents of probable licence file $GOMODCACHE/golang.org/x/[email protected]20200820211705-5c72a883971a/LICENSE:

Copyright (c) 2009 The Go Authors. All rights reserved.

Expand Down Expand Up @@ -16153,11 +16153,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

--------------------------------------------------------------------------------
Dependency : golang.org/x/net
Version: v0.0.0-20200707034311-ab3426394381
Version: v0.0.0-20200904194848-62affa334b73
Licence type (autodetected): BSD-3-Clause
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/golang.org/x/[email protected]20200707034311-ab3426394381/LICENSE:
Contents of probable licence file $GOMODCACHE/golang.org/x/[email protected]20200904194848-62affa334b73/LICENSE:

Copyright (c) 2009 The Go Authors. All rights reserved.

Expand Down Expand Up @@ -24968,6 +24968,39 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


--------------------------------------------------------------------------------
Dependency : github.com/creack/pty
Version: v1.1.9
Licence type (autodetected): MIT
--------------------------------------------------------------------------------

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

Copyright (c) 2011 Keith Rarick

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the
Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute,
sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall
be included in all copies or substantial portions of the
Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


--------------------------------------------------------------------------------
Dependency : github.com/cucumber/godog
Version: v0.8.1
Expand Down Expand Up @@ -27077,11 +27110,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

--------------------------------------------------------------------------------
Dependency : github.com/frankban/quicktest
Version: v1.7.2
Version: v1.10.2
Licence type (autodetected): MIT
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/frankban/quicktest@v1.7.2/LICENSE:
Contents of probable licence file $GOMODCACHE/github.com/frankban/quicktest@v1.10.2/LICENSE:

MIT License

Expand Down Expand Up @@ -35040,11 +35073,11 @@ match.go, match_test.go:

--------------------------------------------------------------------------------
Dependency : github.com/klauspost/compress
Version: v1.9.8
Version: v1.11.0
Licence type (autodetected): BSD-3-Clause
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/klauspost/compress@v1.9.8/LICENSE:
Contents of probable licence file $GOMODCACHE/github.com/klauspost/compress@v1.11.0/LICENSE:

Copyright (c) 2012 The Go Authors. All rights reserved.
Copyright (c) 2019 Klaus Post. All rights reserved.
Expand Down Expand Up @@ -35119,11 +35152,11 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI

--------------------------------------------------------------------------------
Dependency : github.com/kr/pretty
Version: v0.2.0
Version: v0.2.1
Licence type (autodetected): MIT
--------------------------------------------------------------------------------

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

Copyright 2012 Keith Rarick

Expand Down Expand Up @@ -35181,11 +35214,11 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

--------------------------------------------------------------------------------
Dependency : github.com/kr/text
Version: v0.1.0
Version: v0.2.0
Licence type (autodetected): MIT
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/kr/text@v0.1.0/License:
Contents of probable licence file $GOMODCACHE/github.com/kr/text@v0.2.0/License:

Copyright 2012 Keith Rarick

Expand Down Expand Up @@ -36662,6 +36695,35 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


--------------------------------------------------------------------------------
Dependency : github.com/niemeyer/pretty
Version: v0.0.0-20200227124842-a10e7caefd8e
Licence type (autodetected): MIT
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/niemeyer/[email protected]/License:

Copyright 2012 Keith Rarick

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.


--------------------------------------------------------------------------------
Dependency : github.com/onsi/ginkgo
Version: v1.11.0
Expand Down Expand Up @@ -38049,11 +38111,11 @@ THE SOFTWARE.

--------------------------------------------------------------------------------
Dependency : github.com/pierrec/lz4
Version: v2.4.1+incompatible
Version: v2.5.2+incompatible
Licence type (autodetected): BSD-3-Clause
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/pierrec/lz4@v2.4.1+incompatible/LICENSE:
Contents of probable licence file $GOMODCACHE/github.com/pierrec/lz4@v2.5.2+incompatible/LICENSE:

Copyright (c) 2015, Pierre Curto
All rights reserved.
Expand Down Expand Up @@ -41807,11 +41869,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

--------------------------------------------------------------------------------
Dependency : golang.org/x/xerrors
Version: v0.0.0-20191204190536-9bdfabe68543
Version: v0.0.0-20200804184101-5ec99f83aff1
Licence type (autodetected): BSD-3-Clause
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/golang.org/x/[email protected]20191204190536-9bdfabe68543/LICENSE:
Contents of probable licence file $GOMODCACHE/golang.org/x/[email protected]20200804184101-5ec99f83aff1/LICENSE:

Copyright (c) 2019 The Go Authors. All rights reserved.

Expand Down Expand Up @@ -42122,11 +42184,11 @@ SOFTWARE.

--------------------------------------------------------------------------------
Dependency : gopkg.in/check.v1
Version: v1.0.0-20190902080502-41f04d3bba15
Version: v1.0.0-20200902074654-038fdea0a05b
Licence type (autodetected): BSD-2-Clause
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/gopkg.in/[email protected]20190902080502-41f04d3bba15/LICENSE:
Contents of probable licence file $GOMODCACHE/gopkg.in/[email protected]20200902074654-038fdea0a05b/LICENSE:

Gocheck - A rich testing framework for Go

Expand Down Expand Up @@ -43145,11 +43207,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

--------------------------------------------------------------------------------
Dependency : gopkg.in/yaml.v3
Version: v3.0.0-20200313102051-9f266ea9e77c
Version: v3.0.0-20200615113413-eeeca48fe776
Licence type (autodetected): MIT
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/gopkg.in/[email protected]20200313102051-9f266ea9e77c/LICENSE:
Contents of probable licence file $GOMODCACHE/gopkg.in/[email protected]20200615113413-eeeca48fe776/LICENSE:


This project is covered by two different licenses: MIT and Apache.
Expand Down
52 changes: 28 additions & 24 deletions dev-tools/packaging/templates/docker/Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,6 @@ FROM {{ .buildFrom }} AS home

COPY beat {{ $beatHome }}

{{- if (and (eq .BeatName "heartbeat") (not (contains .from "ubi-minimal"))) }}
RUN mkdir -p {{ $beatHome }}/.node \
{{ $beatHome }}/.npm \
{{ $beatHome }}/.cache \
{{ $beatHome }}/.config \
{{ $beatHome }}/suites
{{- end }}

RUN mkdir -p {{ $beatHome }}/data {{ $beatHome }}/logs && \
chown -R root:root {{ $beatHome }} && \
find {{ $beatHome }} -type d -exec chmod 0750 {} \; && \
Expand Down Expand Up @@ -48,6 +40,16 @@ RUN yum -y --setopt=tsflags=nodocs update \
# See https://access.redhat.com/discussions/3195102 for why rm is needed
{{- end }}

{{- if (and (eq .BeatName "heartbeat") (not (contains .from "ubi-minimal"))) }}
ENV NODE_PATH={{ $beatHome }}/.node
RUN echo \
$NODE_PATH \
{{ $beatHome }}/.config \
{{ $beatHome }}/suites \
{{ $beatHome }}/.npm \
{{ $beatHome }}/.cache \
| xargs -IDIR sh -c 'mkdir -p DIR && chmod 0770 DIR'
{{- end }}

LABEL \
org.label-schema.build-date="{{ date }}" \
Expand Down Expand Up @@ -98,28 +100,30 @@ RUN mkdir /licenses
COPY --from=home {{ $beatHome }}/LICENSE.txt /licenses
COPY --from=home {{ $beatHome }}/NOTICE.txt /licenses

{{- if ne .user "root" }}
RUN groupadd --gid 1000 {{ .BeatName }}
RUN useradd -M --uid 1000 --gid 1000 --groups 0 --home {{ $beatHome }} {{ .user }}
{{- if (and (eq .BeatName "heartbeat") (not (contains .from "ubi-minimal"))) }}
RUN chown {{ .user }} $NODE_PATH
{{- end }}
{{- end }}
USER {{ .user }}

{{- if (and (eq .BeatName "heartbeat") (not (contains .from "ubi-minimal"))) }}
# Setup synthetics env vars
ENV ELASTIC_SYNTHETICS_CAPABLE=true
ENV SUITES_DIR={{ $beatHome }}/suites
ENV NODE_PATH={{ $beatHome }}/.node

# Setup node
RUN cd /usr/share/heartbeat/.node \
&& mkdir node \
&& curl https://nodejs.org/dist/v12.18.4/node-v12.18.4-linux-x64.tar.xz | tar -xJ --strip 1 -C node
ENV PATH="/usr/share/heartbeat/.node/node/bin:$PATH"
ENV NODE_VERSION=12.18.4
ENV PATH="$NODE_PATH/node/bin:$PATH"
# Install the latest version of @elastic/synthetics forcefully ignoring the previously
# cached node_modules, hearbeat then calls the global executable to run test suites
RUN npm i -g -f @elastic/synthetics
{{- end }}


{{- if ne .user "root" }}
RUN groupadd --gid 1000 {{ .BeatName }}
RUN useradd -M --uid 1000 --gid 1000 --groups 0 --home {{ $beatHome }} {{ .user }}
# cached node_modules, heartbeat then calls the global executable to run test suites
# Setup node
RUN cd /usr/share/heartbeat/.node \
&& mkdir -p node \
&& curl https://nodejs.org/dist/v12.18.4/node-v12.18.4-linux-x64.tar.xz | tar -xJ --strip 1 -C node \
&& chmod ug+rwX -R $NODE_PATH \
&& npm i -g -f @elastic/synthetics && chmod ug+rwX -R $NODE_PATH
{{- end }}
USER {{ .user }}

{{- range $i, $port := .ExposePorts }}
EXPOSE {{ $port }}
Expand Down
4 changes: 2 additions & 2 deletions filebeat/input/filestream/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,13 +318,13 @@ func (inp *filestream) readFromSource(
return nil
}

s.Offset += int64(message.Bytes)

if message.IsEmpty() || inp.isDroppedLine(log, string(message.Content)) {
continue
}

event := inp.eventFromMessage(message, path)
s.Offset += int64(message.Bytes)

if err := p.Publish(event, s); err != nil {
return err
}
Expand Down
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ require (
github.com/prometheus/common v0.7.0
github.com/prometheus/procfs v0.0.11
github.com/prometheus/prometheus v2.5.0+incompatible
github.com/rcrowley/go-metrics v0.0.0-20190826022208-cac0b30c2563
github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0
github.com/reviewdog/reviewdog v0.9.17
github.com/samuel/go-parser v0.0.0-20130731160455-ca8abbf65d0e // indirect
github.com/samuel/go-thrift v0.0.0-20140522043831-2187045faa54
Expand Down Expand Up @@ -164,9 +164,9 @@ require (
go.uber.org/atomic v1.5.0
go.uber.org/multierr v1.3.0
go.uber.org/zap v1.14.0
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9
golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a
golang.org/x/lint v0.0.0-20200130185559-910be7a94367
golang.org/x/net v0.0.0-20200707034311-ab3426394381
golang.org/x/net v0.0.0-20200904194848-62affa334b73
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a
golang.org/x/sys v0.0.0-20201009025420-dfb3f7c4e634
Expand All @@ -192,7 +192,7 @@ require (
replace (
github.com/Azure/go-autorest => github.com/Azure/go-autorest v12.2.0+incompatible
github.com/Microsoft/go-winio => github.com/bi-zone/go-winio v0.4.15
github.com/Shopify/sarama => github.com/elastic/sarama v1.19.1-0.20200629123429-0e7b69039eec
github.com/Shopify/sarama => github.com/elastic/sarama v1.19.1-0.20210120173147-5c8cb347d877
github.com/cucumber/godog => github.com/cucumber/godog v0.8.1
github.com/docker/docker => github.com/docker/engine v0.0.0-20191113042239-ea84732a7725
github.com/docker/go-plugins-helpers => github.com/elastic/go-plugins-helpers v0.0.0-20200207104224-bdf17607b79f
Expand Down
Loading

0 comments on commit 841fcfc

Please sign in to comment.