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] Improve ECS categorization field mappings in system module #18065

Merged
merged 3 commits into from
May 4, 2020

Conversation

leehinman
Copy link
Contributor

What does this PR do?

Adds ECS categorization fields to Filebeat system module. Specifically:

  • auth
    • convert pipeline to yaml
    • event.kind
    • event.category (make array)
    • event.type (make array)
    • capture useradd, usermod, userdel
    • capture groupadd, groupmod, groupdel
    • related.ip
    • related.user
  • syslog
    • convert pipeline to yaml
    • event.kind

Why is it important?

ECS categorization fields make data more useful in SIEM app and allow cross correlation between different data sources.

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

TESTING_FILEBEAT_MODULES=system mage -v pythonIntegTest

Related issues

Closes #16031

- auth
  + event.kind
  + event.category (make array)
  + event.type (make array)
  + capture useradd, usermod, userdel
  + capture groupadd, groupmod, groupdel
  + related.ip
  + related.user
- syslog
  + event.kind

Closes elastic#16031
@leehinman leehinman added enhancement Filebeat Filebeat needs_backport PR is waiting to be backported to other branches. Team:SIEM ecs labels Apr 28, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/siem (Team:SIEM)

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Apr 28, 2020
@leehinman leehinman removed the needs_team Indicates that the issue/PR needs a Team:* label label Apr 28, 2020
@elasticmachine
Copy link
Collaborator

💔 Build Failed

Pipeline View Test View Changes Artifacts preview stats

Expand to view the summary

Build stats

Test stats 🧪

Test Results
Failed 1
Passed 2763
Skipped 402
Total 3166

Test errors

Expand to view the tests failures

  • Name: Build and Test / Filebeat Windows / test_clean_removed – test_registrar.Test

    • Status: FAILED
    • Age: 1
    • Duration: 10.314
    • Error Details: Timeout waiting for 'cond' to be true. Waited 10 seconds.

Steps errors

Expand to view the steps failures

  • Name: Mage build unitTest
    • Description: mage build unitTest

    • Result: FAILURE

    • Duration: 9 min 28 sec<

    • Start Time: 2020-04-28T19:09:07.692+0000

Log output

Expand to view the last 100 lines of log output

[2020-04-28T19:36:32.404Z] Recording test results
[2020-04-28T19:36:41.032Z] Archiving artifacts
[2020-04-28T19:36:41.520Z] java.lang.InterruptedException: no matches found within 10000
[2020-04-28T19:36:41.520Z] 	at hudson.FilePath$ValidateAntFileMask.hasMatch(FilePath.java:2826)
[2020-04-28T19:36:41.520Z] 	at hudson.FilePath$ValidateAntFileMask.invoke(FilePath.java:2705)
[2020-04-28T19:36:41.520Z] 	at hudson.FilePath$ValidateAntFileMask.invoke(FilePath.java:2686)
[2020-04-28T19:36:41.520Z] 	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3073)
[2020-04-28T19:36:41.520Z] Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from beats-ci-immutable-ubuntu-1604-1588099991536895185.c.elastic-ci-prod.internal/10.224.3.93:60968
[2020-04-28T19:36:41.520Z] 		at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1788)
[2020-04-28T19:36:41.520Z] 		at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356)
[2020-04-28T19:36:41.520Z] 		at hudson.remoting.Channel.call(Channel.java:998)
[2020-04-28T19:36:41.520Z] 		at hudson.FilePath.act(FilePath.java:1069)
[2020-04-28T19:36:41.520Z] 		at hudson.FilePath.act(FilePath.java:1058)
[2020-04-28T19:36:41.520Z] 		at hudson.FilePath.validateAntFileMask(FilePath.java:2684)
[2020-04-28T19:36:41.520Z] 		at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:265)
[2020-04-28T19:36:41.520Z] 		at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80)
[2020-04-28T19:36:41.520Z] 		at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67)
[2020-04-28T19:36:41.520Z] 		at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
[2020-04-28T19:36:41.520Z] 		at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[2020-04-28T19:36:41.520Z] 		at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[2020-04-28T19:36:41.520Z] 		at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[2020-04-28T19:36:41.520Z] 		at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[2020-04-28T19:36:41.520Z] Caused: hudson.FilePath$TunneledInterruptedException
[2020-04-28T19:36:41.520Z] 	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3075)
[2020-04-28T19:36:41.520Z] 	at hudson.remoting.UserRequest.perform(UserRequest.java:212)
[2020-04-28T19:36:41.520Z] 	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
[2020-04-28T19:36:41.520Z] 	at hudson.remoting.Request$2.run(Request.java:369)
[2020-04-28T19:36:41.520Z] 	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
[2020-04-28T19:36:41.520Z] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[2020-04-28T19:36:41.520Z] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[2020-04-28T19:36:41.520Z] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[2020-04-28T19:36:41.520Z] 	at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:93)
[2020-04-28T19:36:41.520Z] Caused: java.lang.InterruptedException: java.lang.InterruptedException: no matches found within 10000
[2020-04-28T19:36:41.520Z] 	at hudson.FilePath.act(FilePath.java:1071)
[2020-04-28T19:36:41.520Z] 	at hudson.FilePath.act(FilePath.java:1058)
[2020-04-28T19:36:41.520Z] 	at hudson.FilePath.validateAntFileMask(FilePath.java:2684)
[2020-04-28T19:36:41.520Z] 	at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:265)
[2020-04-28T19:36:41.520Z] 	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80)
[2020-04-28T19:36:41.520Z] 	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67)
[2020-04-28T19:36:41.520Z] 	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
[2020-04-28T19:36:41.520Z] 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[2020-04-28T19:36:41.521Z] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[2020-04-28T19:36:41.521Z] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[2020-04-28T19:36:41.521Z] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[2020-04-28T19:36:41.521Z] 	at java.lang.Thread.run(Thread.java:748)
[2020-04-28T19:36:41.521Z] No artifacts found that match the file pattern "**/build/TEST*.out". Configuration error?
[2020-04-28T19:36:42.444Z] + curl -sSLo codecov https://codecov.io/bash
[2020-04-28T19:36:42.739Z] + FILE=auditbeat/build/coverage/full.cov
[2020-04-28T19:36:42.739Z] + [ -f auditbeat/build/coverage/full.cov ]
[2020-04-28T19:36:42.739Z] + FILE=filebeat/build/coverage/full.cov
[2020-04-28T19:36:42.739Z] + [ -f filebeat/build/coverage/full.cov ]
[2020-04-28T19:36:42.739Z] + bash codecov -f filebeat/build/coverage/full.cov
[2020-04-28T19:36:42.739Z] 
[2020-04-28T19:36:42.739Z]   _____          _
[2020-04-28T19:36:42.739Z]  / ____|        | |
[2020-04-28T19:36:42.739Z] | |     ___   __| | ___  ___ _____   __
[2020-04-28T19:36:42.739Z] | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
[2020-04-28T19:36:42.739Z] | |___| (_) | (_| |  __/ (_| (_) \ V /
[2020-04-28T19:36:42.739Z]  \_____\___/ \__,_|\___|\___\___/ \_/
[2020-04-28T19:36:42.739Z]                               Bash-tbd
[2020-04-28T19:36:42.739Z] 
[2020-04-28T19:36:42.739Z] 
[2020-04-28T19:36:42.739Z] ==> Jenkins CI detected.
[2020-04-28T19:36:42.739Z]     project root: .
[2020-04-28T19:36:42.739Z]     Fixing merge commit SHA
[2020-04-28T19:36:42.739Z]     Yaml found at: codecov.yml
[2020-04-28T19:36:42.739Z]     -> Found 1 reports
[2020-04-28T19:36:42.739Z] ==> Detecting git/mercurial file structure
[2020-04-28T19:36:42.739Z] ==> Reading reports
[2020-04-28T19:36:42.739Z]     + filebeat/build/coverage/full.cov bytes=256607
[2020-04-28T19:36:42.739Z] ==> Appending adjustments
[2020-04-28T19:36:42.739Z]     http://docs.codecov.io/docs/fixing-reports
[2020-04-28T19:36:49.761Z]     + Found adjustments
[2020-04-28T19:36:49.761Z] ==> Gzipping contents
[2020-04-28T19:36:49.761Z] ==> Uploading reports
[2020-04-28T19:36:49.761Z]     url: https://codecov.io
[2020-04-28T19:36:49.761Z]     query: branch=PR-18065&commit=41b9f8679e05573a4283d6fb7590bcacae3e2171&build=1&build_url=https%3A%2F%2Fbeats-ci.elastic.co%2Fjob%2FBeats%2Fjob%2Fbeats-beats-mbp%2Fjob%2FPR-18065%2F1%2F&name=&tag=&slug=elastic%2Fbeats&service=jenkins&flags=&pr=18065&job=
[2020-04-28T19:36:49.761Z]     -> Pinging Codecov
[2020-04-28T19:36:49.761Z] https://codecov.io/upload/v4?package=bash-tbd&token=secret&branch=PR-18065&commit=41b9f8679e05573a4283d6fb7590bcacae3e2171&build=1&build_url=https%3A%2F%2Fbeats-ci.elastic.co%2Fjob%2FBeats%2Fjob%2Fbeats-beats-mbp%2Fjob%2FPR-18065%2F1%2F&name=&tag=&slug=elastic%2Fbeats&service=jenkins&flags=&pr=18065&job=
[2020-04-28T19:36:49.761Z] HTTP 400
[2020-04-28T19:36:49.761Z] Please provide the repository token to upload reports via `-t :repository-token`
[2020-04-28T19:36:49.761Z] + FILE=heartbeat/build/coverage/full.cov
[2020-04-28T19:36:49.761Z] + [ -f heartbeat/build/coverage/full.cov ]
[2020-04-28T19:36:49.762Z] + FILE=libbeat/build/coverage/full.cov
[2020-04-28T19:36:49.762Z] + [ -f libbeat/build/coverage/full.cov ]
[2020-04-28T19:36:49.762Z] + FILE=metricbeat/build/coverage/full.cov
[2020-04-28T19:36:49.762Z] + [ -f metricbeat/build/coverage/full.cov ]
[2020-04-28T19:36:49.762Z] + FILE=packetbeat/build/coverage/full.cov
[2020-04-28T19:36:49.762Z] + [ -f packetbeat/build/coverage/full.cov ]
[2020-04-28T19:36:49.762Z] + FILE=winlogbeat/build/coverage/full.cov
[2020-04-28T19:36:49.762Z] + [ -f winlogbeat/build/coverage/full.cov ]
[2020-04-28T19:36:49.762Z] + FILE=journalbeat/build/coverage/full.cov
[2020-04-28T19:36:49.762Z] + [ -f journalbeat/build/coverage/full.cov ]
[2020-04-28T19:36:55.749Z] Running on Jenkins in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18065
[2020-04-28T19:36:56.311Z] [INFO] getVaultSecret: Getting secrets
[2020-04-28T19:36:56.466Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2020-04-28T19:36:58.291Z] + chmod 755 generate-build-data.sh
[2020-04-28T19:36:58.291Z] + ./generate-build-data.sh https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-18065/ https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-18065/runs/1 FAILURE 4039301
[2020-04-28T19:36:59.202Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-18065/runs/1/steps/?limit=10000 -o steps-info.json
[2020-04-28T19:36:59.753Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-18065/runs/1/tests/?status=FAILED -o tests-errors.json

@@ -275,6 +275,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- Improve ECS categorization field mappings in postgresql module. {issue}16177[16177] {pull}17914[17914]
- Improve ECS categorization field mappings in rabbitmq module. {issue}16178[16178] {pull}17916[17916]
- Improve ECS categorization field mappings in redis module. {issue}16179[16179] {pull}17918[17918]
- Improve ECS categorization field mappings in system module. {issue}16031[16031] {pull}XXX[XXX]
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- Improve ECS categorization field mappings in system module. {issue}16031[16031] {pull}XXX[XXX]
- Improve ECS categorization field mappings in system module. {issue}16031[16031] {pull}18065[18065]

@leehinman leehinman merged commit c885b57 into elastic:master May 4, 2020
@leehinman leehinman deleted the 16031_system_ecs_1.4 branch May 4, 2020 15:07
leehinman added a commit to leehinman/beats that referenced this pull request May 4, 2020
…elastic#18065)

* Improve ECS categorization field mappings in system module

- auth
  + event.kind
  + event.category (make array)
  + event.type (make array)
  + capture useradd, usermod, userdel
  + capture groupadd, groupmod, groupdel
  + related.ip
  + related.user
- syslog
  + event.kind

Closes elastic#16031

(cherry picked from commit c885b57)
@leehinman leehinman added v7.8.0 and removed needs_backport PR is waiting to be backported to other branches. labels May 4, 2020
leehinman added a commit that referenced this pull request May 4, 2020
…#18065) (#18177)

* Improve ECS categorization field mappings in system module

- auth
  + event.kind
  + event.category (make array)
  + event.type (make array)
  + capture useradd, usermod, userdel
  + capture groupadd, groupmod, groupdel
  + related.ip
  + related.user
- syslog
  + event.kind

Closes #16031

(cherry picked from commit c885b57)
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.

[Filebeat] Upgrade system module to ECS 1.4
3 participants