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

Add ECS logging MVP to libbeat #17974

Merged
merged 7 commits into from
May 5, 2020
Merged

Add ECS logging MVP to libbeat #17974

merged 7 commits into from
May 5, 2020

Conversation

simitt
Copy link
Contributor

@simitt simitt commented Apr 24, 2020

What does this PR do?

Enable ECS conformant logging by setting logging.ecs:true
Adds @timestamp, log.level, message and ecs.version to every log line.
If EnableCaller is set add log.origin.file and log.origin.line.
Logs error.message when error is given

Why is it important?

Get started with ECS conformant logging

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

Set different logging options (syslog, to_files, console) and enable logging.json and logging.ecs and check log lines contain @timestamp, message, log.level, ecs.version. Logged errors are logged in the format { "error": { "message": .. } }. If caller is enabled it is logged as log.origin.*.

manually tested for

  • logging.to_files: true
  • logging.to_syslog: true
  • logging.to_stderr: true
  • log output to console ./beat -e

Related issues

implements #17942

Logs

Example:

{"log.level":"error","@timestamp":"2020-04-24T16:03:13.921+0200","log.origin":{"file.name":"instance/metrics.go","file.line":92},"message":"Error while getting memory usage: error retrieving process stats: cannot find matching process for pid=13762","ecs.version":"1.5.0"}

@simitt simitt requested a review from urso April 24, 2020 17:56
@andresrc andresrc added [zube]: Inbox [zube]: In Review Team:apm APM Server team issues/PRs Team:Integrations Label for the Integrations team and removed [zube]: Inbox labels Apr 27, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations (Team:Integrations)

JSON bool `config:"json"` // Write logs as JSON.
Level Level `config:"level"` // Logging level (error, warning, info, debug).
Selectors []string `config:"selectors"` // Selectors for debug level logging.
ECSEnabled bool `config:"ecs"`
Copy link

Choose a reason for hiding this comment

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

we want to enable this setting by default?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would consider changing the default a breaking change, as it changes the log format.

Copy link
Contributor

Choose a reason for hiding this comment

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

Do you mind adding a comment to describe what this option does?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good point - added a comment

@elasticmachine
Copy link
Collaborator

elasticmachine commented Apr 30, 2020

💔 Build Failed

Pipeline View Test View Changes Artifacts preview stats

Expand to view the summary

Build stats

Test stats 🧪

Test Results
Failed 3
Passed 7689
Skipped 1210
Total 8902

Test errors

Expand to view the tests failures

  • Name: Build and Test / Libbeat / Libbeat oss / test_console_ecs – test_logging.TestLogging

    • Status: FAILED
    • Age: 1
    • Duration: 2.043
    • Error Details: Timeout waiting for 'cond' to be true. Waited 2 seconds.
  • Name: Build and Test / Libbeat / Libbeat oss / test_file_default – test_logging.TestLogging

    • Status: FAILED
    • Age: 1
    • Duration: 2.059
    • Error Details: Timeout waiting for 'cond' to be true. Waited 2 seconds.
  • Name: Build and Test / Libbeat / Libbeat oss / test_file_ecs – test_logging.TestLogging

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

Steps errors

Expand to view the steps failures

  • Name: Make -C libbeat testsuite

    • Description: make -C libbeat testsuite

    • Result: FAILURE

    • Duration: 30 min 5 sec<

    • Start Time: 2020-05-04T10:33:31.492+0000

  • Name: Make -C generator/_templates/metricbeat test

    • Description: make -C generator/_templates/metricbeat test

    • Result: FAILURE

    • Duration: 1 min 26 sec<

    • Start Time: 2020-05-04T10:34:23.255+0000

  • Name: Make -C generator/_templates/beat test

    • Description: make -C generator/_templates/beat test

    • Result: FAILURE

    • Duration: 1 min 56 sec<

    • Start Time: 2020-05-04T10:36:47.968+0000

  • Name: Make -C generator/_templates/metricbeat test

    • Description: make -C generator/_templates/metricbeat test

    • Result: FAILURE

    • Duration: 1 min 22 sec<

    • Start Time: 2020-05-04T10:42:23.515+0000

  • Name: Make -C generator/_templates/beat test

    • Description: make -C generator/_templates/beat test

    • Result: FAILURE

    • Duration: 2 min 40 sec<

    • Start Time: 2020-05-04T10:45:42.238+0000

Log output

