Skip to content

Commit

Permalink
Merge branch 'main' into add_mysql_tls_support
Browse files Browse the repository at this point in the history
  • Loading branch information
gpop63 committed Feb 15, 2024
2 parents d15293c + 4163848 commit 2353cea
Show file tree
Hide file tree
Showing 148 changed files with 11,837 additions and 1,510 deletions.
12 changes: 8 additions & 4 deletions .buildkite/libbeat/pipeline.libbeat.yml
@@ -1,4 +1,5 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
name: "beats-libbeat"

env:
IMAGE_UBUNTU_X86_64: "family/core-ubuntu-2204"
Expand All @@ -14,16 +15,16 @@ steps:
- input: "Input Parameters"
key: "input-run-all-stages"
fields:
- select: "Libbeat - runLibbeat"
key: "runLibbeat"
- select: "Libbeat - run_libbeat"
key: "run_libbeat"
options:
- label: "True"
value: "true"
- label: "False"
value: "false"
default: "false"
- select: "Libbeat - runLibBeatArmTest"
key: "runLibBeatArmTest"
- select: "Libbeat - run_libbeat_arm_tests"
key: "run_libbeat_arm_tests"
options:
- label: "True"
value: "true"
Expand All @@ -39,3 +40,6 @@ steps:
- label: ":linux: Load dynamic Libbeat pipeline"
key: "libbeat-pipeline"
command: ".buildkite/scripts/generate_libbeat_pipeline.sh"
notify:
- github_commit_status:
context: "${BEATS_PROJECT_NAME}: Load dynamic pipeline's steps"
15 changes: 10 additions & 5 deletions .buildkite/metricbeat/pipeline.yml
@@ -1,4 +1,6 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
name: "beats-metricbeat"

env:
IMAGE_UBUNTU_X86_64: "family/core-ubuntu-2204"
IMAGE_UBUNTU_ARM_64: "core-ubuntu-2004-aarch64"
Expand All @@ -18,18 +20,18 @@ env:
steps:

- input: "Input Parameters"
key: "runMetricbeat"
key: "run_metricbeat"
fields:
- select: "Metricbeat - runMetricbeat"
key: "runMetricbeat"
- select: "Metricbeat - run_metricbeat"
key: "run_metricbeat"
options:
- label: "True"
value: "true"
- label: "False"
value: "false"
default: "false"
- select: "Metricbeat - runMetricbeatMacOsTests"
key: "runMetricbeatMacOsTests"
- select: "Metricbeat - run_metricbeat_macos_tests"
key: "run_metricbeat_macos_tests"
options:
- label: "True"
value: "true"
Expand All @@ -45,3 +47,6 @@ steps:
- label: ":linux: Load dynamic metricbeat pipeline"
key: "metricbeat-pipeline"
command: ".buildkite/scripts/generate_metricbeat_pipeline.sh"
notify:
- github_commit_status:
context: "${BEATS_PROJECT_NAME}: Load dynamic pipeline's steps"
17 changes: 11 additions & 6 deletions .buildkite/packetbeat/pipeline.packetbeat.yml
@@ -1,4 +1,6 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
name: "beats-packetbeat"

