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 #19622 to 7.x: Init winlog input #19777

Merged
merged 1 commit into from
Jul 9, 2020

Conversation

urso
Copy link

@urso urso commented Jul 9, 2020

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

Enhancement

What does this PR do?

This changes introduces the winlog input in filebeat based on the
input v2 API. Most of the functionality is directly imported from winlogbeat.

Integration tests are not yet implemented. I'd sugest to reimplement the existing python tests in this package as simple go based tests. Most of the implementation is directly shared with winlogbeat, which gives us at least some confidence.

Why is it important?

Provide journald input to the Agent

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.

Author's Checklist

  • [ ]

How to test this PR locally

TODO

Related issues

(cherry picked from commit 4e62fd2)
@urso urso added [zube]: In Review backport Team:Services (Deprecated) Label for the former Integrations-Services team labels Jul 9, 2020
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jul 9, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations-services (Team:Services)

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

elasticmachine commented Jul 9, 2020

💔 Tests Failed

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [urso commented: jenkins run the tests please]

  • Start Time: 2020-07-09T18:37:40.859+0000

  • Duration: 122 min 15 sec

Test stats 🧪

Test Results
Failed 1
Passed 3965
Skipped 678
Total 4644

Test errors

Expand to view the tests failures

  • Name: Build and Test / Filebeat Mac OS X / test_rotating_file_inode – test_registrar.Test

    • Age: 1
    • Duration: 4.126
    • Error Details:

Steps errors

Expand to view the steps failures

  • Name: Mage build unitTest

    • Description: mage build unitTest

    • Duration: 11 min 1 sec

    • Start Time: 2020-07-09T19:03:05.877+0000

    • log

  • Name: Recursively delete the current directory from the workspace

    • Description: script returned exit code 1

    • Duration: 0 min 14 sec

    • Start Time: 2020-07-09T19:15:53.205+0000

    • log

Log output

Expand to view the last 100 lines of log output

