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

libbeat/processors/util: make mac address rendering conform to ECS #32265

Merged
merged 2 commits into from
Aug 23, 2022

Conversation

efd6
Copy link
Contributor

@efd6 efd6 commented Jul 8, 2022

What does this PR do?

This alters the syntax of hardware addresses to match the syntax that is specified in ECS.

Why is it important?

Currently it does not match the spec and this leaks out to integrations and modules in ways that are irritating to fix in ingest pipelines.

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

Related issues

Use cases

Screenshots

Logs

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jul 8, 2022
@mergify mergify bot assigned efd6 Jul 8, 2022
@elasticmachine
Copy link
Collaborator

elasticmachine commented Jul 8, 2022

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-07-27T04:51:16.939+0000

  • Duration: 90 min 9 sec

Test stats 🧪

Test Results
Failed 0
Passed 22535
Skipped 1937
Total 24472

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@efd6 efd6 added bug backport-skip Skip notification from the automated backport with mergify Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team 8.4-candidate labels Jul 8, 2022
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jul 8, 2022
@efd6 efd6 marked this pull request as ready for review July 8, 2022 05:10
@efd6 efd6 requested a review from a team as a code owner July 8, 2022 05:10
@efd6 efd6 requested review from cmacknz and fearful-symmetry and removed request for a team July 8, 2022 05:10
@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

@efd6 efd6 added backport-7.17 Automated backport to the 7.17 branch with mergify and removed backport-skip Skip notification from the automated backport with mergify labels Jul 8, 2022
@cmacknz
Copy link
Member

cmacknz commented Jul 11, 2022

My only hesitation with this is that it is a breaking change for anyone searching for MAC addresses. I suppose the argument for doing this is that anyone searching for MACs today would need to handle multiple possible formats already anyway since we don't standardize them.

@cmacknz cmacknz requested a review from andrewkroh July 11, 2022 13:13
@efd6
Copy link
Contributor Author

efd6 commented Jul 12, 2022

I have the same concerns about the breaking change. The impetus for this is that the ECS specifies the format used in this change.

@mergify
Copy link
Contributor

mergify bot commented Jul 13, 2022

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b 32264-libbeat upstream/32264-libbeat
git merge upstream/main
git push upstream 32264-libbeat

@mergify
Copy link
Contributor

mergify bot commented Jul 26, 2022

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b 32264-libbeat upstream/32264-libbeat
git merge upstream/main
git push upstream 32264-libbeat

@efd6 efd6 added backport-skip Skip notification from the automated backport with mergify and removed backport-7.17 Automated backport to the 7.17 branch with mergify labels Aug 2, 2022
Copy link
Member

@andrewkroh andrewkroh left a comment

Choose a reason for hiding this comment

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

I suppose the argument for doing this is that anyone searching for MACs today would need to handle multiple possible formats already anyway since we don't standardize them.

Agree. I'm viewing this as a bug in that we are inconsistent with the format specified by ECS for MACs. Plus with all of the Fleet integrations using the ECS specified format, we often end up with a mix of formats in the same event.

There are workarounds if someone needs the non-ECS format. A runtime field could be used to shadow the value and produce both formats or just the non-ECS format. Or a beat processor or ingest node processor could be used to revert to the old format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.4-candidate backport-skip Skip notification from the automated backport with mergify bug Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

libbeat/processors/util: GetNetInfo formats hardware addresses incorrectly.
4 participants