env:
IMAGE_UBUNTU_X86_64: "family/core-ubuntu-2204"
IMAGE_UBUNTU_ARM_64: "core-ubuntu-2004-aarch64"
Expand All @@ -20,24 +22,24 @@ steps:
- input: "Input Parameters"
key: "input-run-all-stages"
fields:
- select: "Packetbeat - runPacketbeat"
key: "runPacketbeat"
- select: "Packetbeat - run_packetbeat"
key: "run_packetbeat"
options:
- label: "True"
value: "true"
- label: "False"
value: "false"
default: "false"
- select: "Packetbeat - runPacketbeatArmTest"
key: "runPacketbeatArmTest"
- select: "Packetbeat - run_packetbeat_arm_tests"
key: "run_packetbeat_arm_tests"
options:
- label: "True"
value: "true"
- label: "False"
value: "false"
default: "false"
- select: "Packetbeat - runPacketbeatMacOsTests"
key: "runPacketbeatMacOsTests"
- select: "Packetbeat - run_packetbeat_macos_tests"
key: "run_packetbeat_macos_tests"
options:
- label: "True"
value: "true"
Expand All @@ -53,3 +55,6 @@ steps:
- label: ":linux: Load dynamic packetbeat pipeline"
key: "packetbeat-pipeline"
command: ".buildkite/scripts/generate_packetbeat_pipeline.sh"
notify:
- github_commit_status:
context: "${BEATS_PROJECT_NAME}: Load dynamic pipeline's steps"
58 changes: 21 additions & 37 deletions .buildkite/scripts/common.sh
Expand Up @@ -9,14 +9,18 @@ arch_type="$(uname -m)"
GITHUB_PR_TRIGGER_COMMENT=${GITHUB_PR_TRIGGER_COMMENT:-""}
GITHUB_PR_LABELS=${GITHUB_PR_LABELS:-""}
ONLY_DOCS=${ONLY_DOCS:-"true"}
[ -z "${runLibbeat+x}" ] && runLibbeat="$(buildkite-agent meta-data get runLibbeat --default ${runLibbeat:-"false"})"
[ -z "${runMetricbeat+x}" ] && runMetricbeat="$(buildkite-agent meta-data get runMetricbeat --default ${runMetricbeat:-"false"})"
[ -z "${runPacketbeat+x}" ] && runPacketbeat="$(buildkite-agent meta-data get runPacketbeat --default ${runPacketbeat:-"false"})"
[ -z "${runWinlogbeat+x}" ] && runWinlogbeat="$(buildkite-agent meta-data get runWinlogbeat --default ${runWinlogbeat:-"false"})"
[ -z "${runLibBeatArmTest+x}" ] && runLibBeatArmTest="$(buildkite-agent meta-data get runLibbeat --default ${runLibbeat:-"false"})"
[ -z "${runPacketbeatArmTest+x}" ] && runPacketbeatArmTest="$(buildkite-agent meta-data get runPacketbeatArmTest --default ${runPacketbeatArmTest:-"false"})"
[ -z "${runMetricbeatMacOsTests+x}" ] && runMetricbeatMacOsTests="$(buildkite-agent meta-data get runMetricbeatMacOsTests --default ${runMetricbeatMacOsTests:-"false"})"
[ -z "${runPacketbeatMacOsTests+x}" ] && runPacketbeatMacOsTests="$(buildkite-agent meta-data get runPacketbeatMacOsTests --default ${runPacketbeatMacOsTests:-"false"})"

[ -z "${run_libbeat+x}" ] && run_libbeat="$(buildkite-agent meta-data get run_libbeat --default "false")"
[ -z "${run_metricbeat+x}" ] && run_metricbeat="$(buildkite-agent meta-data get run_metricbeat --default "false")"
[ -z "${run_packetbeat+x}" ] && run_packetbeat="$(buildkite-agent meta-data get run_packetbeat --default "false")"
[ -z "${run_winlogbeat+x}" ] && run_winlogbeat="$(buildkite-agent meta-data get run_winlogbeat --default "false")"
[ -z "${run_libbeat_arm_tests+x}" ] && run_libbeat_arm_tests="$(buildkite-agent meta-data get run_libbeat_arm_tests --default "false")"
[ -z "${run_packetbeat_arm_tests+x}" ] && run_packetbeat_arm_tests="$(buildkite-agent meta-data get run_packetbeat_arm_tests --default "false")"
[ -z "${run_metricbeat_macos_tests+x}" ] && run_metricbeat_macos_tests="$(buildkite-agent meta-data get run_metricbeat_macos_tests --default "false")"
[ -z "${run_packetbeat_macos_tests+x}" ] && run_packetbeat_macos_tests="$(buildkite-agent meta-data get run_packetbeat_macos_tests --default "false")"
trigger_specific_beat="run_${BEATS_PROJECT_NAME}"
trigger_specific_arm_tests="run_${BEATS_PROJECT_NAME}_arm_tests"
trigger_specific_macos_tests="run_${BEATS_PROJECT_NAME}_macos_tests"

metricbeat_changeset=(
"^metricbeat/.*"
Expand Down Expand Up @@ -60,6 +64,7 @@ packaging_changeset=(
".go-version"
)


with_docker_compose() {
local version=$1
echo "Setting up the Docker-compose environment..."
Expand Down Expand Up @@ -235,37 +240,20 @@ are_changed_only_paths() {
}

are_conditions_met_mandatory_tests() {
declare -n beat_changeset_reference="${BEATS_PROJECT_NAME}_changeset"
if are_paths_changed "${oss_changeset[@]}" || are_paths_changed "${ci_changeset[@]}" ]]; then # from https://github.com/elastic/beats/blob/c5e79a25d05d5bdfa9da4d187fe89523faa42afc/metricbeat/Jenkinsfile.yml#L3-L12
return 0
fi
if [[ "$BUILDKITE_PIPELINE_SLUG" == "beats-metricbeat" ]]; then
if are_paths_changed "${metricbeat_changeset[@]}" || [[ "${GITHUB_PR_TRIGGER_COMMENT}" == "/test metricbeat" || "${GITHUB_PR_LABELS}" =~ Metricbeat || "${runMetricbeat}" == "true" ]]; then
return 0
fi
elif [[ "$BUILDKITE_PIPELINE_SLUG" == "beats-libbeat" ]]; then
if are_paths_changed "${libbeat_changeset[@]}" || [[ "${GITHUB_PR_TRIGGER_COMMENT}" == "/test libbeat" || "${GITHUB_PR_LABELS}" =~ libbeat || "${runLibbeat}" == "true" ]]; then
return 0
fi
elif [[ "$BUILDKITE_PIPELINE_SLUG" == "beats-packetbeat" ]]; then
if are_paths_changed "${packetbeat_changeset[@]}" || [[ "${GITHUB_PR_TRIGGER_COMMENT}" == "/test packetbeat" || "${GITHUB_PR_LABELS}" =~ Packetbeat || "${runPacketbeat}" == "true" ]]; then
return 0
fi
elif [[ "$BUILDKITE_PIPELINE_SLUG" == "beats-winlogbeat" ]]; then
if are_paths_changed "${winlogbeat_changeset[@]}" || [[ "${GITHUB_PR_TRIGGER_COMMENT}" == "/test winlogbeat" || "${GITHUB_PR_LABELS}" =~ Winlogbeat || "${runWinlogbeat}" == "true" ]]; then
return 0
fi
if are_paths_changed "${beat_changeset_reference[@]}" || [[ "${GITHUB_PR_TRIGGER_COMMENT}" == "/test ${BEATS_PROJECT_NAME}" || "${GITHUB_PR_LABELS}" =~ /(?i)${BEATS_PROJECT_NAME}/ || "${!trigger_specific_beat}" == "true" ]]; then
return 0
fi
return 1
}

are_conditions_met_arm_tests() {
if are_conditions_met_mandatory_tests; then #from https://github.com/elastic/beats/blob/c5e79a25d05d5bdfa9da4d187fe89523faa42afc/Jenkinsfile#L145-L171
if [[ "$BUILDKITE_PIPELINE_SLUG" == "beats-libbeat" ]]; then
if [[ "${GITHUB_PR_TRIGGER_COMMENT}" == "/test libbeat for arm" || "${GITHUB_PR_LABELS}" =~ arm || "${runLibBeatArmTest}" == "true" ]]; then
return 0
fi
elif [[ "$BUILDKITE_PIPELINE_SLUG" == "beats-packetbeat" ]]; then
if [[ "${GITHUB_PR_TRIGGER_COMMENT}" == "/test packetbeat for arm" || "${GITHUB_PR_LABELS}" =~ arm || "${runPacketbeatArmTest}" == "true" ]]; then
if [[ "$BUILDKITE_PIPELINE_SLUG" == "beats-libbeat" || "$BUILDKITE_PIPELINE_SLUG" == "beats-packetbeat" ]]; then
if [[ "${GITHUB_PR_TRIGGER_COMMENT}" == "/test ${BEATS_PROJECT_NAME} for arm" || "${GITHUB_PR_LABELS}" =~ arm || "${!trigger_specific_arm_tests}" == "true" ]]; then
return 0
fi
fi
Expand All @@ -275,12 +263,8 @@ are_conditions_met_arm_tests() {

are_conditions_met_macos_tests() {
if are_conditions_met_mandatory_tests; then #from https://github.com/elastic/beats/blob/c5e79a25d05d5bdfa9da4d187fe89523faa42afc/Jenkinsfile#L145-L171
if [[ "$BUILDKITE_PIPELINE_SLUG" == "beats-metricbeat" ]]; then
if [[ "${runMetricbeatMacOsTests}" == true ]] || [[ "${GITHUB_PR_TRIGGER_COMMENT}" == "/test metricbeat for macos" ]] || [[ "${GITHUB_PR_LABELS}" =~ macOS ]]; then # from https://github.com/elastic/beats/blob/c5e79a25d05d5bdfa9da4d187fe89523faa42afc/metricbeat/Jenkinsfile.yml#L3-L12
return 0
fi
elif [[ "$BUILDKITE_PIPELINE_SLUG" == "beats-packetbeat" ]]; then
if [[ "${runPacketbeatMacOsTests}" == true ]] || [[ "${GITHUB_PR_TRIGGER_COMMENT}" == "/test packetbeat for macos" ]] || [[ "${GITHUB_PR_LABELS}" =~ macOS ]]; then
if [[ "$BUILDKITE_PIPELINE_SLUG" == "beats-metricbeat" || "$BUILDKITE_PIPELINE_SLUG" == "beats-packetbeat" ]]; then
if [[ "${GITHUB_PR_TRIGGER_COMMENT}" == "/test ${BEATS_PROJECT_NAME} for macos" || "${GITHUB_PR_LABELS}" =~ macOS || "${!trigger_specific_macos_tests}" == "true" ]]; then # from https://github.com/elastic/beats/blob/c5e79a25d05d5bdfa9da4d187fe89523faa42afc/metricbeat/Jenkinsfile.yml#L3-L12
return 0
fi
fi
Expand Down Expand Up @@ -317,4 +301,4 @@ fi

if are_paths_changed "${packaging_changeset[@]}" ; then
PACKAGING_CHANGES="true"
fi
fi
1 change: 0 additions & 1 deletion .buildkite/scripts/generate_metricbeat_pipeline.sh
Expand Up @@ -84,7 +84,6 @@ steps:
disk_type: "pd-ssd"
artifact_paths: "${BEATS_PROJECT_NAME}/build/*.*"
# Temporary disabled https://github.com/elastic/beats/issues/37841
- label: ":windows: Windows 10 Unit Tests"
key: "extended-win-10-unit-tests"
command: ".buildkite/scripts/win_unit_tests.ps1"
Expand Down
9 changes: 7 additions & 2 deletions .buildkite/winlogbeat/pipeline.winlogbeat.yml
@@ -1,4 +1,6 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
name: "beats-winlogbeat"

env:
IMAGE_UBUNTU_X86_64: "family/core-ubuntu-2204"
IMAGE_WIN_10: "family/general-windows-10"
Expand All @@ -16,8 +18,8 @@ steps:
- input: "Input Parameters"
key: "input-run-all-stages"
fields:
- select: "Packetbeat - runWinlogbeat"
key: "runWinlogbeat"
- select: "Winlogbeat - run_winlogbeat"
key: "run_winlogbeat"
options:
- label: "True"
value: "true"
Expand All @@ -33,3 +35,6 @@ steps:
- label: ":linux: Load dynamic winlogbeat pipeline"
key: "winlogbeat-pipeline"
command: ".buildkite/scripts/generate_winlogbeat_pipeline.sh"
notify:
- github_commit_status:
context: "${BEATS_PROJECT_NAME}: Load dynamic pipeline's steps"
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Expand Up @@ -112,6 +112,7 @@ CHANGELOG*
/x-pack/filebeat/input/cel/ @elastic/security-service-integrations
/x-pack/filebeat/input/cometd/ @elastic/obs-infraobs-integrations
/x-pack/filebeat/input/entityanalytics/ @elastic/security-service-integrations
/x-pack/filebeat/input/etw/ @elastic/sec-windows-platform
/x-pack/filebeat/input/gcppubsub/ @elastic/security-service-integrations
/x-pack/filebeat/input/gcs/ @elastic/security-service-integrations
/x-pack/filebeat/input/http_endpoint/ @elastic/security-service-integrations
Expand Down
File renamed without changes.
3 changes: 3 additions & 0 deletions .github/workflows/golangci-lint.yml
Expand Up @@ -32,6 +32,9 @@ jobs:
with:
go-version-file: .go-version

- name: Install Apt Package
run: sudo apt-get update && sudo apt-get install -y libpcap-dev

- name: golangci-lint
env:
GOOS: ${{ matrix.GOOS }}
Expand Down
13 changes: 13 additions & 0 deletions .mergify.yml
Expand Up @@ -302,3 +302,16 @@ pull_request_rules:
labels:
- "backport"
title: "[{{ destination_branch }}](backport #{{ number }}) {{ title }}"
- name: backport patches to 8.13 branch
conditions:
- merged
- label=backport-v8.13.0
actions:
backport:
assignees:
- "{{ author }}"
branches:
- "8.13"
labels:
- "backport"
title: "[{{ destination_branch }}](backport #{{ number }}) {{ title }}"
3 changes: 2 additions & 1 deletion CHANGELOG-developer.next.asciidoc
Expand Up @@ -179,7 +179,8 @@ The list below covers the major changes between 7.0.0-rc2 and main only.
- Add initial infrastructure for a caching enrichment processor. {pull}36619[36619]
- Add file-backed cache for cache enrichment processor. {pull}36686[36686] {pull}36696[36696]
- Elide retryable HTTP client construction in Filebeat HTTPJSON and CEL inputs if not needed. {pull}36916[36916]
- Allow assignment of packetbeat protocols to interfaces. {issue}36574[36564] {pull}[]
- Allow assignment of packetbeat protocols to interfaces. {issue}36574[36564] {pull}36852[36852]
- Add Active Directory entity collector for Filebeat entity analytics. {pull}37854[37854]

==== Deprecated

Expand Down
14 changes: 11 additions & 3 deletions CHANGELOG.next.asciidoc
Expand Up @@ -15,15 +15,19 @@ https://github.com/elastic/beats/compare/v8.8.1\...main[Check the HEAD diff]
platform, and when viewed from a metadata API standpoint, it is impossible to differentiate it from OpenStack. If you
know that your deployments run on Huawei Cloud exclusively, and you wish to have `cloud.provider` value as `huawei`,
you can achieve this by overwriting the value using an `add_fields` processor. {pull}35184[35184]
- In managed mode, Beats running under Elastic Agent will report the package
- In managed mode, Beats running under Elastic Agent will report the package
version of Elastic Agent as their own version. This includes all additional
fields added to events containing the Beats version. {pull}37553[37553]
- The behavior of `queue.mem.flush.min_events` has been simplified. It now serves as a simple maximum on the size of all event batches. There are no longer performance implications in its relationship to `bulk_max_size`. {pull}37795[37795]

*Auditbeat*

- Add opt-in `KProbes` backend for file_integrity module. {pull}37796[37796]

*Filebeat*

- Convert netflow input to API v2 and disable event normalisation {pull}37901[37901]


*Heartbeat*

Expand Down Expand Up @@ -66,7 +70,7 @@ fields added to events containing the Beats version. {pull}37553[37553]
- aws: Add credential caching for `AssumeRole` session tokens. {issue}37787[37787]
- Lower logging level to debug when attempting to configure beats with unknown fields from autodiscovered events/environments {pull}[37816][37816]
- Set timeout of 1 minute for FQDN requests {pull}37756[37756]

- Fix the paths in the .cmd script added to the path by the Windows MSI to point to the new C:\Program Files installation location. https://github.com/elastic/elastic-stack-installers/pull/238

*Auditbeat*

Expand All @@ -90,6 +94,7 @@ fields added to events containing the Beats version. {pull}37553[37553]
- Fix TCP/UDP metric queue length parsing base. {pull}37714[37714]
- Update github.com/lestrrat-go/jwx dependency. {pull}37799[37799]
- [threatintel] MISP pagination fixes {pull}37898[37898]
- Fix file handle leak when handling errors in filestream {pull}37973[37973]

*Heartbeat*

Expand Down Expand Up @@ -126,10 +131,12 @@ Setting environmental variable ELASTIC_NETINFO:false in Elastic Agent pod will d
- The Elasticsearch output can now configure performance presets with the `preset` configuration field. {pull}37259[37259]
- Upgrade to elastic-agent-libs v0.7.3 and golang.org/x/crypto v0.17.0. {pull}37544[37544]
- Make more selective the Pod autodiscovery upon node and namespace update events. {issue}37338[37338] {pull}37431[37431]
- Upgrade go-sysinfo from 1.12.0 to 1.13.1. {pull}37996[37996]

*Auditbeat*

- Add linux capabilities to processes in the system/process. {pull}37453[37453]
- Add opt-in eBPF backend for file_integrity module. {pull}37223[37223]

*Filebeat*

Expand Down Expand Up @@ -176,7 +183,8 @@ Setting environmental variable ELASTIC_NETINFO:false in Elastic Agent pod will d
- Prevent complete loss of long request trace data. {issue}37826[37826] {pull}37836[37836]
- Added experimental version of the Websocket Input. {pull}37774[37774]
- Add support for PEM-based Okta auth in CEL. {pull}37813[37813]
- Update CEL mito extensions to v1.9.0 to add keys/values helper. {pull}[]
- Add ETW input. {pull}36915[36915]
- Update CEL mito extensions to v1.9.0 to add keys/values helper. {pull}37971[37971]

*Auditbeat*

Expand Down

0 comments on commit 2353cea

Please sign in to comment.