Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry-pick #19198 to 7.x: [Filebeat] Explicitly set ECS version in Filebeat modules. #19223

Merged
merged 2 commits into from
Jun 25, 2020

Conversation

leehinman
Copy link
Contributor

@leehinman leehinman commented Jun 16, 2020

Cherry-pick of PR #19198 to 7.x branch. Original message:

What does this PR do?

Uses the add_fields processor to explicitly set the ecs version the
fileset was written to. The following filesets were updated, all
other filesets already were doing this.

  • azure/activitylogs
  • azure/auditlogs
  • azure/signinlogs
  • checkpoint/firewall
  • crowdstrike/falcon
  • fortinet/firewall
  • traefik/access

Also added a test to pythonIntegTest that will check to make sure the
ecs version is set.

Why is it important?

When upgrading filesets we need to know what version of ECS it was
originally written against, that makes it much easier to do the
upgrade. Also when writing rules and searches if you know what
version of ecs the data is, you know what fields are available to you
and what ones aren't.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
    - [ ] I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

How to test this PR locally

mage -v pythonIntegTest

Related issues

…9198)

* Explicitly set ECS version in Filebeat modules.

- Add test to check if ecs.version is set
- add_fields to azure/activitylogs
- add_fields to azure/auditlogs
- add_fields to azure/signinlogs
- add_fields to checkpoint/firewall
- add_fields to crowdstrike/falcon
- add_fields to fortinet/firewall
- add_fields to traefik/access

Relates elastic#17688

(cherry picked from commit 81b0c3a)
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jun 16, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/siem (Team:SIEM)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jun 16, 2020
@elasticmachine
Copy link
Collaborator

elasticmachine commented Jun 16, 2020

💔 Build Failed

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #19223 updated]

  • Start Time: 2020-06-18T19:07:16.428+0000

  • Duration: 78 min 42 sec

Test stats 🧪

Test Results
Failed 0
Passed 6669
Skipped 1064
Total 7733

Steps errors

Expand to view the steps failures

  • Name: Install Go 1.13.10

    • Description: .ci/scripts/install-go.sh

    • Duration: 2 min 22 sec

    • Start Time: 2020-06-18T19:30:11.399+0000

    • log

  • Name: Make -C libbeat testsuite

    • Description: make -C libbeat testsuite

    • Duration: 29 min 43 sec

    • Start Time: 2020-06-18T19:31:27.624+0000

    • log

Log output

Expand to view the last 100 lines of log output