[2020-07-09T20:39:32.612Z] 	at hudson.FilePath.act(FilePath.java:1058)
[2020-07-09T20:39:32.612Z] 	at hudson.FilePath.validateAntFileMask(FilePath.java:2684)
[2020-07-09T20:39:32.612Z] 	at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:265)
[2020-07-09T20:39:32.612Z] 	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80)
[2020-07-09T20:39:32.613Z] 	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67)
[2020-07-09T20:39:32.613Z] 	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
[2020-07-09T20:39:32.613Z] 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[2020-07-09T20:39:32.613Z] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[2020-07-09T20:39:32.613Z] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[2020-07-09T20:39:32.613Z] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[2020-07-09T20:39:32.613Z] 	at java.lang.Thread.run(Thread.java:748)
[2020-07-09T20:39:32.613Z] No artifacts found that match the file pattern "**/build/TEST*.out". Configuration error?
[2020-07-09T20:39:32.762Z] + curl -sSLo codecov https://codecov.io/bash
[2020-07-09T20:39:33.023Z] + FILE=auditbeat/build/coverage/full.cov
[2020-07-09T20:39:33.023Z] + [ -f auditbeat/build/coverage/full.cov ]
[2020-07-09T20:39:33.023Z] + FILE=filebeat/build/coverage/full.cov
[2020-07-09T20:39:33.023Z] + [ -f filebeat/build/coverage/full.cov ]
[2020-07-09T20:39:33.023Z] + FILE=heartbeat/build/coverage/full.cov
[2020-07-09T20:39:33.023Z] + [ -f heartbeat/build/coverage/full.cov ]
[2020-07-09T20:39:33.023Z] + FILE=libbeat/build/coverage/full.cov
[2020-07-09T20:39:33.023Z] + [ -f libbeat/build/coverage/full.cov ]
[2020-07-09T20:39:33.023Z] + FILE=metricbeat/build/coverage/full.cov
[2020-07-09T20:39:33.023Z] + [ -f metricbeat/build/coverage/full.cov ]
[2020-07-09T20:39:33.023Z] + FILE=packetbeat/build/coverage/full.cov
[2020-07-09T20:39:33.023Z] + [ -f packetbeat/build/coverage/full.cov ]
[2020-07-09T20:39:33.023Z] + FILE=winlogbeat/build/coverage/full.cov
[2020-07-09T20:39:33.023Z] + [ -f winlogbeat/build/coverage/full.cov ]
[2020-07-09T20:39:33.023Z] + FILE=journalbeat/build/coverage/full.cov
[2020-07-09T20:39:33.023Z] + [ -f journalbeat/build/coverage/full.cov ]
[2020-07-09T20:39:33.035Z] + curl -sSLo codecov https://codecov.io/bash
[2020-07-09T20:39:33.305Z] + FILE=auditbeat/build/coverage/full.cov
[2020-07-09T20:39:33.305Z] + [ -f auditbeat/build/coverage/full.cov ]
[2020-07-09T20:39:33.305Z] + FILE=filebeat/build/coverage/full.cov
[2020-07-09T20:39:33.305Z] + [ -f filebeat/build/coverage/full.cov ]
[2020-07-09T20:39:33.305Z] + FILE=heartbeat/build/coverage/full.cov
[2020-07-09T20:39:33.305Z] + [ -f heartbeat/build/coverage/full.cov ]
[2020-07-09T20:39:33.305Z] + FILE=libbeat/build/coverage/full.cov
[2020-07-09T20:39:33.305Z] + [ -f libbeat/build/coverage/full.cov ]
[2020-07-09T20:39:33.305Z] + FILE=metricbeat/build/coverage/full.cov
[2020-07-09T20:39:33.305Z] + [ -f metricbeat/build/coverage/full.cov ]
[2020-07-09T20:39:33.305Z] + FILE=packetbeat/build/coverage/full.cov
[2020-07-09T20:39:33.305Z] + [ -f packetbeat/build/coverage/full.cov ]
[2020-07-09T20:39:33.305Z] + FILE=winlogbeat/build/coverage/full.cov
[2020-07-09T20:39:33.305Z] + [ -f winlogbeat/build/coverage/full.cov ]
[2020-07-09T20:39:33.305Z] + FILE=journalbeat/build/coverage/full.cov
[2020-07-09T20:39:33.305Z] + [ -f journalbeat/build/coverage/full.cov ]
[2020-07-09T20:39:34.413Z] Failed in branch Filebeat x-pack
[2020-07-09T20:39:34.507Z] Failed in branch Filebeat oss
[2020-07-09T20:39:34.634Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19777/src/github.com/elastic/beats
[2020-07-09T20:39:34.948Z] + find . -type f -name TEST*.xml -path */build/* -delete
[2020-07-09T20:39:34.972Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19777/src/github.com/elastic/beats/Lint
[2020-07-09T20:39:35.052Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19777/src/github.com/elastic/beats/Winlogbeat-oss
[2020-07-09T20:39:35.130Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19777/src/github.com/elastic/beats/Filebeat-x-pack-Mac-OS-X
[2020-07-09T20:39:35.212Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19777/src/github.com/elastic/beats/Winlogbeat-Windows-x-pack
[2020-07-09T20:39:35.296Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19777/src/github.com/elastic/beats/Filebeat-Windows
[2020-07-09T20:39:35.385Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19777/src/github.com/elastic/beats/Filebeat-Mac-OS-X
[2020-07-09T20:39:35.467Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19777/src/github.com/elastic/beats/Filebeat-x-pack-Windows
[2020-07-09T20:39:35.549Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19777/src/github.com/elastic/beats/Winlogbeat-Windows
[2020-07-09T20:39:35.624Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19777/src/github.com/elastic/beats/Filebeat-x-pack
[2020-07-09T20:39:35.708Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19777/src/github.com/elastic/beats/Filebeat-oss
[2020-07-09T20:39:36.065Z] + cat
[2020-07-09T20:39:36.065Z] + /usr/local/bin/runbld ./runbld-script
[2020-07-09T20:39:36.065Z] Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
[2020-07-09T20:39:42.630Z] runbld>>> runbld started
[2020-07-09T20:39:42.630Z] runbld>>> 1.6.12/f45d832f2ba0aa2722ab4ec1fda8ad140f027f8b
[2020-07-09T20:39:44.008Z] runbld>>> The following profiles matched the job 'Beats/beats-beats-mbp/PR-19777' in order of occurrence in the config (last value wins).
[2020-07-09T20:39:45.383Z] runbld>>> Debug logging enabled.
[2020-07-09T20:39:45.383Z] runbld>>> Storing result
[2020-07-09T20:39:45.383Z] runbld>>> Store result: created {:total 2, :successful 2, :failed 0} 1
[2020-07-09T20:39:45.383Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1587637540455/t/20200709203944-03BB362B
[2020-07-09T20:39:45.383Z] runbld>>> Adding system facts.
[2020-07-09T20:39:46.322Z] runbld>>> Adding vcs info for the latest commit:  d059f619b31e13c66cde089a1382b246d46b157c
[2020-07-09T20:39:46.322Z] runbld>>> >>>>>>>>>>>> SCRIPT EXECUTION BEGIN >>>>>>>>>>>>
[2020-07-09T20:39:46.322Z] runbld>>> Adding /usr/lib/jvm/java-8-openjdk-amd64/bin to the path.
[2020-07-09T20:39:46.322Z] Processing JUnit reports with runbld...
[2020-07-09T20:39:46.322Z] + echo 'Processing JUnit reports with runbld...'
[2020-07-09T20:39:46.582Z] runbld>>> <<<<<<<<<<<< SCRIPT EXECUTION END <<<<<<<<<<<<
[2020-07-09T20:39:46.582Z] runbld>>> DURATION: 20ms
[2020-07-09T20:39:46.582Z] runbld>>> STDOUT: 40 bytes
[2020-07-09T20:39:46.582Z] runbld>>> STDERR: 49 bytes
[2020-07-09T20:39:46.582Z] runbld>>> WRAPPED PROCESS: SUCCESS (0)
[2020-07-09T20:39:46.582Z] runbld>>> Searching for build metadata in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19777/src/github.com/elastic/beats
[2020-07-09T20:39:47.522Z] runbld>>> Storing build metadata: 
[2020-07-09T20:39:47.522Z] runbld>>> Adding test report.
[2020-07-09T20:39:47.522Z] runbld>>> Searching for junit test output files with the pattern: TEST-.*\.xml$ in: /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19777/src/github.com/elastic/beats
[2020-07-09T20:39:48.459Z] runbld>>> Found 14 test output files
[2020-07-09T20:39:49.396Z] runbld>>> Test output logs contained: Errors: 0 Failures: 1 Tests: 4644 Skipped: 653
[2020-07-09T20:39:49.656Z] runbld>>> Storing result
[2020-07-09T20:39:49.656Z] runbld>>> FAILURES: 1
[2020-07-09T20:39:49.915Z] runbld>>> Store result: updated {:total 2, :successful 2, :failed 0} 2
[2020-07-09T20:39:49.915Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1587637540455/t/20200709203944-03BB362B
[2020-07-09T20:39:50.173Z] runbld>>> Email notification disabled by environment variable.
[2020-07-09T20:39:50.173Z] runbld>>> Slack notification disabled by environment variable.
[2020-07-09T20:39:55.656Z] Running on Jenkins in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19777
[2020-07-09T20:39:55.754Z] [INFO] getVaultSecret: Getting secrets
[2020-07-09T20:39:55.819Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2020-07-09T20:39:56.545Z] + chmod 755 generate-build-data.sh
[2020-07-09T20:39:56.545Z] + ./generate-build-data.sh https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19777/ https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19777/runs/2 FAILURE 7335426
[2020-07-09T20:39:56.545Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19777/runs/2/steps/?limit=10000 -o steps-info.json
[2020-07-09T20:39:57.456Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19777/runs/2/tests/?status=FAILED -o tests-errors.json

@urso
Copy link
Author

urso commented Jul 9, 2020

jenkins run the tests please

Copy link
Contributor

@ycombinator ycombinator left a comment

Choose a reason for hiding this comment

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

Backport LGTM.

@urso urso merged commit 44dc9b1 into elastic:7.x Jul 9, 2020
@urso urso deleted the backport_19622_7.x branch July 9, 2020 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Team:Services (Deprecated) Label for the former Integrations-Services team [zube]: Done
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants