Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into feature/support-a…
Browse files Browse the repository at this point in the history
…ws-on-file-changes

* upstream/master:
  override host on statsd metricset (elastic#29103)
  Skip config check in autodiscover for duplicated configurations (elastic#29048)
  Change "filebeat.config.modules.enabled" to "true" (elastic#28769)
  Remove deprecated spool queue from Beats (elastic#28869)
  Add `beat` field back to beat.stats (elastic#29094)
  Revert "Move labels and annotations under kubernetes.namespace. (elastic#27917)" (elastic#29069)
  heartbeat: remove w2008 in the CI (elastic#29093)
  Remove deprecated `--template` and `--index-policy` flags (elastic#28870)
  Fix parsing of apache trace log levels (elastic#28717)
  [Elastic-Agent] IUse itnernal port for local fleet server (elastic#28993)
  [Heartbeat] Log error on dupe monitor ID instead of strict req (elastic#29041)
  Enable pprof for elastic-agent and beats (elastic#28983)
  • Loading branch information
v1v committed Nov 24, 2021
2 parents 4550134 + 606a7d2 commit 3c5dac0
Show file tree
Hide file tree
Showing 182 changed files with 2,803 additions and 8,438 deletions.
1 change: 1 addition & 0 deletions CHANGELOG-developer.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ The list below covers the major changes between 7.0.0-rc2 and master only.
- Removed the `common.Float` type. {issue}28279[28279] {pull}28280[28280] {pull}28376[28376]
- Removed Beat generators. {pull}28816[28816]
- libbeat.logp package forces ECS compliant logs. Logs are JSON formatted. Options to enable ECS/JSON have been removed. {issue}15544[15544] {pull}28573[28573]
- Removed deprecated disk spool from Beats. Use disk queue instead. {pull}28869[28869]

==== Bugfixes

Expand Down
6 changes: 5 additions & 1 deletion CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- Remove deprecated config option aws_partition. {pull}28120[28120]
- Improve stats API {pull}27963[27963]
- Enable IMDSv2 support for `add_cloud_metadata` processor on AWS. {issue}22101[22101] {pull}28285[28285]
- Update kubernetes.namespace from keyword to group field and add name, labels, annotations, uuid as its fields {pull}27917[27917]
- Libbeat: logp package forces ECS compliant logs. Logs are JSON formatted. Options to enable ECS/JSON have been removed. {issue}15544[15544] {pull}28573[28573]
- Previously, RE2 and thus Golang had a bug where `(|a)*` matched more characters than `(|a)+`. To stay consistent with PCRE, the bug was fixed. Configurations that rely on the old, buggy behaviour has to be adjusted. See more about Golang bug: https://github.com/golang/go/issues/46123 {pull}27543[27543]
- Update docker client. {pull}28716[28716]
- Remove `auto` from the available options of `setup.ilm.enabled` and set the default value to `true`. {pull}28671[28671]
- add_process_metadata processor: Replace usage of deprecated `process.ppid` field with `process.parent.pid`. {pull}28620[28620]
- add_docker_metadata processor: Replace usage of deprecated `process.ppid` field with `process.parent.pid`. {pull}28620[28620]
- Index template's default_fields setting is only populated with ECS fields. {pull}28596[28596] {issue}28215[28215]
- Remove deprecated `--template` and `--ilm-policy` flags. Use `--index-management` instead. {pull}28870[28870]
- Remove options `logging.files.suffix` and default to datetime endings. {pull}28927[28927]

*Auditbeat*
Expand Down Expand Up @@ -67,6 +67,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- `filestream` and `log` inputs accept null (`\u0000`) as line terminator. {pull}28998[28998]

*Heartbeat*
- Change behavior in case of duplicate monitor IDs in configs to be last monitor wins. {pull}29041[29041]

*Journalbeat*

Expand Down Expand Up @@ -143,6 +144,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- Allows disable pod events enrichment with deployment name {pull}28521[28521]
- Fix `fingerprint` processor to give it access to the `@timestamp` field. {issue}28683[28683]
- Fix the wrong beat name on monitoring and state endpoint {issue}27755[27755]
- Skip configuration checks in autodiscover for configurations that are already running {pull}29048[29048]

*Auditbeat*

Expand Down Expand Up @@ -184,6 +186,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- Add support for username in cisco asa security negotiation logs {pull}26975[26975]
- Relax time parsing and capture group and session type in Cisco ASA module {issue}24710[24710] {pull}28325[28325]
- Correctly track bytes read when max_bytes is exceeded. {issue}28317[28317] {pull}28352[28352]
- Fix parsing of apache log levels including numbers. {pull}28717[28717]
- Upgrade azure-eventhub sdk reference, contains potential checkpoint fixes. {pull}28919[28919]
- Revert usageDetails api version to 2019-01-01. {pull}28995[28995]
- Fix in `aws-s3` input regarding provider discovery through endpoint {pull}28963[28963]
Expand Down Expand Up @@ -369,6 +372,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- Preliminary AIX support {pull}27954[27954]
- Register additional name for `storage` metricset in the azure module. {pull}28447[28447]
- Update reference to gosigar pacakge for filesystem windows fix. {pull}28909[28909]
- Override `Host()` on statsd MetricSet {pull}29103[29103]

*Packetbeat*

Expand Down
844 changes: 0 additions & 844 deletions NOTICE.txt

Large diffs are not rendered by default.

60 changes: 0 additions & 60 deletions auditbeat/auditbeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,66 +197,6 @@ auditbeat.modules:
# length of its retry interval each time, up to this maximum.
#max_retry_interval: 30s

# The spool queue will store events in a local spool file, before
# forwarding the events to the outputs.
# Note: the spool queue is deprecated and will be removed in the future.
# Use the disk queue instead.
#
# The spool file is a circular buffer, which blocks once the file/buffer is full.
# Events are put into a write buffer and flushed once the write buffer
# is full or the flush_timeout is triggered.
# Once ACKed by the output, events are removed immediately from the queue,
# making space for new events to be persisted.
#spool:
# The file namespace configures the file path and the file creation settings.
# Once the file exists, the `size`, `page_size` and `prealloc` settings
# will have no more effect.
#file:
# Location of spool file. The default value is ${path.data}/spool.dat.
#path: "${path.data}/spool.dat"

# Configure file permissions if file is created. The default value is 0600.
#permissions: 0600

# File size hint. The spool blocks, once this limit is reached. The default value is 100 MiB.
#size: 100MiB

# The files page size. A file is split into multiple pages of the same size. The default value is 4KiB.
#page_size: 4KiB

# If prealloc is set, the required space for the file is reserved using
# truncate. The default value is true.
#prealloc: true

# Spool writer settings
# Events are serialized into a write buffer. The write buffer is flushed if:
# - The buffer limit has been reached.
# - The configured limit of buffered events is reached.
# - The flush timeout is triggered.
#write:
# Sets the write buffer size.
#buffer_size: 1MiB

# Maximum duration after which events are flushed if the write buffer
# is not full yet. The default value is 1s.
#flush.timeout: 1s

# Number of maximum buffered events. The write buffer is flushed once the
# limit is reached.
#flush.events: 16384

# Configure the on-disk event encoding. The encoding can be changed
# between restarts.
# Valid encodings are: json, ubjson, and cbor.
#codec: cbor
#read:
# Reader flush timeout, waiting for more events to become available, so
# to fill a complete batch as required by the outputs.
# If flush_timeout is 0, all available events are forwarded to the
# outputs immediately.
# The default value is 0s.
#flush.timeout: 0s

# Sets the maximum number of CPUs that can be executing simultaneously. The
# default is the number of logical CPUs available in the system.
#max_procs:
Expand Down
35 changes: 2 additions & 33 deletions auditbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -18222,47 +18222,16 @@ type: ip
--
*`kubernetes.namespace.name`*::
*`kubernetes.namespace`*::
+
--
Kubernetes namespace name
Kubernetes namespace
type: keyword
--
*`kubernetes.namespace.uuid`*::
+
--
Kubernetes namespace uuid
type: keyword
--
*`kubernetes.namespace.labels.*`*::
+
--
Kubernetes namespace labels map
type: object
--
*`kubernetes.namespace.annotations.*`*::
+
--
Kubernetes namespace annotations map
type: object
--
*`kubernetes.node.name`*::
+
--
Expand Down
2 changes: 1 addition & 1 deletion auditbeat/include/fields.go

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions auditbeat/tests/system/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ def test_start_stop(self):
assert self.log_contains("auditbeat stopped")

@unittest.skipUnless(INTEGRATION_TESTS, "integration test")
def test_template(self):
def test_index_management(self):
"""
Test that the template can be loaded with `setup --template`
Test that the template can be loaded with `setup --index-management`
"""
dirs = [self.temp_dir("auditbeat_test")]
with PathCleanup(dirs):
Expand All @@ -51,7 +51,7 @@ def test_template(self):
}
}],
elasticsearch={"host": self.get_elasticsearch_url()})
self.run_beat(extra_args=["setup", "--template"], exit_code=0)
self.run_beat(extra_args=["setup", "--index-management"], exit_code=0)

assert self.log_contains('Loaded index template')
assert len(es.cat.templates(name='auditbeat-*', h='name')) > 0
Expand Down
2 changes: 1 addition & 1 deletion filebeat/_meta/config/filebeat.global.reference.yml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#reload.enabled: true
#reload.period: 10s
#modules:
#enabled: false
#enabled: true
#path: modules.d/*.yml
#reload.enabled: true
#reload.period: 10s
35 changes: 2 additions & 33 deletions filebeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -86641,47 +86641,16 @@ type: ip

--


*`kubernetes.namespace.name`*::
*`kubernetes.namespace`*::
+
--
Kubernetes namespace name
Kubernetes namespace


type: keyword

--

*`kubernetes.namespace.uuid`*::
+
--
Kubernetes namespace uuid


type: keyword

--

*`kubernetes.namespace.labels.*`*::
+
--
Kubernetes namespace labels map


type: object

--

*`kubernetes.namespace.annotations.*`*::
+
--
Kubernetes namespace annotations map


type: object

--

*`kubernetes.node.name`*::
+
--
Expand Down
62 changes: 1 addition & 61 deletions filebeat/filebeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,7 @@ filebeat.inputs:
#reload.enabled: true
#reload.period: 10s
#modules:
#enabled: false
#enabled: true
#path: modules.d/*.yml
#reload.enabled: true
#reload.period: 10s
Expand Down Expand Up @@ -1111,66 +1111,6 @@ filebeat.inputs:
# length of its retry interval each time, up to this maximum.
#max_retry_interval: 30s

# The spool queue will store events in a local spool file, before
# forwarding the events to the outputs.
# Note: the spool queue is deprecated and will be removed in the future.
# Use the disk queue instead.
#
# The spool file is a circular buffer, which blocks once the file/buffer is full.
# Events are put into a write buffer and flushed once the write buffer
# is full or the flush_timeout is triggered.
# Once ACKed by the output, events are removed immediately from the queue,
# making space for new events to be persisted.
#spool:
# The file namespace configures the file path and the file creation settings.
# Once the file exists, the `size`, `page_size` and `prealloc` settings
# will have no more effect.
#file:
# Location of spool file. The default value is ${path.data}/spool.dat.
#path: "${path.data}/spool.dat"

# Configure file permissions if file is created. The default value is 0600.
#permissions: 0600

# File size hint. The spool blocks, once this limit is reached. The default value is 100 MiB.
#size: 100MiB

# The files page size. A file is split into multiple pages of the same size. The default value is 4KiB.
#page_size: 4KiB

# If prealloc is set, the required space for the file is reserved using
# truncate. The default value is true.
#prealloc: true

# Spool writer settings
# Events are serialized into a write buffer. The write buffer is flushed if:
# - The buffer limit has been reached.
# - The configured limit of buffered events is reached.
# - The flush timeout is triggered.
#write:
# Sets the write buffer size.
#buffer_size: 1MiB

# Maximum duration after which events are flushed if the write buffer
# is not full yet. The default value is 1s.
#flush.timeout: 1s

# Number of maximum buffered events. The write buffer is flushed once the
# limit is reached.
#flush.events: 16384

# Configure the on-disk event encoding. The encoding can be changed
# between restarts.
# Valid encodings are: json, ubjson, and cbor.
#codec: cbor
#read:
# Reader flush timeout, waiting for more events to become available, so
# to fill a complete batch as required by the outputs.
# If flush_timeout is 0, all available events are forwarded to the
# outputs immediately.
# The default value is 0s.
#flush.timeout: 0s

# Sets the maximum number of CPUs that can be executing simultaneously. The
# default is the number of logical CPUs available in the system.
#max_procs:
Expand Down
2 changes: 1 addition & 1 deletion filebeat/include/fields.go

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion filebeat/module/apache/error/ingest/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ processors:
patterns:
- \[%{APACHE_TIME:apache.error.timestamp}\] \[%{LOGLEVEL:log.level}\]( \[client
%{IPORHOST:source.address}(:%{POSINT:source.port})?\])? %{GREEDYDATA:message}
- \[%{APACHE_TIME:apache.error.timestamp}\] \[%{DATA:apache.error.module}:%{LOGLEVEL:log.level}\]
- \[%{APACHE_TIME:apache.error.timestamp}\] \[%{DATA:apache.error.module}:%{APACHE_LOGLEVEL:log.level}\]
\[pid %{NUMBER:process.pid:long}(:tid %{NUMBER:process.thread.id:long})?\](
\[client %{IPORHOST:source.address}(:%{POSINT:source.port})?\])? %{GREEDYDATA:message}
pattern_definitions:
# Apache log level can have numeric sub-levels such as trace1.
APACHE_LOGLEVEL: '%{LOGLEVEL}[0-9]*'
APACHE_TIME: '%{DAY} %{MONTH} %{MONTHDAY} %{TIME} %{YEAR}'
ignore_missing: true
- grok:
Expand Down
2 changes: 2 additions & 0 deletions filebeat/module/apache/error/test/sublevel.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[Wed Oct 20 19:20:59.121211 2021] [rewrite:trace3] [pid 121591:tid 140413273032448] mod_rewrite.c(470): [client 10.121.192.8:38350] 10.121.192.8 - - [dev.elastic.co/sid#55a374e851c8][rid#7fb438083ac0/initial] applying pattern '^/import/?(.*)$' to uri '/'

21 changes: 21 additions & 0 deletions filebeat/module/apache/error/test/sublevel.log-expected.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[
{
"@timestamp": "2021-10-20T19:20:59.121-02:00",
"apache.error.module": "rewrite",
"event.category": "web",
"event.dataset": "apache.error",
"event.kind": "event",
"event.module": "apache",
"event.original": "[Wed Oct 20 19:20:59.121211 2021] [rewrite:trace3] [pid 121591:tid 140413273032448] mod_rewrite.c(470): [client 10.121.192.8:38350] 10.121.192.8 - - [dev.elastic.co/sid#55a374e851c8][rid#7fb438083ac0/initial] applying pattern '^/import/?(.*)$' to uri '/'",
"event.timezone": "-02:00",
"event.type": "info",
"fileset.name": "error",
"input.type": "log",
"log.level": "trace3",
"log.offset": 0,
"message": "mod_rewrite.c(470): [client 10.121.192.8:38350] 10.121.192.8 - - [dev.elastic.co/sid#55a374e851c8][rid#7fb438083ac0/initial] applying pattern '^/import/?(.*)$' to uri '/'",
"process.pid": 121591,
"process.thread.id": 140413273032448,
"service.type": "apache"
}
]
Loading

0 comments on commit 3c5dac0

Please sign in to comment.