[2020-06-18T20:24:32.543Z] + curl -sSLo codecov https://codecov.io/bash
[2020-06-18T20:24:32.808Z] + FILE=auditbeat/build/coverage/full.cov
[2020-06-18T20:24:32.808Z] + [ -f auditbeat/build/coverage/full.cov ]
[2020-06-18T20:24:32.808Z] + FILE=filebeat/build/coverage/full.cov
[2020-06-18T20:24:32.808Z] + [ -f filebeat/build/coverage/full.cov ]
[2020-06-18T20:24:32.808Z] + FILE=heartbeat/build/coverage/full.cov
[2020-06-18T20:24:32.808Z] + [ -f heartbeat/build/coverage/full.cov ]
[2020-06-18T20:24:32.808Z] + FILE=libbeat/build/coverage/full.cov
[2020-06-18T20:24:32.808Z] + [ -f libbeat/build/coverage/full.cov ]
[2020-06-18T20:24:32.808Z] + FILE=metricbeat/build/coverage/full.cov
[2020-06-18T20:24:32.808Z] + [ -f metricbeat/build/coverage/full.cov ]
[2020-06-18T20:24:32.808Z] + FILE=packetbeat/build/coverage/full.cov
[2020-06-18T20:24:32.808Z] + [ -f packetbeat/build/coverage/full.cov ]
[2020-06-18T20:24:32.808Z] + FILE=winlogbeat/build/coverage/full.cov
[2020-06-18T20:24:32.808Z] + [ -f winlogbeat/build/coverage/full.cov ]
[2020-06-18T20:24:32.808Z] + FILE=journalbeat/build/coverage/full.cov
[2020-06-18T20:24:32.808Z] + [ -f journalbeat/build/coverage/full.cov ]
[2020-06-18T20:24:33.335Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19223/src/github.com/elastic/beats
[2020-06-18T20:24:33.642Z] + find . -type f -name TEST*.xml -path */build/* -delete
[2020-06-18T20:24:33.655Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19223/src/github.com/elastic/beats/Lint
[2020-06-18T20:24:33.739Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19223/src/github.com/elastic/beats/Winlogbeat-oss
[2020-06-18T20:24:33.818Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19223/src/github.com/elastic/beats/Auditbeat-crosscompile
[2020-06-18T20:24:33.902Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19223/src/github.com/elastic/beats/Elastic-Agent-x-pack
[2020-06-18T20:24:33.977Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19223/src/github.com/elastic/beats/Dockerlogbeat
[2020-06-18T20:24:34.141Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19223/src/github.com/elastic/beats/Journalbeat-oss
[2020-06-18T20:24:34.232Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19223/src/github.com/elastic/beats/Generators-Metricbeat-Linux
[2020-06-18T20:24:34.321Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19223/src/github.com/elastic/beats/Functionbeat-x-pack
[2020-06-18T20:24:34.408Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19223/src/github.com/elastic/beats/Elastic-Agent-x-pack-Windows
[2020-06-18T20:24:34.483Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19223/src/github.com/elastic/beats/Metricbeat-OSS-Unit-tests
[2020-06-18T20:24:34.578Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19223/src/github.com/elastic/beats/Heartbeat-oss
[2020-06-18T20:24:34.656Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19223/src/github.com/elastic/beats/Metricbeat-crosscompile
[2020-06-18T20:24:34.735Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19223/src/github.com/elastic/beats/Libbeat-x-pack
[2020-06-18T20:24:34.815Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19223/src/github.com/elastic/beats/Auditbeat-oss-Windows
[2020-06-18T20:24:34.889Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19223/src/github.com/elastic/beats/Auditbeat-x-pack
[2020-06-18T20:24:34.965Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19223/src/github.com/elastic/beats/Filebeat-Windows
[2020-06-18T20:24:35.038Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19223/src/github.com/elastic/beats/Auditbeat-oss-Linux
[2020-06-18T20:24:35.112Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19223/src/github.com/elastic/beats/Auditbeat-x-pack-Windows
[2020-06-18T20:24:35.183Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19223/src/github.com/elastic/beats/Packetbeat-oss
[2020-06-18T20:24:35.259Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19223/src/github.com/elastic/beats/Filebeat-x-pack-Windows
[2020-06-18T20:24:35.338Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19223/src/github.com/elastic/beats/Winlogbeat-Windows-x-pack
[2020-06-18T20:24:35.413Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19223/src/github.com/elastic/beats/Winlogbeat-Windows
[2020-06-18T20:24:35.486Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19223/src/github.com/elastic/beats/Metricbeat-Windows
[2020-06-18T20:24:35.560Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19223/src/github.com/elastic/beats/Generators-Beat-Linux
[2020-06-18T20:24:35.633Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19223/src/github.com/elastic/beats/Filebeat-x-pack
[2020-06-18T20:24:35.717Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19223/src/github.com/elastic/beats/Functionbeat-Windows
[2020-06-18T20:24:35.789Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19223/src/github.com/elastic/beats/Metricbeat-x-pack-Windows
[2020-06-18T20:24:35.866Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19223/src/github.com/elastic/beats/Heartbeat-Windows
[2020-06-18T20:24:35.943Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19223/src/github.com/elastic/beats/Libbeat-oss
[2020-06-18T20:24:36.017Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19223/src/github.com/elastic/beats/Filebeat-oss
[2020-06-18T20:24:36.090Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19223/src/github.com/elastic/beats/Metricbeat-Python-integration-tests
[2020-06-18T20:24:36.172Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19223/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests
[2020-06-18T20:24:36.248Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19223/src/github.com/elastic/beats/Metricbeat-x-pack
[2020-06-18T20:24:36.607Z] + cat
[2020-06-18T20:24:36.607Z] + /usr/local/bin/runbld ./runbld-script
[2020-06-18T20:24:36.607Z] Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
[2020-06-18T20:24:43.200Z] runbld>>> runbld started
[2020-06-18T20:24:43.200Z] runbld>>> 1.6.12/f45d832f2ba0aa2722ab4ec1fda8ad140f027f8b
[2020-06-18T20:24:45.115Z] runbld>>> The following profiles matched the job 'Beats/beats-beats-mbp/PR-19223' in order of occurrence in the config (last value wins).
[2020-06-18T20:24:46.497Z] runbld>>> Debug logging enabled.
[2020-06-18T20:24:46.497Z] runbld>>> Storing result
[2020-06-18T20:24:46.497Z] runbld>>> Store result: created {:total 2, :successful 2, :failed 0} 1
[2020-06-18T20:24:46.497Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1587637540455/t/20200618202446-9C05634F
[2020-06-18T20:24:46.497Z] runbld>>> Adding system facts.
[2020-06-18T20:24:47.440Z] runbld>>> Adding vcs info for the latest commit:  4ed7924c26623d1ba8807ae0901e84833e70d855
[2020-06-18T20:24:47.440Z] runbld>>> >>>>>>>>>>>> SCRIPT EXECUTION BEGIN >>>>>>>>>>>>
[2020-06-18T20:24:47.440Z] runbld>>> Adding /usr/lib/jvm/java-8-openjdk-amd64/bin to the path.
[2020-06-18T20:24:47.440Z] + echo 'Processing JUnit reports with runbld...'
[2020-06-18T20:24:47.440Z] Processing JUnit reports with runbld...
[2020-06-18T20:24:48.011Z] runbld>>> <<<<<<<<<<<< SCRIPT EXECUTION END <<<<<<<<<<<<
[2020-06-18T20:24:48.011Z] runbld>>> DURATION: 32ms
[2020-06-18T20:24:48.011Z] runbld>>> STDOUT: 40 bytes
[2020-06-18T20:24:48.011Z] runbld>>> STDERR: 49 bytes
[2020-06-18T20:24:48.011Z] runbld>>> WRAPPED PROCESS: SUCCESS (0)
[2020-06-18T20:24:48.011Z] runbld>>> Searching for build metadata in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19223/src/github.com/elastic/beats
[2020-06-18T20:24:49.398Z] runbld>>> Storing build metadata: 
[2020-06-18T20:24:49.398Z] runbld>>> Adding test report.
[2020-06-18T20:24:49.398Z] runbld>>> Searching for junit test output files with the pattern: TEST-.*\.xml$ in: /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19223/src/github.com/elastic/beats
[2020-06-18T20:24:50.344Z] runbld>>> Found 98 test output files
[2020-06-18T20:24:51.287Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19223/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-tomcat.xml
[2020-06-18T20:24:51.287Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19223/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-istio.xml
[2020-06-18T20:24:51.288Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19223/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-openmetrics.xml
[2020-06-18T20:24:51.288Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19223/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-cloudfoundry.xml
[2020-06-18T20:24:51.288Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19223/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-activemq.xml
[2020-06-18T20:24:51.288Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19223/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-iis.xml
[2020-06-18T20:24:52.230Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19223/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests/metricbeat/build/TEST-go-integration-windows.xml
[2020-06-18T20:24:52.230Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19223/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests/metricbeat/build/TEST-go-integration-graphite.xml
[2020-06-18T20:24:52.491Z] runbld>>> Test output logs contained: Errors: 0 Failures: 0 Tests: 7583 Skipped: 861
[2020-06-18T20:24:52.491Z] runbld>>> Storing result
[2020-06-18T20:24:52.491Z] runbld>>> FAILURES: 0
[2020-06-18T20:24:52.752Z] runbld>>> Store result: updated {:total 2, :successful 2, :failed 0} 2
[2020-06-18T20:24:52.752Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1587637540455/t/20200618202446-9C05634F
[2020-06-18T20:24:52.752Z] runbld>>> Email notification disabled by environment variable.
[2020-06-18T20:24:52.752Z] runbld>>> Slack notification disabled by environment variable.
[2020-06-18T20:24:58.258Z] Running on Jenkins in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19223
[2020-06-18T20:24:58.374Z] [INFO] getVaultSecret: Getting secrets
[2020-06-18T20:24:58.430Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2020-06-18T20:24:59.139Z] + chmod 755 generate-build-data.sh
[2020-06-18T20:24:59.139Z] + ./generate-build-data.sh https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19223/ https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19223/runs/2 FAILURE 4662451
[2020-06-18T20:24:59.139Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19223/runs/2/steps/?limit=10000 -o steps-info.json
[2020-06-18T20:25:00.483Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19223/runs/2/tests/?status=FAILED -o tests-errors.json

@leehinman leehinman merged commit b85a764 into elastic:7.x Jun 25, 2020
@leehinman leehinman deleted the backport_19198_7.x branch June 25, 2020 14:23
@zube zube bot removed the [zube]: Done label Oct 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants