diff --git a/.ci/apm-beats-update.groovy b/.ci/apm-beats-update.groovy index 407b9851314f..c413987fafbd 100644 --- a/.ci/apm-beats-update.groovy +++ b/.ci/apm-beats-update.groovy @@ -81,7 +81,7 @@ pipeline { when { beforeAgent true anyOf { - branch 'master' + branch 'main' branch "\\d+\\.\\d+" branch "v\\d?" tag "v\\d+\\.\\d+\\.\\d+*" diff --git a/.ci/beats-tester-bc.groovy b/.ci/beats-tester-bc.groovy index d026fa77a15a..7916c4252357 100644 --- a/.ci/beats-tester-bc.groovy +++ b/.ci/beats-tester-bc.groovy @@ -24,7 +24,7 @@ pipeline { } parameters { string(name: 'version', defaultValue: '', description: 'Id of the Build Candidate (7.10.0-b55684ff).') - string(name: 'BRANCH_REFERENCE', defaultValue: 'master', description: 'Branch to grab the Groovy script(for test changes).') + string(name: 'BRANCH_REFERENCE', defaultValue: 'main', description: 'Branch to grab the Groovy script(for test changes).') } stages { stage('Run Beat Tester') { diff --git a/.ci/beats-tester.groovy b/.ci/beats-tester.groovy index ef0b83828265..d46575ac3b6c 100644 --- a/.ci/beats-tester.groovy +++ b/.ci/beats-tester.groovy @@ -50,9 +50,9 @@ pipeline { setEnvVar('VERSION', sh(script: "grep ':stack-version:' ${BASE_DIR}/libbeat/docs/version.asciidoc | cut -d' ' -f2", returnStdout: true).trim()) } } - stage('Build master') { + stage('Build main') { options { skipDefaultCheckout() } - when { branch 'master' } + when { branch 'main' } steps { runBeatsTesterJob(version: "${env.VERSION}-SNAPSHOT") } @@ -78,7 +78,7 @@ pipeline { when { not { anyOf { - branch comparator: 'REGEXP', pattern: '(master|.*x)' + branch comparator: 'REGEXP', pattern: '(main|.*x)' changeRequest() } } diff --git a/.ci/build-docker-images.groovy b/.ci/build-docker-images.groovy index a59aeb8da8f8..10235921eb2a 100644 --- a/.ci/build-docker-images.groovy +++ b/.ci/build-docker-images.groovy @@ -29,7 +29,7 @@ pipeline { } parameters { booleanParam(name: "RELEASE_TEST_IMAGES", defaultValue: "true", description: "If it's needed to build & push Beats' test images") - string(name: 'BRANCH_REFERENCE', defaultValue: "master", description: "Git branch/tag to use") + string(name: 'BRANCH_REFERENCE', defaultValue: "main", description: "Git branch/tag to use") } stages { stage('Checkout') { diff --git a/.ci/jobs/apm-beats-update.yml b/.ci/jobs/apm-beats-update.yml index a1fe03b0df2c..0dde3aab8dbb 100644 --- a/.ci/jobs/apm-beats-update.yml +++ b/.ci/jobs/apm-beats-update.yml @@ -1,7 +1,7 @@ - job: name: Beats/apm-beats-update display-name: 'APM Server Beats update' - description: 'Check if the Beats lib update works on the APM server master branch' + description: 'Check if the Beats lib update works on the APM server main branch' view: Beats concurrent: true project-type: multibranch @@ -18,7 +18,7 @@ discover-pr-forks-trust: 'permission' discover-pr-origin: 'merge-current' discover-tags: true - head-filter-regex: '(master|7\.1[6789]|8\.\d+|PR-.*|v\d+\.\d+\.\d+)' + head-filter-regex: '(main|7\.1[6789]|8\.\d+|PR-.*|v\d+\.\d+\.\d+)' disable-pr-notifications: true notification-context: 'apm-beats-update' repo: 'beats' @@ -33,7 +33,7 @@ ignore-tags-newer-than: 30 - named-branches: - exact-name: - name: 'master' + name: 'main' case-sensitive: true - regex-name: regex: '7\.1[6789]' diff --git a/.ci/jobs/beats-schedule-daily.yml b/.ci/jobs/beats-schedule-daily.yml index 308c5e91c9bd..8bf6467f3c01 100644 --- a/.ci/jobs/beats-schedule-daily.yml +++ b/.ci/jobs/beats-schedule-daily.yml @@ -8,7 +8,7 @@ parameters: - string: name: branch_specifier - default: master + default: main description: the Git branch specifier to build pipeline-scm: script-path: .ci/schedule-daily.groovy diff --git a/.ci/jobs/beats-schedule-weekly.yml b/.ci/jobs/beats-schedule-weekly.yml index 67fb3191eb20..9fa7619f66d2 100644 --- a/.ci/jobs/beats-schedule-weekly.yml +++ b/.ci/jobs/beats-schedule-weekly.yml @@ -8,7 +8,7 @@ parameters: - string: name: branch_specifier - default: master + default: main description: the Git branch specifier to build pipeline-scm: script-path: .ci/schedule-weekly.groovy diff --git a/.ci/jobs/beats-test-infra.yml b/.ci/jobs/beats-test-infra.yml index 9e727d847f18..daf2b54ed331 100644 --- a/.ci/jobs/beats-test-infra.yml +++ b/.ci/jobs/beats-test-infra.yml @@ -17,6 +17,6 @@ credentials-id: f6c7695a-671e-4f4f-a331-acdce44ff9ba reference-repo: /var/lib/jenkins/.git-references/apm-test-pipeline.git branches: - - master + - main triggers: - timed: 'H H(3-4) * * 1-5' diff --git a/.ci/jobs/beats-tester-bc.yml b/.ci/jobs/beats-tester-bc.yml index f9a16606615f..ecd8fef1f5de 100644 --- a/.ci/jobs/beats-tester-bc.yml +++ b/.ci/jobs/beats-tester-bc.yml @@ -9,7 +9,7 @@ parameters: - string: name: BRANCH_REFERENCE - default: master + default: main description: the Git branch specifier pipeline-scm: script-path: .ci/beats-tester-bc.groovy diff --git a/.ci/jobs/beats-tester.yml b/.ci/jobs/beats-tester.yml index dc268c0eefa5..5f9560ed2f0e 100644 --- a/.ci/jobs/beats-tester.yml +++ b/.ci/jobs/beats-tester.yml @@ -14,7 +14,7 @@ discover-pr-forks-trust: 'permission' discover-pr-origin: 'merge-current' discover-tags: true - head-filter-regex: '(master|7\.1[6789]|8\.\d+|PR-.*|v\d+\.\d+\.\d+)' + head-filter-regex: '(main|7\.1[6789]|8\.\d+|PR-.*|v\d+\.\d+\.\d+)' disable-pr-notifications: true notification-context: 'beats-tester' repo: 'beats' @@ -29,7 +29,7 @@ ignore-tags-newer-than: 30 - named-branches: - exact-name: - name: 'master' + name: 'main' case-sensitive: true - regex-name: regex: '7\.1[6789]' diff --git a/.ci/jobs/beats.yml b/.ci/jobs/beats.yml index 638051d8a2e6..9a26975df57b 100644 --- a/.ci/jobs/beats.yml +++ b/.ci/jobs/beats.yml @@ -17,7 +17,7 @@ discover-pr-forks-strategy: 'merge-current' discover-pr-forks-trust: 'permission' discover-pr-origin: 'merge-current' - head-filter-regex: '(master|6\.[89]|7\.1[6789]|8\.\d+|PR-.*|v\d+\.\d+\.\d+)' + head-filter-regex: '(main|6\.[89]|7\.1[6789]|8\.\d+|PR-.*|v\d+\.\d+\.\d+)' discover-tags: true notification-context: "beats-ci" repo: 'beats' @@ -33,7 +33,7 @@ ignore-target-only-changes: true - named-branches: - exact-name: - name: 'master' + name: 'main' case-sensitive: true - regex-name: regex: '6\.[89]' diff --git a/.ci/jobs/build-it-docker-images.yml b/.ci/jobs/build-it-docker-images.yml index 98a58de8481a..d5dfc956426d 100644 --- a/.ci/jobs/build-it-docker-images.yml +++ b/.ci/jobs/build-it-docker-images.yml @@ -8,7 +8,7 @@ parameters: - string: name: BRANCH_REFERENCE - default: master + default: main description: the Git branch specifier pipeline-scm: script-path: .ci/build-docker-images.groovy diff --git a/.ci/jobs/packaging.yml b/.ci/jobs/packaging.yml index 97f9462d8f6b..a9d3f4bf00c8 100644 --- a/.ci/jobs/packaging.yml +++ b/.ci/jobs/packaging.yml @@ -14,7 +14,7 @@ discover-pr-forks-trust: 'permission' discover-pr-origin: 'merge-current' discover-tags: true - head-filter-regex: '(master|7\.1[6789]|8\.\d+|PR-.*|v\d+\.\d+\.\d+)' + head-filter-regex: '(main|7\.1[6789]|8\.\d+|PR-.*|v\d+\.\d+\.\d+)' disable-pr-notifications: true notification-context: 'beats-packaging' repo: 'beats' @@ -29,7 +29,7 @@ ignore-tags-newer-than: 30 - named-branches: - exact-name: - name: 'master' + name: 'main' case-sensitive: true - regex-name: regex: '7\.1[6789]' diff --git a/.ci/packer_cache.sh b/.ci/packer_cache.sh index 9b4443769245..7a258a99b6a5 100755 --- a/.ci/packer_cache.sh +++ b/.ci/packer_cache.sh @@ -76,8 +76,8 @@ if [ -x "$(command -v docker)" ]; then ## Probably we need a different approach to search the latest minor. latestMinor=$(curl -s https://api.github.com/repos/elastic/beats/branches\?per_page=100 | jq -r '.[].name' | grep "^7." | tail -1) - for branch in master 7.x $latestMinor ; do - if [ "$branch" != "master" ] ; then + for branch in main $latestMinor ; do + if [ "$branch" != "main" ] ; then echo "Checkout the branch $branch" git checkout "$branch" fi diff --git a/.ci/schedule-daily.groovy b/.ci/schedule-daily.groovy index a326d9759cf4..4372d6bd10ec 100644 --- a/.ci/schedule-daily.groovy +++ b/.ci/schedule-daily.groovy @@ -20,7 +20,7 @@ pipeline { stages { stage('Nighly beats builds') { steps { - runBuilds(quietPeriodFactor: 2000, branches: ['master', '8.', '7.', '7.']) + runBuilds(quietPeriodFactor: 2000, branches: ['main', '8.', '7.', '7.']) } } } diff --git a/.ci/schedule-weekly.groovy b/.ci/schedule-weekly.groovy index a42ae7934fd0..065ace13cc25 100644 --- a/.ci/schedule-weekly.groovy +++ b/.ci/schedule-weekly.groovy @@ -20,7 +20,7 @@ pipeline { stages { stage('Weekly beats builds') { steps { - runBuilds(quietPeriodFactor: 1000, branches: ['master', '8.', '7.', '7.']) + runBuilds(quietPeriodFactor: 1000, branches: ['main', '8.', '7.', '7.']) } } } diff --git a/.mergify.yml b/.mergify.yml index 85640db1a3f7..18ab7689c64f 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -3,16 +3,16 @@ queue_rules: conditions: - check-success=beats-ci/pr-merge pull_request_rules: - - name: forward-port patches to master branch + - name: forward-port patches to main branch conditions: - merged - - label=forwardport-master + - label=forwardport-main actions: backport: assignees: - "{{ author }}" branches: - - "master" + - "main" labels: - "backport" title: "[{{ destination_branch }}](backport #{{ number }}) {{ title }}" @@ -135,7 +135,7 @@ pull_request_rules: - name: notify the backport policy conditions: - -label~=^backport - - base=master + - base=main - -merged - -closed actions: diff --git a/CHANGELOG-developer.asciidoc b/CHANGELOG-developer.asciidoc index cb4d421db8f8..8fb43329f668 100644 --- a/CHANGELOG-developer.asciidoc +++ b/CHANGELOG-developer.asciidoc @@ -13,7 +13,7 @@ other Beats should be migrated. Note: This changelog was only started after the 6.3 release. === Beats version 8.0.0 -https://github.com/elastic/beats/compare/7.x..master[Check the HEAD diff] +https://github.com/elastic/beats/compare/7.x..main[Check the HEAD diff] ==== Breaking changes - Replace custom Pins type for a slice of string for defining the `ca_sha256` values. diff --git a/CHANGELOG-developer.next.asciidoc b/CHANGELOG-developer.next.asciidoc index d9bf695a13d5..77740f117045 100644 --- a/CHANGELOG-developer.next.asciidoc +++ b/CHANGELOG-developer.next.asciidoc @@ -14,9 +14,9 @@ Note: This changelog documents the current changes which are not yet present in an actual release. === Beats version HEAD -https://github.com/elastic/beats/compare/v7.0.0-rc2..master[Check the HEAD diff] +https://github.com/elastic/beats/compare/v7.0.0-rc2..main[Check the HEAD diff] -The list below covers the major changes between 7.0.0-rc2 and master only. +The list below covers the major changes between 7.0.0-rc2 and main only. ==== Breaking changes diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 24a6c61eb73d..905b5a65886c 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -4,7 +4,7 @@ :pull: https://github.com/elastic/beats/pull/ === Beats version HEAD -https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD diff] +https://github.com/elastic/beats/compare/v7.0.0-alpha2...main[Check the HEAD diff] ==== Breaking changes @@ -80,6 +80,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d - Improve ECS field mappings in Sysmon module. `rule.name` is populated for all events when present. {issue}18364[18364] - Remove top level `hash` property from sysmon events {pull}20653[20653] - Move module processing from local Javascript processor to ingest node {issue}29184[29184] {pull}29435[29435] +- Fix run loop when reading from evtx file {pull}30006[30006] *Functionbeat* diff --git a/Jenkinsfile b/Jenkinsfile index 0f8fbcf25964..59154ca4cb4a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -242,7 +242,7 @@ def runBuildAndTest(Map args = [:]) { /** -* There are only two supported branches, master and 7.x +* Only supported the main branch */ def getFlakyBranch() { if(isPR()) { @@ -253,17 +253,10 @@ def getFlakyBranch() { } /** -* There are only two supported branches, master and 7.x +* Only supported the main branch */ def getBranchIndice(String compare) { - if (compare?.equals('master') || compare.equals('7.x')) { - return compare - } else { - if (compare.startsWith('7.')) { - return '7.x' - } - } - return 'master' + return 'main' } /** diff --git a/README.md b/README.md index 6707fced374d..7c0609643f56 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Build Status](https://beats-ci.elastic.co/job/Beats/job/beats/job/master/badge/icon)](https://beats-ci.elastic.co/job/Beats/job/beats/job/master/) +[![Build Status](https://beats-ci.elastic.co/job/Beats/job/beats/job/main/badge/icon)](https://beats-ci.elastic.co/job/Beats/job/beats/job/main/) [![GoReportCard](http://goreportcard.com/badge/elastic/beats)](http://goreportcard.com/report/elastic/beats) [![Reviewed by Hound](https://img.shields.io/badge/Reviewed_by-Hound-8E64B0.svg)](https://houndci.com) @@ -14,19 +14,19 @@ By "lightweight", we mean that Beats have a small installation footprint, use limited system resources, and have no runtime dependencies. This repository contains -[libbeat](https://github.com/elastic/beats/tree/master/libbeat), our Go +[libbeat](https://github.com/elastic/beats/tree/main/libbeat), our Go framework for creating Beats, and all the officially supported Beats: Beat | Description --- | --- -[Auditbeat](https://github.com/elastic/beats/tree/master/auditbeat) | Collect your Linux audit framework data and monitor the integrity of your files. -[Filebeat](https://github.com/elastic/beats/tree/master/filebeat) | Tails and ships log files -[Functionbeat](https://github.com/elastic/beats/tree/master/x-pack/functionbeat) | Read and ships events from serverless infrastructure. -[Heartbeat](https://github.com/elastic/beats/tree/master/heartbeat) | Ping remote services for availability -[Metricbeat](https://github.com/elastic/beats/tree/master/metricbeat) | Fetches sets of metrics from the operating system and services -[Packetbeat](https://github.com/elastic/beats/tree/master/packetbeat) | Monitors the network and applications by sniffing packets -[Winlogbeat](https://github.com/elastic/beats/tree/master/winlogbeat) | Fetches and ships Windows Event logs -[Osquerybeat](https://github.com/elastic/beats/tree/master/x-pack/osquerybeat) | Runs Osquery and manages interraction with it. +[Auditbeat](https://github.com/elastic/beats/tree/main/auditbeat) | Collect your Linux audit framework data and monitor the integrity of your files. +[Filebeat](https://github.com/elastic/beats/tree/main/filebeat) | Tails and ships log files +[Functionbeat](https://github.com/elastic/beats/tree/main/x-pack/functionbeat) | Read and ships events from serverless infrastructure. +[Heartbeat](https://github.com/elastic/beats/tree/main/heartbeat) | Ping remote services for availability +[Metricbeat](https://github.com/elastic/beats/tree/main/metricbeat) | Fetches sets of metrics from the operating system and services +[Packetbeat](https://github.com/elastic/beats/tree/main/packetbeat) | Monitors the network and applications by sniffing packets +[Winlogbeat](https://github.com/elastic/beats/tree/main/winlogbeat) | Fetches and ships Windows Event logs +[Osquerybeat](https://github.com/elastic/beats/tree/main/x-pack/osquerybeat) | Runs Osquery and manages interraction with it. In addition to the above Beats, which are officially supported by [Elastic](https://elastic.co), the community has created a set of other Beats @@ -79,7 +79,7 @@ your dev environment to build Beats from the source. ## Snapshots -For testing purposes, we generate snapshot builds that you can find [here](https://artifacts-api.elastic.co/v1/search/8.0-SNAPSHOT/). Please be aware that these are built on top of master and are not meant for production. +For testing purposes, we generate snapshot builds that you can find [here](https://artifacts-api.elastic.co/v1/search/8.0-SNAPSHOT/). Please be aware that these are built on top of main and are not meant for production. ## CI diff --git a/dev-tools/cherrypick_pr b/dev-tools/cherrypick_pr index dbac7ec3472a..d9dc41b1b7b4 100755 --- a/dev-tools/cherrypick_pr +++ b/dev-tools/cherrypick_pr @@ -57,7 +57,7 @@ def main(): help="Assume yes. Warning: discards local changes.") parser.add_argument("--continue", action="store_true", help="Continue after fixing merging errors.") - parser.add_argument("--from_branch", default="master", + parser.add_argument("--from_branch", default="main", help="From branch") parser.add_argument("--create_pr", action="store_true", help="Create a PR using the Github API " + diff --git a/dev-tools/merge_pr b/dev-tools/merge_pr index 9664a8cfc338..0a4c3f19324b 100755 --- a/dev-tools/merge_pr +++ b/dev-tools/merge_pr @@ -10,7 +10,7 @@ def main(): parser.add_argument("from_branch", help="From branch (e.g 1.1)") parser.add_argument("to_branch", - help="To branch (e.g master)") + help="To branch (e.g main)") parser.add_argument("--yes", action="store_true", help="Assume yes. Warning: discards local changes.") parser.add_argument("--continue", action="store_true", diff --git a/dev-tools/open_pr b/dev-tools/open_pr index c208a76f89cf..5a96939d2858 100755 --- a/dev-tools/open_pr +++ b/dev-tools/open_pr @@ -12,7 +12,7 @@ from os.path import expanduser usage = """ Example usage: -Open PR against master, with the review label: +Open PR against main, with the review label: ./dev-tools/open_pr --remote tsg @@ -36,7 +36,7 @@ def main(): parser.add_argument("--remote", default="origin", help="Your git remote to push the branch to.") - parser.add_argument("--branch", default="master", + parser.add_argument("--branch", default="main", help="Remote branch to open PR against (e.g 5.0)") parser.add_argument("--wip", action="store_true", help="Add the `in progress` label") diff --git a/docs/devguide/contributing.asciidoc b/docs/devguide/contributing.asciidoc index ae9e4a1ee8e4..13035d608b2d 100644 --- a/docs/devguide/contributing.asciidoc +++ b/docs/devguide/contributing.asciidoc @@ -27,13 +27,13 @@ You only need to sign the CLA once. . Send a pull request! Push your changes to your fork of the repository and https://help.github.com/articles/using-pull-requests[submit a pull request] using our -<>. New PRs go to the master branch. The Beats +<>. New PRs go to the main branch. The Beats core team will backport your PR if it is necessary. In the pull request, describe what your changes do and mention any bugs/issues related to the pull request. Please also add a changelog entry to -https://github.com/elastic/beats/blob/master/CHANGELOG.next.asciidoc[CHANGELOG.next.asciidoc]. +https://github.com/elastic/beats/blob/main/CHANGELOG.next.asciidoc[CHANGELOG.next.asciidoc]. [float] [[setting-up-dev-environment]] @@ -199,4 +199,4 @@ The following packages are required to run `go generate`: To keep up to date with changes to the official Beats for community developers, follow the developer changelog -https://github.com/elastic/beats/blob/master/CHANGELOG-developer.next.asciidoc[here]. +https://github.com/elastic/beats/blob/main/CHANGELOG-developer.next.asciidoc[here]. diff --git a/docs/devguide/create-metricset.asciidoc b/docs/devguide/create-metricset.asciidoc index fd60e25dd3ae..2c2d798086b1 100644 --- a/docs/devguide/create-metricset.asciidoc +++ b/docs/devguide/create-metricset.asciidoc @@ -63,7 +63,7 @@ The first file is `{metricset}.go`. It contains the logic on how to fetch data f The generated file looks like this: -https://github.com/elastic/beats/blob/master/metricbeat/scripts/module/metricset/metricset.go.tmpl +https://github.com/elastic/beats/blob/main/metricbeat/scripts/module/metricset/metricset.go.tmpl [source,go] ---- diff --git a/docs/devguide/metricset-details.asciidoc b/docs/devguide/metricset-details.asciidoc index 80b5688f4c9b..e630994cae4b 100644 --- a/docs/devguide/metricset-details.asciidoc +++ b/docs/devguide/metricset-details.asciidoc @@ -315,7 +315,7 @@ TODO: The following parts should be added as soon as the content exists or the i [float] == Field naming -https://github.com/elastic/beats/blob/master/metricbeat/module/doc.go +https://github.com/elastic/beats/blob/main/metricbeat/module/doc.go [float] == Dashboards diff --git a/docs/devguide/migrate-dashboards.asciidoc b/docs/devguide/migrate-dashboards.asciidoc index 64e94d008e19..453b065c90e2 100644 --- a/docs/devguide/migrate-dashboards.asciidoc +++ b/docs/devguide/migrate-dashboards.asciidoc @@ -51,7 +51,7 @@ make update * Export the dashboards using Beats 6.0 version. You can export the dashboards via the Kibana API by using the -https://github.com/elastic/beats/blob/master/dev-tools/cmd/dashboards/export_dashboards.go[export_dashboards.go] +https://github.com/elastic/beats/blob/main/dev-tools/cmd/dashboards/export_dashboards.go[export_dashboards.go] application. For example, to export the Metricbeat rabbitmq dashboard: diff --git a/filebeat/_meta/test/docs/testing.md b/filebeat/_meta/test/docs/testing.md index 05836fcd65a8..190b75308912 100644 --- a/filebeat/_meta/test/docs/testing.md +++ b/filebeat/_meta/test/docs/testing.md @@ -3,8 +3,8 @@ ## Testing on Kubernetes ### Prerequisites -- create kubernetes cluster using kind, check [here](https://github.com/elastic/beats/blob/master/metricbeat/module/kubernetes/_meta/test/docs/README.md) for details -- deploy ELK stack, check [here](https://github.com/elastic/beats/blob/master/metricbeat/module/kubernetes/_meta/test/docs/README.md) for details +- create kubernetes cluster using kind, check [here](https://github.com/elastic/beats/blob/main/metricbeat/module/kubernetes/_meta/test/docs/README.md) for details +- deploy ELK stack, check [here](https://github.com/elastic/beats/blob/main/metricbeat/module/kubernetes/_meta/test/docs/README.md) for details ## Playground Filebeat Pod @@ -52,4 +52,4 @@ kubectl exec `kubectl get pod -n kube-system -l k8s-app=filebeat -o jsonpath='{. Filebeat will launch and the process logs will appear in the terminal. You can as well exec in filebeat pod with bash command and then run filebeat. -This gives the flexibility to easily start and stop the process. \ No newline at end of file +This gives the flexibility to easily start and stop the process. diff --git a/libbeat/docs/communitybeats.asciidoc b/libbeat/docs/communitybeats.asciidoc index ded8e7282477..04acac2693ad 100644 --- a/libbeat/docs/communitybeats.asciidoc +++ b/libbeat/docs/communitybeats.asciidoc @@ -15,7 +15,7 @@ Have a question about developing a community Beat? You can post questions and di https://discuss.elastic.co/tags/c/elastic-stack/beats/28/beats-development[Beats discussion forum]. Have you created a Beat that's not listed? Add the name and description of your Beat to the source document for -https://github.com/elastic/beats/blob/master/libbeat/docs/communitybeats.asciidoc[Community Beats] and https://help.github.com/articles/using-pull-requests[open a pull request] in the https://github.com/elastic/beats[Beats GitHub repository] to get your change merged. When you're ready, go ahead and https://discuss.elastic.co/c/announcements[announce] your new Beat in the Elastic +https://github.com/elastic/beats/blob/main/libbeat/docs/communitybeats.asciidoc[Community Beats] and https://help.github.com/articles/using-pull-requests[open a pull request] in the https://github.com/elastic/beats[Beats GitHub repository] to get your change merged. When you're ready, go ahead and https://discuss.elastic.co/c/announcements[announce] your new Beat in the Elastic discussion forum. ifndef::dev-guide[] diff --git a/libbeat/docs/upgrading.asciidoc b/libbeat/docs/upgrading.asciidoc index 6d2ae6478f78..b183312fc40e 100644 --- a/libbeat/docs/upgrading.asciidoc +++ b/libbeat/docs/upgrading.asciidoc @@ -74,7 +74,7 @@ https://www.elastic.co/blog/beats-6-7-0-released[Beats 6.7.0 release blog]. NOTE: {beats} central management has been removed starting in version 7.14.0. Looking for a replacement? Refer to the {fleet-guide}/index.html[Fleet and Elastic Agent Guide] to learn how to deploy -and centrally manage a single {agent} to monitor and secure each host. +and centrally manage a single {agent} to monitor and secure each host. ==== Upgrade {beats} binaries to 7.0 @@ -417,7 +417,7 @@ set as the default search fields, then specify the list of fields in the For example, here's a snippet that shows how to add default search fields to a Metricbeat 6.6 index. This example is truncated. Full examples for Metricbeat and Filebeat are available in -https://github.com/elastic/beats/blob/master/libbeat/docs/troubleshooting/default_field.md[this file]. +https://github.com/elastic/beats/blob/main/libbeat/docs/troubleshooting/default_field.md[this file]. [source,js] -------------------------------------------------- diff --git a/testing/environments/snapshot-oss.yml b/testing/environments/snapshot-oss.yml index 9103be2793ab..7be99e14b767 100644 --- a/testing/environments/snapshot-oss.yml +++ b/testing/environments/snapshot-oss.yml @@ -3,7 +3,7 @@ version: '2.3' services: elasticsearch: - image: docker.elastic.co/elasticsearch/elasticsearch:8.1.0-aa69d697-SNAPSHOT + image: docker.elastic.co/elasticsearch/elasticsearch:8.1.0-1cb1f3ad-SNAPSHOT healthcheck: test: ["CMD-SHELL", "curl -s http://localhost:9200/_cat/health?h=status | grep -q green"] retries: 300 @@ -21,7 +21,7 @@ services: - "script.context.template.cache_max_size=2000" logstash: - image: docker.elastic.co/logstash/logstash-oss:8.1.0-aa69d697-SNAPSHOT + image: docker.elastic.co/logstash/logstash-oss:8.1.0-1cb1f3ad-SNAPSHOT healthcheck: test: ["CMD", "curl", "-f", "http://localhost:9600/_node/stats"] retries: 600 @@ -31,7 +31,7 @@ services: - ./docker/logstash/pki:/etc/pki:ro kibana: - image: docker.elastic.co/kibana/kibana:8.1.0-aa69d697-SNAPSHOT + image: docker.elastic.co/kibana/kibana:8.1.0-1cb1f3ad-SNAPSHOT healthcheck: test: ["CMD-SHELL", "curl -s http://localhost:5601/api/status?v8format=true | grep -q '\"overall\":{\"level\":\"available\"'"] retries: 600 diff --git a/testing/environments/snapshot.yml b/testing/environments/snapshot.yml index 37cfff5df304..39891e1fe0fa 100644 --- a/testing/environments/snapshot.yml +++ b/testing/environments/snapshot.yml @@ -3,7 +3,7 @@ version: '2.3' services: elasticsearch: - image: docker.elastic.co/elasticsearch/elasticsearch:8.1.0-aa69d697-SNAPSHOT + image: docker.elastic.co/elasticsearch/elasticsearch:8.1.0-1cb1f3ad-SNAPSHOT # When extend is used it merges healthcheck.tests, see: # https://github.com/docker/compose/issues/8962 # healthcheck: @@ -42,7 +42,7 @@ services: - ./docker/logstash/pki:/etc/pki:ro kibana: - image: docker.elastic.co/kibana/kibana:8.1.0-aa69d697-SNAPSHOT + image: docker.elastic.co/kibana/kibana:8.1.0-1cb1f3ad-SNAPSHOT environment: - "ELASTICSEARCH_USERNAME=kibana_system_user" - "ELASTICSEARCH_PASSWORD=testing" diff --git a/winlogbeat/beater/eventlogger.go b/winlogbeat/beater/eventlogger.go index b7507cfe8c05..390a2fb39755 100644 --- a/winlogbeat/beater/eventlogger.go +++ b/winlogbeat/beater/eventlogger.go @@ -130,7 +130,7 @@ func (e *eventLogger) run( }() runLoop: - for { + for stop := false; !stop; { err = api.Open(state) if eventlog.IsRecoverable(err) { e.log.Warnw("Open() encountered recoverable error. Trying again...", "error", err) @@ -142,7 +142,7 @@ runLoop: } e.log.Debug("Opened successfully.") - for stop := false; !stop; { + for !stop { select { case <-done: return @@ -171,6 +171,9 @@ runLoop: e.log.Debugf("Read() returned %d records.", len(records)) if len(records) == 0 { time.Sleep(time.Second) + if stop { + return + } continue } diff --git a/x-pack/elastic-agent/README.md b/x-pack/elastic-agent/README.md index de45ded8e461..b57d9f9ed7e7 100644 --- a/x-pack/elastic-agent/README.md +++ b/x-pack/elastic-agent/README.md @@ -3,7 +3,7 @@ The source files for the general Elastic Agent documentation are currently stored in the [observability-docs](https://github.com/elastic/observability-docs) repo. The following docs are only focused on getting developers started building code for Elastic Agent. -## Testing +## Testing Prerequisites: - installed [mage](https://github.com/magefile/mage) @@ -29,10 +29,10 @@ for the standard variant. ### Testing Elastic Agent on Kubernetes #### Prerequisites -- create kubernetes cluster using kind, check [here](https://github.com/elastic/beats/blob/master/metricbeat/module/kubernetes/_meta/test/docs/README.md) for details -- deploy kube-state-metrics, check [here](https://github.com/elastic/beats/blob/master/metricbeat/module/kubernetes/_meta/test/docs/README.md) for details +- create kubernetes cluster using kind, check [here](https://github.com/elastic/beats/blob/main/metricbeat/module/kubernetes/_meta/test/docs/README.md) for details +- deploy kube-state-metrics, check [here](https://github.com/elastic/beats/blob/main/metricbeat/module/kubernetes/_meta/test/docs/README.md) for details - deploy required infrastructure: - - for elastic agent in standalone mode: EK stack or use [elastic cloud](https://cloud.elastic.co), check [here](https://github.com/elastic/beats/blob/master/metricbeat/module/kubernetes/_meta/test/docs/README.md) for details + - for elastic agent in standalone mode: EK stack or use [elastic cloud](https://cloud.elastic.co), check [here](https://github.com/elastic/beats/blob/main/metricbeat/module/kubernetes/_meta/test/docs/README.md) for details - for managed mode: use [elastic cloud](https://cloud.elastic.co) or bring up the stack on docker and then connect docker network with kubernetes kind nodes: ``` elastic-package stack up -d -v @@ -67,7 +67,7 @@ curl -L -O https://raw.githubusercontent.com/elastic/beats/${ELASTIC_AGENT_VERSI - name: elastic-agent image: custom-agent-image:latest imagePullPolicy: Never - ``` + ``` - set environment variables accordingly to the used setup. Elastic-agent in standalone mode: set `ES_USERNAME`, `ES_PASSWORD`,`ES_HOST`.