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 missing country_name geo field in add host metadata #20811

Merged
merged 2 commits into from
Aug 27, 2020

Conversation

jsoriano
Copy link
Member

@jsoriano jsoriano commented Aug 26, 2020

What does this PR do?

Add missing country_name geo field in add_host_metadata and add_observer_metadata processors.

Why is it important?

Documentation includes this field, and it is also part of ECS.

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.

Related issues

@jsoriano jsoriano added bug review libbeat Team:Integrations Label for the Integrations team labels Aug 26, 2020
@jsoriano jsoriano self-assigned this Aug 26, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations (Team:Integrations)

@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 Aug 26, 2020
Add `country_name` to the list of geo fields that can be added with
`add_host_metadata` and `add_observer_metadata`.
CHANGELOG.next.asciidoc Outdated Show resolved Hide resolved
Copy link
Contributor

@kaiyan-sheng kaiyan-sheng left a comment

Choose a reason for hiding this comment

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

Thanks!

@elasticmachine
Copy link
Collaborator

elasticmachine commented Aug 26, 2020

💔 Tests Failed

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #20811 updated]

  • Start Time: 2020-08-26T21:38:20.361+0000

  • Duration: 78 min 32 sec

Test stats 🧪

Test Results
Failed 3
Passed 19575
Skipped 1824
Total 21402

Test errors

Expand to view the tests failures

  • Name: Build and Test / Auditbeat oss Mac OS X / TestEventReader – file_integrity

    • Age: 1
    • Duration: 1.09
    • Error Details: Failed
  • Name: Build and Test / Auditbeat oss Mac OS X / TestEventReader/created – file_integrity

    • Age: 1
    • Duration: 1
    • Error Details: Failed
  • Name: Build and Test / Auditbeat oss Mac OS X / TestRaces – file_integrity

    • Age: 1
    • Duration: 1.87
    • Error Details: Failed

Steps errors

Expand to view the steps failures

  • Name: Mage build unitTest

    • Description: mage build unitTest

    • Duration: 3 min 59 sec

    • Start Time: 2020-08-26T22:21:35.302+0000

    • log

  • Name: Recursively delete the current directory from the workspace

    • Description: script returned exit code 1

    • Duration: 1 min 37 sec

    • Start Time: 2020-08-26T22:24:50.867+0000

    • log

Log output

Expand to view the last 100 lines of log output