Expand to view the last 100 lines of log output

[2020-05-04T11:31:27.356Z] + [ -f heartbeat/build/coverage/full.cov ]
[2020-05-04T11:31:27.356Z] + FILE=libbeat/build/coverage/full.cov
[2020-05-04T11:31:27.356Z] + [ -f libbeat/build/coverage/full.cov ]
[2020-05-04T11:31:27.356Z] + FILE=metricbeat/build/coverage/full.cov
[2020-05-04T11:31:27.356Z] + [ -f metricbeat/build/coverage/full.cov ]
[2020-05-04T11:31:27.356Z] + FILE=packetbeat/build/coverage/full.cov
[2020-05-04T11:31:27.356Z] + [ -f packetbeat/build/coverage/full.cov ]
[2020-05-04T11:31:27.356Z] + FILE=winlogbeat/build/coverage/full.cov
[2020-05-04T11:31:27.356Z] + [ -f winlogbeat/build/coverage/full.cov ]
[2020-05-04T11:31:27.356Z] + FILE=journalbeat/build/coverage/full.cov
[2020-05-04T11:31:27.356Z] + [ -f journalbeat/build/coverage/full.cov ]
[2020-05-04T11:31:28.035Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats
[2020-05-04T11:31:28.358Z] + find . -type f -name TEST*.xml -path */build/* -delete
[2020-05-04T11:31:28.373Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Lint
[2020-05-04T11:31:28.607Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Elastic-Agent-Mac-OS-X
[2020-05-04T11:31:28.771Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Elastic-Agent-x-pack
[2020-05-04T11:31:28.901Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Winlogbeat-oss
[2020-05-04T11:31:29.077Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Generators-Metricbeat-Linux
[2020-05-04T11:31:29.218Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Dockerlogbeat
[2020-05-04T11:31:29.319Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Journalbeat-oss
[2020-05-04T11:31:29.408Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Generators-Beat-Linux
[2020-05-04T11:31:29.490Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Metricbeat-Mac-OS-X
[2020-05-04T11:31:29.590Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Elastic-Agent-x-pack-Windows
[2020-05-04T11:31:29.680Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Functionbeat-x-pack
[2020-05-04T11:31:29.764Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Filebeat-Mac-OS-X
[2020-05-04T11:31:29.843Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Metricbeat-OSS-Unit-tests
[2020-05-04T11:31:29.963Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Metricbeat-crosscompile
[2020-05-04T11:31:30.055Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Generators-Metricbeat-Mac-OS-X
[2020-05-04T11:31:30.141Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Winlogbeat-Windows-x-pack
[2020-05-04T11:31:30.210Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Heartbeat-oss
[2020-05-04T11:31:30.346Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Auditbeat-x-pack
[2020-05-04T11:31:30.470Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Filebeat-Windows
[2020-05-04T11:31:30.579Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Libbeat-x-pack
[2020-05-04T11:31:30.709Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Generators-Beat-Mac-OS-X
[2020-05-04T11:31:30.829Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Auditbeat-Linux
[2020-05-04T11:31:31.066Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Packetbeat-oss
[2020-05-04T11:31:31.205Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Functionbeat-Mac-OS-X-x-pack
[2020-05-04T11:31:31.316Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Metricbeat-Windows
[2020-05-04T11:31:31.410Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Winlogbeat-Windows
[2020-05-04T11:31:31.511Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Filebeat-x-pack
[2020-05-04T11:31:31.594Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Auditbeat-crosscompile
[2020-05-04T11:31:31.682Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Filebeat-oss
[2020-05-04T11:31:31.839Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Heartbeat-Mac-OS-X
[2020-05-04T11:31:31.944Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests
[2020-05-04T11:31:32.036Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Libbeat-oss
[2020-05-04T11:31:32.117Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Auditbeat-Mac-OS-X
[2020-05-04T11:31:32.211Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Metricbeat-Python-integration-tests
[2020-05-04T11:31:32.373Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Functionbeat-Windows
[2020-05-04T11:31:32.489Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Heartbeat-Windows
[2020-05-04T11:31:32.571Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Metricbeat-x-pack
[2020-05-04T11:31:32.665Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Auditbeat-Windows
[2020-05-04T11:31:33.079Z] + cat
[2020-05-04T11:31:33.079Z] + /usr/local/bin/runbld ./runbld-script
[2020-05-04T11:31:33.079Z] Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
[2020-05-04T11:31:39.680Z] runbld>>> runbld started
[2020-05-04T11:31:39.680Z] runbld>>> 1.6.11/a66728ff8f4356963772e6e6d2069392fa06acbe
[2020-05-04T11:31:41.594Z] runbld>>> The following profiles matched the job 'Beats/beats-beats-mbp/PR-17974' in order of occurrence in the config (last value wins).
[2020-05-04T11:31:42.551Z] runbld>>> Debug logging enabled.
[2020-05-04T11:31:42.551Z] runbld>>> Storing result
[2020-05-04T11:31:42.812Z] runbld>>> Store result: created {:total 2, :successful 2, :failed 0} 1
[2020-05-04T11:31:42.812Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1587637540455/t/20200504113142-3813E604
[2020-05-04T11:31:42.812Z] runbld>>> Adding system facts.
[2020-05-04T11:31:43.759Z] runbld>>> Adding vcs info for the latest commit:  9f0329f799f00215fd589dc8fd556ef2addadd17
[2020-05-04T11:31:43.759Z] runbld>>> >>>>>>>>>>>> SCRIPT EXECUTION BEGIN >>>>>>>>>>>>
[2020-05-04T11:31:43.759Z] runbld>>> Adding /usr/lib/jvm/java-8-openjdk-amd64/bin to the path.
[2020-05-04T11:31:44.020Z] Processing JUnit reports with runbld...
[2020-05-04T11:31:44.020Z] + echo 'Processing JUnit reports with runbld...'
[2020-05-04T11:31:44.283Z] runbld>>> <<<<<<<<<<<< SCRIPT EXECUTION END <<<<<<<<<<<<
[2020-05-04T11:31:44.283Z] runbld>>> DURATION: 9ms
[2020-05-04T11:31:44.283Z] runbld>>> STDOUT: 40 bytes
[2020-05-04T11:31:44.283Z] runbld>>> STDERR: 49 bytes
[2020-05-04T11:31:44.283Z] runbld>>> WRAPPED PROCESS: SUCCESS (0)
[2020-05-04T11:31:44.283Z] runbld>>> Searching for build metadata in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats
[2020-05-04T11:31:45.670Z] runbld>>> Storing build metadata: 
[2020-05-04T11:31:45.670Z] runbld>>> Adding test report.
[2020-05-04T11:31:45.670Z] runbld>>> Searching for junit test output files with the pattern: TEST-.*\.xml$ in: /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats
[2020-05-04T11:31:46.614Z] runbld>>> Found 102 test output files
[2020-05-04T11:31:47.186Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-openmetrics.xml
[2020-05-04T11:31:47.186Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-istio.xml
[2020-05-04T11:31:47.186Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-iis.xml
[2020-05-04T11:31:47.186Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-activemq.xml
[2020-05-04T11:31:47.449Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-tomcat.xml
[2020-05-04T11:31:47.449Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-cloudfoundry.xml
[2020-05-04T11:31:48.028Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests/metricbeat/build/TEST-go-integration-windows.xml
[2020-05-04T11:31:48.028Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests/metricbeat/build/TEST-go-integration-graphite.xml
[2020-05-04T11:31:48.601Z] runbld>>> Test output logs contained: Errors: 3 Failures: 0 Tests: 8752 Skipped: 1006
[2020-05-04T11:31:48.601Z] runbld>>> Storing result
[2020-05-04T11:31:48.601Z] runbld>>> FAILURES: 3
[2020-05-04T11:31:49.549Z] runbld>>> Store result: updated {:total 2, :successful 2, :failed 0} 2
[2020-05-04T11:31:49.549Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1587637540455/t/20200504113142-3813E604
[2020-05-04T11:31:49.549Z] runbld>>> Email notification disabled by environment variable.
[2020-05-04T11:31:49.549Z] runbld>>> Slack notification disabled by environment variable.
[2020-05-04T11:31:55.641Z] Running on Jenkins in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974
[2020-05-04T11:31:55.895Z] [INFO] getVaultSecret: Getting secrets
[2020-05-04T11:31:55.977Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2020-05-04T11:31:56.736Z] + chmod 755 generate-build-data.sh
[2020-05-04T11:31:56.736Z] + ./generate-build-data.sh https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-17974/ https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-17974/runs/6 FAILURE 6062758
[2020-05-04T11:31:57.287Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-17974/runs/6/steps/?limit=10000 -o steps-info.json
[2020-05-04T11:31:58.295Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-17974/runs/6/tests/?status=FAILED -o tests-errors.json
[2020-05-04T11:31:58.845Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-17974/runs/6/log/ -o pipeline-log.txt

simitt added 2 commits May 4, 2020 11:34
Enable ECS conformant logging by setting `logging.ecs:true`
Adds @timestamp, log.level, message and ecs.version to every log line.
If EnableCaller is set add log.origin.file and log.origin.line.
Logs error.message when error is given

implements elastic#17942
@simitt simitt marked this pull request as ready for review May 4, 2020 11:09
@simitt simitt requested review from a team as code owners May 4, 2020 11:09
@simitt
Copy link
Contributor Author

simitt commented May 4, 2020

Test failures are unrelated and also observed in beats master branch.

@simitt simitt requested a review from urso May 4, 2020 11:10
@simitt
Copy link
Contributor Author

simitt commented May 4, 2020

@urso I just updated to the latest master, would appreciate a review.

@elasticmachine
Copy link
Collaborator

elasticmachine commented May 4, 2020

💔 Build Failed

Pipeline View Test View Changes Artifacts preview stats

Expand to view the summary

Build stats

Test stats 🧪

Test Results
Failed 0
Passed 7633
Skipped 1202
Total 8835

Log output

Expand to view the last 100 lines of log output

[2020-05-05T13:08:30.345Z] Error when executing cleanup post condition:
[2020-05-05T13:08:30.345Z] org.jenkinsci.plugins.workflow.steps.FlowInterruptedException
[2020-05-05T13:08:30.345Z] 	at org.jenkinsci.plugins.workflow.steps.TimeoutStepExecution.cancel(TimeoutStepExecution.java:160)
[2020-05-05T13:08:30.345Z] 	at org.jenkinsci.plugins.workflow.steps.TimeoutStepExecution.access$100(TimeoutStepExecution.java:38)
[2020-05-05T13:08:30.345Z] 	at org.jenkinsci.plugins.workflow.steps.TimeoutStepExecution$1.run(TimeoutStepExecution.java:134)
[2020-05-05T13:08:30.345Z] 	at jenkins.security.ImpersonatingScheduledExecutorService$1.run(ImpersonatingScheduledExecutorService.java:58)
[2020-05-05T13:08:30.345Z] 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[2020-05-05T13:08:30.345Z] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[2020-05-05T13:08:30.345Z] 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
[2020-05-05T13:08:30.345Z] 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
[2020-05-05T13:08:30.345Z] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[2020-05-05T13:08:30.346Z] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[2020-05-05T13:08:30.346Z] 	at java.lang.Thread.run(Thread.java:748)
[2020-05-05T13:08:30.346Z] 
[2020-05-05T13:08:30.360Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats
[2020-05-05T13:08:30.714Z] + find . -type f -name TEST*.xml -path */build/* -delete
[2020-05-05T13:08:30.796Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Lint
[2020-05-05T13:08:31.178Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Winlogbeat-oss
[2020-05-05T13:08:31.391Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Filebeat-Mac-OS-X
[2020-05-05T13:08:31.570Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Elastic-Agent-x-pack
[2020-05-05T13:08:31.998Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Dockerlogbeat
[2020-05-05T13:08:32.399Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Journalbeat-oss
[2020-05-05T13:08:32.676Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Generators-Metricbeat-Linux
[2020-05-05T13:08:32.838Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Elastic-Agent-Mac-OS-X
[2020-05-05T13:08:33.067Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Functionbeat-x-pack
[2020-05-05T13:08:33.346Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Metricbeat-Mac-OS-X
[2020-05-05T13:08:33.681Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Elastic-Agent-x-pack-Windows
[2020-05-05T13:08:34.154Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Metricbeat-OSS-Unit-tests
[2020-05-05T13:08:34.545Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Heartbeat-oss
[2020-05-05T13:08:34.815Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Libbeat-x-pack
[2020-05-05T13:08:35.133Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Auditbeat-x-pack
[2020-05-05T13:08:35.297Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Winlogbeat-Windows-x-pack
[2020-05-05T13:08:35.684Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Packetbeat-oss
[2020-05-05T13:08:35.868Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Metricbeat-crosscompile
[2020-05-05T13:08:36.043Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Auditbeat-Linux
[2020-05-05T13:08:36.277Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Filebeat-Windows
[2020-05-05T13:08:36.592Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Metricbeat-Windows
[2020-05-05T13:08:36.866Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Filebeat-x-pack
[2020-05-05T13:08:37.237Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Winlogbeat-Windows
[2020-05-05T13:08:37.522Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Heartbeat-Mac-OS-X
[2020-05-05T13:08:37.846Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Filebeat-oss
[2020-05-05T13:08:38.019Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests
[2020-05-05T13:08:38.662Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Metricbeat-Python-integration-tests
[2020-05-05T13:08:39.085Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Functionbeat-Mac-OS-X-x-pack
[2020-05-05T13:08:39.366Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Auditbeat-crosscompile
[2020-05-05T13:08:39.641Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Libbeat-oss
[2020-05-05T13:08:39.844Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Generators-Beat-Linux
[2020-05-05T13:08:40.239Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Libbeat-crosscompile
[2020-05-05T13:08:40.529Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Auditbeat-Mac-OS-X
[2020-05-05T13:08:40.747Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Heartbeat-Windows
[2020-05-05T13:08:40.920Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Functionbeat-Windows
[2020-05-05T13:08:41.113Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Metricbeat-x-pack
[2020-05-05T13:08:41.824Z] + cat
[2020-05-05T13:08:41.824Z] + /usr/local/bin/runbld ./runbld-script
[2020-05-05T13:08:41.824Z] Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
[2020-05-05T13:08:48.592Z] runbld>>> runbld started
[2020-05-05T13:08:48.592Z] runbld>>> 1.6.11/a66728ff8f4356963772e6e6d2069392fa06acbe
[2020-05-05T13:08:49.199Z] runbld>>> The following profiles matched the job 'Beats/beats-beats-mbp/PR-17974' in order of occurrence in the config (last value wins).
[2020-05-05T13:08:50.633Z] runbld>>> Debug logging enabled.
[2020-05-05T13:08:50.633Z] runbld>>> Storing result
[2020-05-05T13:08:50.633Z] runbld>>> Store result: created {:total 2, :successful 2, :failed 0} 1
[2020-05-05T13:08:50.633Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1587637540455/t/20200505130850-6990C4C8
[2020-05-05T13:08:50.633Z] runbld>>> Adding system facts.
[2020-05-05T13:08:51.616Z] runbld>>> Adding vcs info for the latest commit:  2df51273d0ecc0c5c7ad1db888027c283cef2102
[2020-05-05T13:08:51.616Z] runbld>>> >>>>>>>>>>>> SCRIPT EXECUTION BEGIN >>>>>>>>>>>>
[2020-05-05T13:08:51.616Z] runbld>>> Adding /usr/lib/jvm/java-8-openjdk-amd64/bin to the path.
[2020-05-05T13:08:51.886Z] Processing JUnit reports with runbld...
[2020-05-05T13:08:51.886Z] + echo 'Processing JUnit reports with runbld...'
[2020-05-05T13:08:52.163Z] runbld>>> <<<<<<<<<<<< SCRIPT EXECUTION END <<<<<<<<<<<<
[2020-05-05T13:08:52.163Z] runbld>>> DURATION: 9ms
[2020-05-05T13:08:52.163Z] runbld>>> STDOUT: 40 bytes
[2020-05-05T13:08:52.163Z] runbld>>> STDERR: 49 bytes
[2020-05-05T13:08:52.163Z] runbld>>> WRAPPED PROCESS: SUCCESS (0)
[2020-05-05T13:08:52.163Z] runbld>>> Searching for build metadata in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats
[2020-05-05T13:08:53.624Z] runbld>>> Storing build metadata: 
[2020-05-05T13:08:53.624Z] runbld>>> Adding test report.
[2020-05-05T13:08:53.624Z] runbld>>> Searching for junit test output files with the pattern: TEST-.*\.xml$ in: /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats
[2020-05-05T13:08:54.620Z] runbld>>> Found 99 test output files
[2020-05-05T13:08:55.220Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-openmetrics.xml
[2020-05-05T13:08:55.220Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-istio.xml
[2020-05-05T13:08:55.220Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-iis.xml
[2020-05-05T13:08:55.220Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-activemq.xml
[2020-05-05T13:08:55.220Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-tomcat.xml
[2020-05-05T13:08:55.220Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-cloudfoundry.xml
[2020-05-05T13:08:56.216Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests/metricbeat/build/TEST-go-integration-windows.xml
[2020-05-05T13:08:56.216Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests/metricbeat/build/TEST-go-integration-graphite.xml
[2020-05-05T13:08:56.489Z] runbld>>> Test output logs contained: Errors: 0 Failures: 0 Tests: 8685 Skipped: 1002
[2020-05-05T13:08:56.776Z] runbld>>> Storing result
[2020-05-05T13:08:56.776Z] runbld>>> FAILURES: 0
[2020-05-05T13:08:56.776Z] runbld>>> Store result: updated {:total 2, :successful 2, :failed 0} 2
[2020-05-05T13:08:56.776Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1587637540455/t/20200505130850-6990C4C8
[2020-05-05T13:08:56.776Z] runbld>>> Email notification disabled by environment variable.
[2020-05-05T13:08:56.776Z] runbld>>> Slack notification disabled by environment variable.
[2020-05-05T13:09:05.883Z] Running on Jenkins in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17974
[2020-05-05T13:09:06.760Z] [INFO] getVaultSecret: Getting secrets
[2020-05-05T13:09:07.220Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2020-05-05T13:09:09.447Z] + chmod 755 generate-build-data.sh
[2020-05-05T13:09:09.447Z] + ./generate-build-data.sh https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-17974/ https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-17974/runs/10 ABORTED 7416345
[2020-05-05T13:09:10.358Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-17974/runs/10/steps/?limit=10000 -o steps-info.json
[2020-05-05T13:09:15.557Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-17974/runs/10/tests/?status=FAILED -o tests-errors.json

@urso
Copy link

urso commented May 5, 2020

The run on jenkins was green, but failed when reporting the results.

@simitt
Copy link
Contributor Author

simitt commented May 5, 2020

Thank you both for the review.

@simitt simitt merged commit ce17ab9 into elastic:master May 5, 2020
@simitt simitt added the test-plan Add this PR to be manual test plan label May 5, 2020
@zube zube bot added [zube]: Done test-plan Add this PR to be manual test plan and removed [zube]: (7.8) Planned for release [zube]: In Review test-plan Add this PR to be manual test plan labels May 5, 2020
simitt added a commit to simitt/beats that referenced this pull request May 5, 2020
Enable minimal ECS conformant logging by setting `logging.ecs:true`:
* adds @timestamp, log.level, message and ecs.version to every log line
* if EnableCaller is set add log.origin.file and log.origin.line.
* logs error.message when error is given

implements elastic#17942
simitt added a commit that referenced this pull request May 5, 2020
Enable minimal ECS conformant logging by setting `logging.ecs:true`:
* adds @timestamp, log.level, message and ecs.version to every log line
* if EnableCaller is set add log.origin.file and log.origin.line.
* logs error.message when error is given

implements #17942
@andresrc andresrc added test-plan-added This PR has been added to the test plan and removed [zube]: Done labels May 6, 2020
@simitt
Copy link
Contributor Author

simitt commented May 28, 2020

@urso, @kvch this PR was backported to 7.8. The flag logging.ecs signals that ECS compliant logging is enabled, but this only introduces the minimal required set of keys for ECS logging.
I think we should label the flag experimental for all beats until they actually adopted to ECS compliant logging. WDYT?

@urso
Copy link

urso commented Jun 4, 2020

Hm, when do you plan to make it the default? At least when running via Agent we should have ECS enabled by default.

@kvch
Copy link
Contributor

kvch commented Jun 4, 2020

Why experimental? If we mark the feature experimental, it implies (at least to me) that we might get rid of the feature or change it completely. But if I understand correctly this is the final format, we are just adding more fields in later releases.

However, I agree we should flag it somehow. So I would rather go with beta. Unless of course, the this functionality is subject to change.

@simitt
Copy link
Contributor Author

simitt commented Jun 4, 2020

My concern is that this adds a minimal set of ECS fields for now. It doesn't ensure that all log messages are ECS compatible, as this is still up to the implementer of the log messages.

@kvch agreed, beta would be a better fit. I'd just like to avoid the assumption that as soon as you set logging.ecs: true all your logs are ECS aligned, as that's simply not the case yet.

@felixbarny
Copy link
Member

Hm, when do you plan to make it the default? At least when running via Agent we should have ECS enabled by default.

++

Is it the default already when running under agent? If not, is there a follow-up issue tracking this?

Copy link
Contributor

@andrewvc andrewvc left a comment

Choose a reason for hiding this comment

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

LGTM for the minimal heartbeat changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:apm APM Server team issues/PRs Team:Integrations Label for the Integrations team test-plan Add this PR to be manual test plan test-plan-added This PR has been added to the test plan v7.8.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants