Skip to content

Cherry-pick #21197 to 7.9: Fix libbeat.output.*.bytes metrics for ES#21211

Merged
kvch merged 5 commits intoelastic:7.9from
kvch:backport_21197_7.9
Sep 22, 2020
Merged

Cherry-pick #21197 to 7.9: Fix libbeat.output.*.bytes metrics for ES#21211
kvch merged 5 commits intoelastic:7.9from
kvch:backport_21197_7.9

Conversation

@kvch
Copy link
Copy Markdown
Contributor

@kvch kvch commented Sep 22, 2020

Cherry-pick of PR #21197 to 7.9 branch. Original message:

What does this PR do?

This PR passes a missing parameter to the constructor elasticsearch.Client.

Why is it important?

The missing parameter prevented Beats from reporting the metrics libbeat.output.write.bytes and libbeat.output.read.bytes in case of Elasticsearch output.

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

Example configuration:

filebeat.inputs:
- type: log
  enabled: true
  paths:
    - test.log

http.enabled: true
output.elasticsearch:
  hosts: ["localhost:9200"]

Read events from test.log. Then visit http://localhost:5066/stats?pretty and check that the aforementioned counters are greater than zero.

Related issues

Closes #20752

kvch and others added 5 commits August 31, 2020 14:00
…1197)

## What does this PR do?

This PR passes a missing parameter to the constructor `elasticsearch.Client`.

## Why is it important?

The missing parameter prevented Beats from reporting the metrics `libbeat.output.write.bytes` and `libbeat.output.read.bytes` in case of Elasticsearch output.

## Related issues

Closes elastic#20752

(cherry picked from commit 78dc0cf)
@kvch kvch added [zube]: In Review backport Team:Services (Deprecated) Label for the former Integrations-Services team labels Sep 22, 2020
@elasticmachine
Copy link
Copy Markdown
Contributor

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

@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 Sep 22, 2020
@elasticmachine
Copy link
Copy Markdown
Contributor

💔 Build Failed

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #21211 opened]

  • Start Time: 2020-09-22T08:27:23.453+0000

  • Duration: 79 min 44 sec

Test stats 🧪

Test Results
Failed 0
Passed 19433
Skipped 1841
Total 21274

Steps errors

Expand to view the steps failures

  • Name: Make test

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

    • Duration: 3 min 0 sec

    • Start Time: 2020-09-22T09:12:19.777+0000

    • log

  • Name: Make test

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

    • Duration: 4 min 12 sec

    • Start Time: 2020-09-22T09:16:26.210+0000

    • log

  • Name: Recursively delete the current directory from the workspace

    • Description: script returned exit code 2

    • Duration: 0 min 20 sec

    • Start Time: 2020-09-22T09:20:45.830+0000

    • log

Log output

Expand to view the last 100 lines of log output