[2020-08-26T22:55:22.258Z] + rm source.tgz
[2020-08-26T22:55:22.274Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats
[2020-08-26T22:55:22.296Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Lint
[2020-08-26T22:55:22.406Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Elastic-Agent-x-pack
[2020-08-26T22:55:22.494Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Winlogbeat-oss
[2020-08-26T22:55:22.573Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Auditbeat-crosscompile
[2020-08-26T22:55:22.649Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Journalbeat
[2020-08-26T22:55:22.727Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/dockerlogbeat
[2020-08-26T22:55:22.809Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Functionbeat-x-pack
[2020-08-26T22:55:22.891Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Generators-Metricbeat-Linux
[2020-08-26T22:55:22.973Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Packetbeat-Linux
[2020-08-26T22:55:23.058Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Elastic-Agent-x-pack-Windows
[2020-08-26T22:55:23.142Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Metricbeat-OSS-Unit-tests
[2020-08-26T22:55:23.231Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Heartbeat-oss
[2020-08-26T22:55:23.317Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Auditbeat-x-pack
[2020-08-26T22:55:23.399Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Winlogbeat-Windows-x-pack
[2020-08-26T22:55:23.478Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Auditbeat-oss-Windows
[2020-08-26T22:55:23.558Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Auditbeat-x-pack-Windows
[2020-08-26T22:55:23.638Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Heartbeat-Windows
[2020-08-26T22:55:23.721Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Auditbeat-oss-Linux
[2020-08-26T22:55:23.809Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Metricbeat-crosscompile
[2020-08-26T22:55:23.891Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Functionbeat-Windows
[2020-08-26T22:55:23.970Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Libbeat-x-pack
[2020-08-26T22:55:24.053Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Filebeat-x-pack-Windows
[2020-08-26T22:55:24.134Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Filebeat-Windows
[2020-08-26T22:55:24.216Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Winlogbeat-Windows
[2020-08-26T22:55:24.297Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Packetbeat-Windows
[2020-08-26T22:55:24.374Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Metricbeat-x-pack-Windows
[2020-08-26T22:55:24.450Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Elastic-Agent-Mac-OS-X
[2020-08-26T22:55:24.525Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Metricbeat-Windows
[2020-08-26T22:55:24.602Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Filebeat-x-pack-Mac-OS-X
[2020-08-26T22:55:24.679Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Filebeat-Mac-OS-X
[2020-08-26T22:55:24.761Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Generators-Beat-Linux
[2020-08-26T22:55:24.846Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Auditbeat-oss-Mac-OS-X
[2020-08-26T22:55:24.926Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Heartbeat-Mac-OS-X
[2020-08-26T22:55:25.002Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Auditbeat-x-pack-Mac-OS-X
[2020-08-26T22:55:25.080Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Filebeat-x-pack
[2020-08-26T22:55:25.159Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Metricbeat-x-pack-Mac-OS-X
[2020-08-26T22:55:25.239Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Generators-Beat-Mac-OS-X
[2020-08-26T22:55:25.317Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Filebeat-oss
[2020-08-26T22:55:25.392Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Generators-Metricbeat-Mac-OS-X
[2020-08-26T22:55:25.471Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Packetbeat-Mac-OS-X
[2020-08-26T22:55:25.552Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Libbeat-oss
[2020-08-26T22:55:25.630Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Functionbeat-Mac-OS-X-x-pack
[2020-08-26T22:55:25.708Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Metricbeat-OSS-Go-Integration-tests
[2020-08-26T22:55:25.790Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Metricbeat-OSS-Python-Integration-tests
[2020-08-26T22:55:25.878Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Libbeat-crosscompile
[2020-08-26T22:55:25.960Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Libbeat-stress-tests
[2020-08-26T22:55:26.039Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Metricbeat-Mac-OS-X
[2020-08-26T22:55:26.118Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Metricbeat-x-pack
[2020-08-26T22:55:26.549Z] + cat
[2020-08-26T22:55:26.550Z] + /usr/local/bin/runbld ./runbld-script --job-name elastic+beats+pull-request
[2020-08-26T22:55:26.550Z] Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
[2020-08-26T22:55:34.731Z] runbld>>> runbld started
[2020-08-26T22:55:34.731Z] runbld>>> 1.6.12/f45d832f2ba0aa2722ab4ec1fda8ad140f027f8b
[2020-08-26T22:55:35.679Z] runbld>>> The following profiles matched the job 'elastic+beats+pull-request' in order of occurrence in the config (last value wins).
[2020-08-26T22:55:35.679Z] runbld>>> Matches in the system config:
[2020-08-26T22:55:35.679Z] runbld>>> - Matched ^elastic\+beats
[2020-08-26T22:55:35.679Z] runbld>>> - Matched ^elastic\+beats\+pull-request
[2020-08-26T22:55:37.070Z] runbld>>> Debug logging enabled.
[2020-08-26T22:55:37.070Z] runbld>>> Storing result
[2020-08-26T22:55:37.332Z] runbld>>> Store result: created {:total 2, :successful 2, :failed 0} 1
[2020-08-26T22:55:37.332Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1597739501209/t/20200826225537-4AEAF53B
[2020-08-26T22:55:37.332Z] runbld>>> Adding system facts.
[2020-08-26T22:55:38.733Z] runbld>>> Adding vcs info for the latest commit:  12d1bdf39d14c43e27c3ffc75d61e06b2ec0d7d1
[2020-08-26T22:55:38.733Z] runbld>>> >>>>>>>>>>>> SCRIPT EXECUTION BEGIN >>>>>>>>>>>>
[2020-08-26T22:55:38.733Z] runbld>>> Adding /usr/lib/jvm/java-8-openjdk-amd64/bin to the path.
[2020-08-26T22:55:38.733Z] + echo 'Processing JUnit reports with runbld...'
[2020-08-26T22:55:38.733Z] Processing JUnit reports with runbld...
[2020-08-26T22:55:38.996Z] runbld>>> <<<<<<<<<<<< SCRIPT EXECUTION END <<<<<<<<<<<<
[2020-08-26T22:55:38.996Z] runbld>>> DURATION: 15ms
[2020-08-26T22:55:38.996Z] runbld>>> STDOUT: 40 bytes
[2020-08-26T22:55:38.996Z] runbld>>> STDERR: 49 bytes
[2020-08-26T22:55:38.996Z] runbld>>> WRAPPED PROCESS: SUCCESS (0)
[2020-08-26T22:55:38.996Z] runbld>>> Searching for build metadata in /var/lib/jenkins/workspace/Beats_beats_PR-20811
[2020-08-26T22:55:39.943Z] runbld>>> Storing build metadata: 
[2020-08-26T22:55:39.943Z] runbld>>> Adding test report.
[2020-08-26T22:55:39.943Z] runbld>>> Searching for junit test output files with the pattern: TEST-.*\.xml$ in: /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats
[2020-08-26T22:55:40.517Z] runbld>>> Found 139 test output files
[2020-08-26T22:55:43.085Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-iis.xml
[2020-08-26T22:55:43.085Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-openmetrics.xml
[2020-08-26T22:55:43.085Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-activemq.xml
[2020-08-26T22:55:43.085Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-istio.xml
[2020-08-26T22:55:43.085Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-tomcat.xml
[2020-08-26T22:55:43.663Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Metricbeat-OSS-Go-Integration-tests/metricbeat/build/TEST-go-integration-graphite.xml
[2020-08-26T22:55:43.663Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-20811/src/github.com/elastic/beats/Metricbeat-OSS-Go-Integration-tests/metricbeat/build/TEST-go-integration-windows.xml
[2020-08-26T22:55:44.244Z] runbld>>> Test output logs contained: Errors: 0 Failures: 3 Tests: 21251 Skipped: 1554
[2020-08-26T22:55:44.244Z] runbld>>> Storing result
[2020-08-26T22:55:44.244Z] runbld>>> FAILURES: 3
[2020-08-26T22:55:45.193Z] runbld>>> Store result: updated {:total 2, :successful 2, :failed 0} 2
[2020-08-26T22:55:45.193Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1597739501209/t/20200826225537-4AEAF53B
[2020-08-26T22:55:45.193Z] runbld>>> Email notification disabled by environment variable.
[2020-08-26T22:55:45.193Z] runbld>>> Slack notification disabled by environment variable.
[2020-08-26T22:55:50.756Z] Running on Jenkins in /var/lib/jenkins/workspace/Beats_beats_PR-20811
[2020-08-26T22:55:50.866Z] [INFO] getVaultSecret: Getting secrets
[2020-08-26T22:55:50.936Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2020-08-26T22:55:52.176Z] + chmod 755 generate-build-data.sh
[2020-08-26T22:55:52.176Z] + ./generate-build-data.sh https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-20811/ https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-20811/runs/3 FAILURE 4651555
[2020-08-26T22:55:52.176Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-20811/runs/3/steps/?limit=10000 -o steps-info.json
[2020-08-26T22:55:55.405Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-20811/runs/3/tests/?status=FAILED -o tests-errors.json

@jsoriano jsoriano merged commit 795c86f into elastic:master Aug 27, 2020
@jsoriano jsoriano deleted the add-host-geo-country-name branch August 27, 2020 10:04
jsoriano added a commit to jsoriano/beats that referenced this pull request Aug 27, 2020
Add `country_name` to the list of geo fields that can be added with
`add_host_metadata` and `add_observer_metadata`.

(cherry picked from commit 795c86f)
jsoriano added a commit to jsoriano/beats that referenced this pull request Aug 27, 2020
Add `country_name` to the list of geo fields that can be added with
`add_host_metadata` and `add_observer_metadata`.

(cherry picked from commit 795c86f)
jsoriano added a commit that referenced this pull request Aug 27, 2020
)

Add `country_name` to the list of geo fields that can be added with
`add_host_metadata` and `add_observer_metadata`.

(cherry picked from commit 795c86f)
jsoriano added a commit that referenced this pull request Aug 27, 2020
)

Add `country_name` to the list of geo fields that can be added with
`add_host_metadata` and `add_observer_metadata`.

(cherry picked from commit 795c86f)
melchiormoulin pushed a commit to melchiormoulin/beats that referenced this pull request Oct 14, 2020
Add `country_name` to the list of geo fields that can be added with
`add_host_metadata` and `add_observer_metadata`.
leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
… (elastic#20817)

Add `country_name` to the list of geo fields that can be added with
`add_host_metadata` and `add_observer_metadata`.

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

Custom Metric not Adding Host.geo.country_name
3 participants