Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into feature/module-at…
Browse files Browse the repository at this point in the history
…-stage-level

* upstream/master: (30 commits)
  Add a GRPC listener service for Agent (elastic#18827)
  Disable host.* fields by default for iptables module (elastic#18756)
  [WIP] Clarify capabilities of the Filebeat auditd module (elastic#17068)
  fix: rename file and remove extra separator (elastic#18881)
  ci: enable JJBB (elastic#18812)
  Disable host.* fields by default for Checkpoint module (elastic#18754)
  Disable host.* fields by default for Cisco module (elastic#18753)
  Update latest.yml testing env to 7.7.0 (elastic#18535)
  Upgrade k8s.io/client-go and k8s keystore tests (elastic#18817)
  Add missing Jenkins stages for Auditbeat (elastic#18835)
  [Elastic Log Driver] Create a config shim between libbeat and the user (elastic#18605)
  Use indexers and matchers in config when defaults are enabled (elastic#18818)
  Fix panic on `metricbeat test modules` (elastic#18797)
  [CI] Fix permissions in MacOSX agents (elastic#18847)
  [Ingest Manager] When not port are specified and the https is used fallback to 443 (elastic#18844)
  [Ingest Manager] Fix install service script for windows (elastic#18814)
  [Metricbeat] Fix getting compute instance metadata with partial zone/region config (elastic#18757)
  Improve error messages in s3 input (elastic#18824)
  Add memory metrics into compute googlecloud (elastic#18802)
  include bucket name when logging error (elastic#18679)
  ...
  • Loading branch information
v1v committed Jun 2, 2020
2 parents a449455 + 6e91ce4 commit 7509af0
Show file tree
Hide file tree
Showing 1,176 changed files with 186,217 additions and 63,455 deletions.
90 changes: 90 additions & 0 deletions .ci/build-docker-images.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
#!/usr/bin/env groovy

@Library('apm@current') _

pipeline {
agent { label 'linux && immutable' }
environment {
REPO = 'beats'
BASE_DIR = "src/github.com/elastic/${env.REPO}"
DOCKER_REGISTRY = 'docker.elastic.co'
DOCKER_REGISTRY_SECRET = 'secret/observability-team/ci/docker-registry/prod'
GOPATH = "${env.WORKSPACE}"
HOME = "${env.WORKSPACE}"
JOB_GCS_BUCKET = credentials('gcs-bucket')
NOTIFY_TO = credentials('notify-to')
PATH = "${env.GOPATH}/bin:${env.PATH}"
PIPELINE_LOG_LEVEL='INFO'
}
options {
timeout(time: 1, unit: 'HOURS')
buildDiscarder(logRotator(numToKeepStr: '20', artifactNumToKeepStr: '20'))
timestamps()
ansiColor('xterm')
disableResume()
durabilityHint('PERFORMANCE_OPTIMIZED')
rateLimitBuilds(throttle: [count: 60, durationName: 'hour', userBoost: true])
quietPeriod(10)
}
triggers {
cron 'H H(0-5) * * 1-5'
}
parameters {
booleanParam(name: "RELEASE_TEST_IMAGES", defaultValue: "true", description: "If it's needed to build & push Beats' test images")
}
stages {
stage('Checkout') {
steps {
dir("${BASE_DIR}"){
git("https://github.com/elastic/${REPO}.git")
}
script {
dir("${BASE_DIR}"){
env.GO_VERSION = readFile(".go-version").trim()
}
}
}
}
stage('Install dependencies') {
when {
expression { return params.RELEASE_TEST_IMAGES }
}
steps {
sh(label: 'Install virtualenv', script: 'pip install --user virtualenv')
}
}
stage('Release Beats Test Docker images'){
options {
warnError('Release Beats Docker images failed')
}
when {
expression { return params.RELEASE_TEST_IMAGES }
}
steps {
dockerLogin(secret: "${env.DOCKER_REGISTRY_SECRET}", registry: "${env.DOCKER_REGISTRY}")
retry(3){
sh(label: 'Build ', script: ".ci/scripts/build-beats-integrations-test-images.sh '${GO_VERSION}' '${HOME}/${BASE_DIR}/metricbeat'")
}
}
}
stage('Release X-Pack Beats Test Docker images'){
options {
warnError('Release X-Pack Beats Docker images failed')
}
when {
expression { return params.RELEASE_TEST_IMAGES }
}
steps {
dockerLogin(secret: "${env.DOCKER_REGISTRY_SECRET}", registry: "${env.DOCKER_REGISTRY}")
retry(3){
sh(label: 'Build ', script: ".ci/scripts/build-beats-integrations-test-images.sh '${GO_VERSION}' '${HOME}/${BASE_DIR}/x-pack/metricbeat'")
}
}
}
}
post {
cleanup {
notifyBuildResult()
}
}
}
22 changes: 22 additions & 0 deletions .ci/jobs/build-it-docker-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
- job:
name: Beats/build-it-docker-images
display-name: ITs Docker images
description: Job to pre-build docker images used in integration tests.
view: Beats
project-type: pipeline
pipeline-scm:
script-path: .ci/build-docker-images.groovy
scm:
- git:
url: [email protected]:elastic/beats.git
refspec: +refs/heads/*:refs/remotes/origin/* +refs/pull/*/head:refs/remotes/origin/pr/*
wipe-workspace: 'True'
name: origin
shallow-clone: true
credentials-id: f6c7695a-671e-4f4f-a331-acdce44ff9ba
reference-repo: /var/lib/jenkins/.git-references/beats.git
branches:
- 'master'
triggers:
- timed: 'H H(0-5) * * 1-5'
20 changes: 20 additions & 0 deletions .ci/jobs/defaults.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

---

##### GLOBAL METADATA

- meta:
cluster: beats-ci

##### JOB DEFAULTS

- job:
logrotate:
numToKeep: 20
node: linux
concurrent: true
publishers:
- email:
recipients: [email protected]
periodic-folder-trigger: 1w
prune-dead-branches: true
52 changes: 52 additions & 0 deletions .ci/scripts/build-beats-integrations-test-images.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#!/usr/bin/env bash
set -exo pipefail

#
# Install the given go version using the gimme script.
#
# Parameters:
# - GO_VERSION - that's the version which will be installed and enabled.
# - METRICBEAT_DIR - that's the location of the metricbeat directory.
#

readonly GO_VERSION="${1?Please define the Go version to be used}"
readonly METRICBEAT_DIR="${2?Please define the location of the Metricbeat directory}"

function build_test_images() {
local metricbeatDir="${1}"

cd "${metricbeatDir}"
mage compose:buildSupportedVersions
}

function install_go() {
local goVersion="${1}"

# Install Go using the same travis approach
echo "Installing ${goVersion} with gimme."
eval "$(curl -sL https://raw.githubusercontent.com/travis-ci/gimme/master/gimme | GIMME_GO_VERSION=${goVersion} bash)"
}

function install_mage() {
local metricbeatDir="${1}"

cd "${metricbeatDir}"
make mage
}

function push_test_images() {
local metricbeatDir="${1}"

cd "${metricbeatDir}"
mage compose:pushSupportedVersions
}

function main() {
install_go "${GO_VERSION}"
install_mage "${METRICBEAT_DIR}"

build_test_images "${METRICBEAT_DIR}"
push_test_images "${METRICBEAT_DIR}"
}

main "$@"
30 changes: 23 additions & 7 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,24 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- File integrity dataset (macOS): Replace unnecessary `file.origin.raw` (type keyword) with `file.origin.text` (type `text`). {issue}12423[12423] {pull}15630[15630]

*Filebeat*

- Improve ECS field mappings in panw module. event.outcome now only contains success/failure per ECS specification. {issue}16025[16025] {pull}17910[17910]
- Improve ECS categorization field mappings for nginx module. http.request.referrer is now lowercase & http.request.referrer only populated when nginx sets a value {issue}16174[16174] {pull}17844[17844]
- Improve ECS categorization field mappings for nginx module. http.request.referrer only populated when nginx sets a value {issue}16174[16174] {pull}17844[17844]
- Improve ECS field mappings in santa module. move hash.sha256 to process.hash.sha256 & move certificate fields to santa.certificate . {issue}16180[16180] {pull}17982[17982]
- With the default configuration the cloud modules (aws, azure, googlecloud, o365, okta)
will no longer send the `host` field that contains information about the host Filebeat is
running on. This is because the `host` field specifies the host on which the event
happened. {issue}13920[13920] {pull}18223[18223]
- With the default configuration the cef and panw modules will no longer send the `host`
field. You can revert this change by configuring tags for the module and omitting
`forwarded` from the list. {issue}13920[13920] {pull}18223[18223]
will no longer send the `host` field that contains information about the host Filebeat is
running on. This is because the `host` field specifies the host on which the event
happened. {issue}13920[13920] {pull}18223[18223]
- With the default configuration the following modules will no longer send the `host`
field that contains information about the host on which Filebeat is running.
You can revert this change by configuring tags for the module and omitting
`forwarded` from the list. {issue}13920[13920]
* CEF {pull}18223[18223]
* PANW {pull}18223[18223]
* Cisco {pull}18753[18753]
* iptables {pull}18756[18756]
* Checkpoint {pull}18754[18754]
- Preserve case of http.request.method. ECS prior to 1.6 specified normalizing to lowercase, which lost information. Affects filesets: apache/access, elasticsearch/audit, iis/access, iis/error, nginx/access, nginx/ingress_controller, aws/elb, suricata/eve, zeek/http. {issue}18154[18154] {pull}18359[18359]

*Heartbeat*

Expand All @@ -58,6 +66,7 @@ field. You can revert this change by configuring tags for the module and omittin
- Improve ECS field mappings in Sysmon module. Hashes are now also populated to the corresponding `process.hash`, `process.pe.imphash`, `file.hash`, or `file.pe.imphash`. {issue}18364[18364]
- Improve ECS field mappings in Sysmon module. `file.name`, `file.directory`, and `file.extension` are now populated. {issue}18364[18364]
- Improve ECS field mappings in Sysmon module. `rule.name` is populated for all events when present. {issue}18364[18364]
- Add Powershell module. Support for event ID's: `400`, `403`, `600`, `800`, `4103`, `4014`, `4105`, `4106`. {issue}16262[16262] {pull}18526[18526]

*Functionbeat*

Expand Down Expand Up @@ -102,6 +111,7 @@ field. You can revert this change by configuring tags for the module and omittin
- [Autodiscover] Check if runner is already running before starting again. {pull}18564[18564]
- Fix `keystore add` hanging under Windows. {issue}18649[18649] {pull}18654[18654]
- Fix an issue where error messages are not accurate in mapstriface. {issue}18662[18662] {pull}18663[18663]
- Fix regression in `add_kubernetes_metadata`, so configured `indexers` and `matchers` are used if defaults are not disabled. {issue}18481[18481] {pull}18818[18818]

*Auditbeat*

Expand Down Expand Up @@ -150,6 +160,7 @@ field. You can revert this change by configuring tags for the module and omittin
- Fix a rate limit related issue in httpjson input for Okta module. {issue}18530[18530] {pull}18534[18534]
- Fix `googlecloud.audit` pipeline to only take in fields that are explicitly defined by the dataset. {issue}18465[18465] {pull}18472[18472]
- Fix `o365.audit` failing to ingest events when ip address is surrounded by square brackets. {issue}18587[18587] {pull}18591[18591]
- Fix Kubernetes Watcher goroutine leaks when input config is invalid and `input.reload` is enabled. {issue}18629[18629] {pull}18630[18630]

*Heartbeat*

Expand Down Expand Up @@ -203,6 +214,9 @@ field. You can revert this change by configuring tags for the module and omittin
- Remove specific win32 api errors from events in perfmon. {issue}18292[18292] {pull}18361[18361]
- Fix application_pool metricset after pdh changes. {pull}18477[18477]
- Fix tags_filter for cloudwatch metricset in aws. {pull}18524[18524]
- Fix panic on `metricbeat test modules` when modules are configured in `metricbeat.modules`. {issue}18789[18789] {pull}18797[18797]
- Fix getting gcp compute instance metadata with partial zone/region in config. {pull}18757[18757]
- Add missing network.sent_packets_count metric into compute metricset in googlecloud module. {pull}18802[18802]

*Packetbeat*

Expand Down Expand Up @@ -252,6 +266,7 @@ field. You can revert this change by configuring tags for the module and omittin
- Add backoff configuration options for the Kafka output. {issue}16777[16777] {pull}17808[17808]
- Add TLS support to Kerberos authentication in Elasticsearch. {pull}18607[18607]
- Change ownership of files in docker images so they can be used in secured environments. {pull}12905[12905]
- Upgrade k8s.io/client-go and k8s keystore tests. {pull}18817[18817]

*Auditbeat*

Expand Down Expand Up @@ -437,6 +452,7 @@ field. You can revert this change by configuring tags for the module and omittin
- Update MSSQL module to fix some SSPI authentication and add brackets to USE statements {pull}17862[17862]]
- Add client address to events from http server module {pull}18336[18336]
- Remove required for region/zone and make stackdriver a metricset in googlecloud. {issue}16785[16785] {pull}18398[18398]
- Add memory metrics into compute googlecloud. {pull}18802[18802]

*Packetbeat*

Expand Down
Loading

0 comments on commit 7509af0

Please sign in to comment.