[2020-09-22T09:45:34.626Z] + rm source.tgz
[2020-09-22T09:45:34.654Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats
[2020-09-22T09:45:34.707Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Lint
[2020-09-22T09:45:34.873Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Winlogbeat-oss
[2020-09-22T09:45:35.138Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Elastic-Agent-x-pack
[2020-09-22T09:45:35.307Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Auditbeat-crosscompile
[2020-09-22T09:45:35.472Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/dockerlogbeat
[2020-09-22T09:45:35.638Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Generators-Metricbeat-Linux
[2020-09-22T09:45:35.811Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Journalbeat
[2020-09-22T09:45:35.975Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Functionbeat-x-pack
[2020-09-22T09:45:36.144Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Elastic-Agent-x-pack-Windows
[2020-09-22T09:45:36.309Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Packetbeat-Linux
[2020-09-22T09:45:36.475Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Metricbeat-OSS-Unit-tests
[2020-09-22T09:45:36.644Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Auditbeat-oss-Windows
[2020-09-22T09:45:36.807Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Auditbeat-x-pack-Windows
[2020-09-22T09:45:36.974Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Heartbeat-oss
[2020-09-22T09:45:37.140Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Winlogbeat-Windows-x-pack
[2020-09-22T09:45:37.300Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Metricbeat-crosscompile
[2020-09-22T09:45:37.459Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Heartbeat-Windows
[2020-09-22T09:45:37.623Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Auditbeat-x-pack
[2020-09-22T09:45:37.788Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Auditbeat-oss-Linux
[2020-09-22T09:45:37.957Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Filebeat-Windows
[2020-09-22T09:45:38.119Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Packetbeat-Windows
[2020-09-22T09:45:38.280Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Elastic-Agent-Mac-OS-X
[2020-09-22T09:45:38.443Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Libbeat-x-pack
[2020-09-22T09:45:38.605Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Filebeat-x-pack-Windows
[2020-09-22T09:45:38.770Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Winlogbeat-Windows
[2020-09-22T09:45:38.937Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Auditbeat-oss-Mac-OS-X
[2020-09-22T09:45:39.104Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Heartbeat-Mac-OS-X
[2020-09-22T09:45:39.280Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Filebeat-x-pack-Mac-OS-X
[2020-09-22T09:45:39.444Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Functionbeat-Windows
[2020-09-22T09:45:39.611Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Filebeat-Mac-OS-X
[2020-09-22T09:45:39.776Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Metricbeat-x-pack-Windows
[2020-09-22T09:45:39.940Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Auditbeat-x-pack-Mac-OS-X
[2020-09-22T09:45:40.113Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Generators-Beat-Linux
[2020-09-22T09:45:40.279Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Metricbeat-Windows
[2020-09-22T09:45:40.444Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Functionbeat-Mac-OS-X-x-pack
[2020-09-22T09:45:40.611Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Metricbeat-Mac-OS-X
[2020-09-22T09:45:40.781Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Metricbeat-x-pack-Mac-OS-X
[2020-09-22T09:45:40.952Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Packetbeat-Mac-OS-X
[2020-09-22T09:45:41.120Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Generators-Beat-Mac-OS-X
[2020-09-22T09:45:41.286Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Filebeat-x-pack
[2020-09-22T09:45:41.456Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Generators-Metricbeat-Mac-OS-X
[2020-09-22T09:45:41.625Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Filebeat-oss
[2020-09-22T09:45:41.792Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests
[2020-09-22T09:45:41.962Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Metricbeat-Python-integration-tests
[2020-09-22T09:45:42.132Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Libbeat-oss
[2020-09-22T09:45:42.299Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Libbeat-crosscompile
[2020-09-22T09:45:42.464Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Libbeat-stress-tests
[2020-09-22T09:45:42.630Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Metricbeat-x-pack
[2020-09-22T09:45:43.176Z] + cat
[2020-09-22T09:45:43.176Z] + /usr/local/bin/runbld ./runbld-script --job-name elastic+beats+pull-request
[2020-09-22T09:45:43.176Z] Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
[2020-09-22T09:45:49.791Z] runbld>>> runbld started
[2020-09-22T09:45:49.791Z] runbld>>> 1.6.12/f45d832f2ba0aa2722ab4ec1fda8ad140f027f8b
[2020-09-22T09:45:51.717Z] runbld>>> The following profiles matched the job 'elastic+beats+pull-request' in order of occurrence in the config (last value wins).
[2020-09-22T09:45:51.717Z] runbld>>> Matches in the system config:
[2020-09-22T09:45:51.717Z] runbld>>> - Matched ^elastic\+beats
[2020-09-22T09:45:51.717Z] runbld>>> - Matched ^elastic\+beats\+pull-request
[2020-09-22T09:45:53.646Z] runbld>>> Debug logging enabled.
[2020-09-22T09:45:53.646Z] runbld>>> Storing result
[2020-09-22T09:45:53.646Z] runbld>>> Store result: created {:total 2, :successful 2, :failed 0} 1
[2020-09-22T09:45:53.646Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1597739501209/t/20200922094553-F57A9144
[2020-09-22T09:45:53.646Z] runbld>>> Adding system facts.
[2020-09-22T09:45:55.042Z] runbld>>> Adding vcs info for the latest commit:  0bb51dedfda64d2acaf167c47a9e61087aef63bc
[2020-09-22T09:45:55.042Z] runbld>>> >>>>>>>>>>>> SCRIPT EXECUTION BEGIN >>>>>>>>>>>>
[2020-09-22T09:45:55.042Z] runbld>>> Adding /usr/lib/jvm/java-8-openjdk-amd64/bin to the path.
[2020-09-22T09:45:55.042Z] + echo 'Processing JUnit reports with runbld...'
[2020-09-22T09:45:55.042Z] Processing JUnit reports with runbld...
[2020-09-22T09:45:55.306Z] runbld>>> <<<<<<<<<<<< SCRIPT EXECUTION END <<<<<<<<<<<<
[2020-09-22T09:45:55.306Z] runbld>>> DURATION: 42ms
[2020-09-22T09:45:55.306Z] runbld>>> STDOUT: 40 bytes
[2020-09-22T09:45:55.306Z] runbld>>> STDERR: 49 bytes
[2020-09-22T09:45:55.306Z] runbld>>> WRAPPED PROCESS: SUCCESS (0)
[2020-09-22T09:45:55.306Z] runbld>>> Searching for build metadata in /var/lib/jenkins/workspace/Beats_beats_PR-21211
[2020-09-22T09:45:56.257Z] runbld>>> Storing build metadata: 
[2020-09-22T09:45:56.257Z] runbld>>> Adding test report.
[2020-09-22T09:45:56.257Z] runbld>>> Searching for junit test output files with the pattern: TEST-.*\.xml$ in: /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats
[2020-09-22T09:45:56.834Z] runbld>>> Found 140 test output files
[2020-09-22T09:45:57.418Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-activemq.xml
[2020-09-22T09:45:57.419Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-openmetrics.xml
[2020-09-22T09:45:57.419Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-istio.xml
[2020-09-22T09:45:57.419Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-iis.xml
[2020-09-22T09:45:57.419Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-tomcat.xml
[2020-09-22T09:45:58.001Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests/metricbeat/build/TEST-go-integration-graphite.xml
[2020-09-22T09:45:58.001Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-21211/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests/metricbeat/build/TEST-go-integration-windows.xml
[2020-09-22T09:46:00.565Z] runbld>>> Test output logs contained: Errors: 0 Failures: 0 Tests: 21123 Skipped: 1560
[2020-09-22T09:46:00.565Z] runbld>>> Storing result
[2020-09-22T09:46:00.565Z] runbld>>> FAILURES: 0
[2020-09-22T09:46:00.565Z] runbld>>> Store result: updated {:total 2, :successful 2, :failed 0} 2
[2020-09-22T09:46:00.565Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1597739501209/t/20200922094553-F57A9144
[2020-09-22T09:46:00.565Z] runbld>>> Email notification disabled by environment variable.
[2020-09-22T09:46:00.565Z] runbld>>> Slack notification disabled by environment variable.
[2020-09-22T09:46:06.170Z] Running on Jenkins in /var/lib/jenkins/workspace/Beats_beats_PR-21211
[2020-09-22T09:46:06.388Z] [INFO] getVaultSecret: Getting secrets
[2020-09-22T09:46:06.489Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2020-09-22T09:46:07.657Z] + chmod 755 generate-build-data.sh
[2020-09-22T09:46:07.658Z] + ./generate-build-data.sh https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-21211/ https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-21211/runs/1 FAILURE 4723927
[2020-09-22T09:46:07.658Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-21211/runs/1/steps/?limit=10000 -o steps-info.json
[2020-09-22T09:46:10.886Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-21211/runs/1/tests/?status=FAILED -o tests-errors.json

@kvch kvch merged commit ef82f40 into elastic:7.9 Sep 22, 2020
@zube zube bot removed the [zube]: Done label Dec 21, 2020
leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
…for ES (elastic#21211)

* Add Known issues section with an issue about Functionbeat

* Fix libbeat.output.*.bytes metrics of Elasticsearch output (elastic#21197)

## What does this PR do?

This PR passes a missing parameter to the constructor `elasticsearch.Client`.

## Why is it important?

The missing parameter prevented Beats from reporting the metrics `libbeat.output.write.bytes` and `libbeat.output.read.bytes` in case of Elasticsearch output.

## Related issues

Closes elastic#20752

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants