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

[Filebeat] Explicitly set ECS version in Filebeat modules. #19198

Merged
merged 3 commits into from
Jun 16, 2020

Conversation

leehinman
Copy link
Contributor

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

@leehinman leehinman added enhancement Filebeat Filebeat needs_backport PR is waiting to be backported to other branches. Team:SIEM labels Jun 15, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/siem (Team:SIEM)

@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Jun 15, 2020
- 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
@elasticmachine
Copy link
Collaborator

elasticmachine commented Jun 15, 2020

💔 Build Failed

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #19198 updated]

  • Start Time: 2020-06-16T15:03:41.202+0000

  • Duration: 79 min 36 sec

Test stats 🧪

Test Results
Failed 0
Passed 9022
Skipped 1565
Total 10587

Steps errors

Expand to view the steps failures

  • Name: Make -C filebeat testsuite

    • Description: make -C filebeat testsuite

    • Duration: 7 min 57 sec

    • Start Time: 2020-06-16T15:27:01.058+0000

    • log

  • Name: Make -C libbeat testsuite

    • Description: make -C libbeat testsuite

    • Duration: 9 min 36 sec

    • Start Time: 2020-06-16T15:27:09.476+0000

    • log

Log output

Expand to view the last 100 lines of log output

[2020-06-16T16:21:49.413Z] + [ -f packetbeat/build/coverage/full.cov ]
[2020-06-16T16:21:49.413Z] + FILE=winlogbeat/build/coverage/full.cov
[2020-06-16T16:21:49.413Z] + [ -f winlogbeat/build/coverage/full.cov ]
[2020-06-16T16:21:49.413Z] + FILE=journalbeat/build/coverage/full.cov
[2020-06-16T16:21:49.413Z] + [ -f journalbeat/build/coverage/full.cov ]
[2020-06-16T16:21:49.936Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats
[2020-06-16T16:21:50.245Z] + find . -type f -name TEST*.xml -path */build/* -delete
[2020-06-16T16:21:50.258Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Lint
[2020-06-16T16:21:50.346Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Elastic-Agent-Mac-OS-X
[2020-06-16T16:21:50.428Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Winlogbeat-oss
[2020-06-16T16:21:50.507Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Elastic-Agent-x-pack
[2020-06-16T16:21:50.583Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Auditbeat-crosscompile
[2020-06-16T16:21:50.657Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Dockerlogbeat
[2020-06-16T16:21:50.734Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Journalbeat-oss
[2020-06-16T16:21:50.813Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Filebeat-x-pack-Mac-OS-X
[2020-06-16T16:21:50.894Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Auditbeat-oss-Mac-OS-X
[2020-06-16T16:21:50.972Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Generators-Metricbeat-Linux
[2020-06-16T16:21:51.051Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Functionbeat-x-pack
[2020-06-16T16:21:51.130Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Metricbeat-Mac-OS-X
[2020-06-16T16:21:51.205Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Filebeat-Mac-OS-X
[2020-06-16T16:21:51.282Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Filebeat-oss
[2020-06-16T16:21:51.356Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Elastic-Agent-x-pack-Windows
[2020-06-16T16:21:51.430Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Libbeat-oss
[2020-06-16T16:21:51.502Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Auditbeat-x-pack-Mac-OS-X
[2020-06-16T16:21:51.573Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Metricbeat-OSS-Unit-tests
[2020-06-16T16:21:51.647Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Heartbeat-oss
[2020-06-16T16:21:51.723Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Metricbeat-crosscompile
[2020-06-16T16:21:51.796Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Auditbeat-x-pack
[2020-06-16T16:21:51.869Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Auditbeat-oss-Windows
[2020-06-16T16:21:51.942Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Auditbeat-x-pack-Windows
[2020-06-16T16:21:52.012Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Libbeat-x-pack
[2020-06-16T16:21:52.085Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Winlogbeat-Windows-x-pack
[2020-06-16T16:21:52.159Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Functionbeat-Mac-OS-X-x-pack
[2020-06-16T16:21:52.233Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Heartbeat-Mac-OS-X
[2020-06-16T16:21:52.307Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Filebeat-Windows
[2020-06-16T16:21:52.386Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Filebeat-x-pack-Windows
[2020-06-16T16:21:52.459Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Packetbeat-oss
[2020-06-16T16:21:52.538Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Auditbeat-oss-Linux
[2020-06-16T16:21:52.611Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Winlogbeat-Windows
[2020-06-16T16:21:52.683Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Metricbeat-Windows
[2020-06-16T16:21:52.754Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Metricbeat-x-pack-Windows
[2020-06-16T16:21:52.828Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Filebeat-x-pack
[2020-06-16T16:21:52.901Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Generators-Beat-Linux
[2020-06-16T16:21:52.972Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests
[2020-06-16T16:21:53.050Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Heartbeat-Windows
[2020-06-16T16:21:53.123Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Functionbeat-Windows
[2020-06-16T16:21:53.196Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Metricbeat-Python-integration-tests
[2020-06-16T16:21:53.273Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Generators-Metricbeat-Mac-OS-X
[2020-06-16T16:21:53.344Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Metricbeat-x-pack-Mac-OS-X
[2020-06-16T16:21:53.423Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Generators-Beat-Mac-OS-X
[2020-06-16T16:21:53.496Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Metricbeat-x-pack
[2020-06-16T16:21:53.856Z] + cat
[2020-06-16T16:21:53.856Z] + /usr/local/bin/runbld ./runbld-script
[2020-06-16T16:21:53.856Z] Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
[2020-06-16T16:22:00.473Z] runbld>>> runbld started
[2020-06-16T16:22:00.473Z] runbld>>> 1.6.11/a66728ff8f4356963772e6e6d2069392fa06acbe
[2020-06-16T16:22:02.387Z] runbld>>> The following profiles matched the job 'Beats/beats-beats-mbp/PR-19198' in order of occurrence in the config (last value wins).
[2020-06-16T16:22:03.773Z] runbld>>> Debug logging enabled.
[2020-06-16T16:22:03.773Z] runbld>>> Storing result
[2020-06-16T16:22:04.036Z] runbld>>> Store result: created {:total 2, :successful 2, :failed 0} 1
[2020-06-16T16:22:04.036Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1587637540455/t/20200616162203-DB19058A
[2020-06-16T16:22:04.036Z] runbld>>> Adding system facts.
[2020-06-16T16:22:04.987Z] runbld>>> Adding vcs info for the latest commit:  28ca1062d15f189c717ba0cf3dd046df3c938153
[2020-06-16T16:22:04.987Z] runbld>>> >>>>>>>>>>>> SCRIPT EXECUTION BEGIN >>>>>>>>>>>>
[2020-06-16T16:22:04.987Z] runbld>>> Adding /usr/lib/jvm/java-8-openjdk-amd64/bin to the path.
[2020-06-16T16:22:05.248Z] Processing JUnit reports with runbld...
[2020-06-16T16:22:05.248Z] + echo 'Processing JUnit reports with runbld...'
[2020-06-16T16:22:05.510Z] runbld>>> <<<<<<<<<<<< SCRIPT EXECUTION END <<<<<<<<<<<<
[2020-06-16T16:22:05.510Z] runbld>>> DURATION: 20ms
[2020-06-16T16:22:05.510Z] runbld>>> STDOUT: 40 bytes
[2020-06-16T16:22:05.510Z] runbld>>> STDERR: 49 bytes
[2020-06-16T16:22:05.510Z] runbld>>> WRAPPED PROCESS: SUCCESS (0)
[2020-06-16T16:22:05.510Z] runbld>>> Searching for build metadata in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats
[2020-06-16T16:22:06.897Z] runbld>>> Storing build metadata: 
[2020-06-16T16:22:06.897Z] runbld>>> Adding test report.
[2020-06-16T16:22:06.897Z] runbld>>> Searching for junit test output files with the pattern: TEST-.*\.xml$ in: /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats
[2020-06-16T16:22:08.283Z] runbld>>> Found 113 test output files
[2020-06-16T16:22:09.236Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-tomcat.xml
[2020-06-16T16:22:09.236Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-istio.xml
[2020-06-16T16:22:09.236Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-openmetrics.xml
[2020-06-16T16:22:09.236Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-cloudfoundry.xml
[2020-06-16T16:22:09.236Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-activemq.xml
[2020-06-16T16:22:09.237Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-iis.xml
[2020-06-16T16:22:09.809Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests/metricbeat/build/TEST-go-integration-windows.xml
[2020-06-16T16:22:10.073Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests/metricbeat/build/TEST-go-integration-graphite.xml
[2020-06-16T16:22:10.334Z] runbld>>> Test output logs contained: Errors: 0 Failures: 0 Tests: 10437 Skipped: 1326
[2020-06-16T16:22:10.595Z] runbld>>> Storing result
[2020-06-16T16:22:10.595Z] runbld>>> FAILURES: 0
[2020-06-16T16:22:10.595Z] runbld>>> Store result: updated {:total 2, :successful 2, :failed 0} 2
[2020-06-16T16:22:10.595Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1587637540455/t/20200616162203-DB19058A
[2020-06-16T16:22:10.595Z] runbld>>> Email notification disabled by environment variable.
[2020-06-16T16:22:10.595Z] runbld>>> Slack notification disabled by environment variable.
[2020-06-16T16:22:16.121Z] Running on Jenkins in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19198
[2020-06-16T16:22:16.223Z] [INFO] getVaultSecret: Getting secrets
[2020-06-16T16:22:16.277Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2020-06-16T16:22:16.974Z] + chmod 755 generate-build-data.sh
[2020-06-16T16:22:16.974Z] + ./generate-build-data.sh https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19198/ https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19198/runs/5 FAILURE 4715512
[2020-06-16T16:22:16.974Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19198/runs/5/steps/?limit=10000 -o steps-info.json
[2020-06-16T16:22:18.317Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19198/runs/5/tests/?status=FAILED -o tests-errors.json
[2020-06-16T16:22:19.228Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19198/runs/5/log/ -o pipeline-log.txt

Copy link
Member

@andrewkroh andrewkroh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Good idea with the test.

@leehinman leehinman merged commit 81b0c3a into elastic:master Jun 16, 2020
leehinman added a commit to leehinman/beats that referenced this pull request Jun 16, 2020
…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)
@leehinman leehinman added v7.9.0 and removed needs_backport PR is waiting to be backported to other branches. labels Jun 16, 2020
leehinman added a commit that referenced this pull request Jun 25, 2020
…19223)

* 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 #17688

(cherry picked from commit 81b0c3a)
@leehinman leehinman deleted the explicit_ecs_version branch October 5, 2020 19:21
melchiormoulin pushed a commit to melchiormoulin/beats that referenced this pull request Oct 14, 2020
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants